-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Energy API #2
Comments
Goodies via class-dump on Activity Monitor: NSNumberFormatter *_powerScoreFormatter;
NSNumber *_combinedPowerScore;
NSNumber *_combinedAveragePowerScore;
NSNumber *_averagePowerScore;
NSNumber *_powerScore;
NSNumber *_totalPowerScore;
NSString *_combinedPowerScoreDescription;
NSString *_combinedAveragePowerScoreDescription;
NSString *_powerScoreDescription;
NSString *_averagePowerScoreDescription;
@property(retain) NSString *averagePowerScoreDescription; // @synthesize averagePowerScoreDescription=_averagePowerScoreDescription;
@property(retain) NSString *powerScoreDescription; // @synthesize powerScoreDescription=_powerScoreDescription;
@property(retain) NSString *combinedAveragePowerScoreDescription; // @synthesize combinedAveragePowerScoreDescription=_combinedAveragePowerScoreDescription;
@property(retain) NSString *combinedPowerScoreDescription; // @synthesize combinedPowerScoreDescription=_combinedPowerScoreDescription;
@property(retain) NSNumber *totalPowerScore; // @synthesize totalPowerScore=_totalPowerScore;
@property(retain) NSNumber *powerScore; // @synthesize powerScore=_powerScore;
@property(retain) NSNumber *averagePowerScore; // @synthesize averagePowerScore=_averagePowerScore;
@property(retain) NSNumber *combinedAveragePowerScore; // @dynamic combinedAveragePowerScore;
@property(retain) NSNumber *combinedPowerScore; // @dynamic combinedPowerScore;
- (id)initWithName:(id)arg1 powerScore:(id)arg2 icon:(id)arg3 bundeIdentifier:(id)arg4; Next - try DTrace & LLDB/GDB. |
Looks like top (which is open source) actually has this stat already, didn't notice it. :) |
Also, pre-req for this is #10. |
These don't seem to be used by top. Will try them out. In #define TASK_POWER_INFO_V2 26
typedef struct {
uint64_t task_gpu_utilisation;
uint64_t task_gpu_stat_reserved0;
uint64_t task_gpu_stat_reserved1;
uint64_t task_gpu_stat_reserved2;
} gpu_energy_data;
typedef gpu_energy_data *gpu_energy_data_t;
struct task_power_info_v2 {
task_power_info_data_t cpu_energy;
gpu_energy_data gpu_energy;
};
typedef struct task_power_info_v2 task_power_info_v2_data_t;
typedef struct task_power_info_v2 *task_power_info_v2_t;
#define TASK_POWER_INFO_V2_COUNT ((mach_msg_type_number_t) \
(sizeof (task_power_info_v2_data_t) / sizeof (natural_t))) |
|
The text was updated successfully, but these errors were encountered: