perf_event_open: Add support for counting REF_CPU_CYCLES
Using thread's tsc count instead of performance counter Refs: #1025 Change-Id: I1d7a18f1c52f1d52087002d31818638a6b206014
This commit is contained in:
committed by
Masamichi Takagi
parent
bc06d68d84
commit
309145587f
@@ -256,12 +256,20 @@ struct hw_perf_event_extra {
|
||||
int idx;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum perf_event_state - the states of an event:
|
||||
*/
|
||||
enum perf_event_state {
|
||||
PERF_EVENT_STATE_INACTIVE = 0,
|
||||
PERF_EVENT_STATE_ACTIVE = 1,
|
||||
};
|
||||
|
||||
struct mc_perf_event {
|
||||
struct perf_event_attr attr;
|
||||
struct hw_perf_event_extra extra_reg;
|
||||
unsigned long hw_config;
|
||||
unsigned long hw_config_ext;
|
||||
enum perf_event_state state;
|
||||
int cpu_id;
|
||||
int counter_id; // counter_id
|
||||
unsigned long count; // counter_value
|
||||
@@ -275,6 +283,13 @@ struct mc_perf_event {
|
||||
int nr_siblings;
|
||||
int pid;
|
||||
struct list_head group_entry;
|
||||
int use_invariant_tsc;
|
||||
long long base_user_tsc;
|
||||
long long stopped_user_tsc;
|
||||
long long user_accum_count;
|
||||
long long base_system_tsc;
|
||||
long long stopped_system_tsc;
|
||||
long long system_accum_count;
|
||||
};
|
||||
|
||||
struct perf_event_mmap_page {
|
||||
|
||||
Reference in New Issue
Block a user