mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Perf: Add legacy support for userspace tools
We used the "rs" and "rm" modifiers to access the L2CC and busmon PMU's before v3.4. This patch modifies the CFG to keep the backward compat alive till all tools progress to the new named PMU interfaces. Change-Id: I3a36ff8fb588382d445728a69ba790189e73ec40 Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
This commit is contained in:
parent
5b3388c666
commit
9a048c5eb1
2 changed files with 31 additions and 2 deletions
|
@ -30,6 +30,17 @@ static int raw(void)
|
|||
return __value(parse_events_text + 1, 16, PE_RAW);
|
||||
}
|
||||
|
||||
static int sh_raw(void)
|
||||
{
|
||||
return __value(parse_events_text + 2, 16, PE_SH_RAW);
|
||||
}
|
||||
|
||||
static int fab_raw(void)
|
||||
{
|
||||
return __value(parse_events_text + 2, 16, PE_FAB_RAW);
|
||||
}
|
||||
|
||||
|
||||
static int str(int token)
|
||||
{
|
||||
parse_events_lval.str = strdup(parse_events_text);
|
||||
|
@ -107,6 +118,8 @@ branch_type { return term(PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
|
|||
|
||||
mem: { return PE_PREFIX_MEM; }
|
||||
r{num_raw_hex} { return raw(); }
|
||||
rs{num_raw_hex} { return sh_raw(); }
|
||||
rm{num_raw_hex} { return fab_raw(); }
|
||||
{num_dec} { return value(10); }
|
||||
{num_hex} { return value(16); }
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ do { \
|
|||
|
||||
%}
|
||||
|
||||
%token PE_VALUE PE_VALUE_SYM PE_RAW PE_TERM
|
||||
%token PE_VALUE PE_VALUE_SYM PE_RAW PE_SH_RAW PE_FAB_RAW PE_TERM
|
||||
%token PE_NAME
|
||||
%token PE_MODIFIER_EVENT PE_MODIFIER_BP
|
||||
%token PE_NAME_CACHE_TYPE PE_NAME_CACHE_OP_RESULT
|
||||
|
@ -33,6 +33,8 @@ do { \
|
|||
%type <num> PE_VALUE
|
||||
%type <num> PE_VALUE_SYM
|
||||
%type <num> PE_RAW
|
||||
%type <num> PE_SH_RAW
|
||||
%type <num> PE_FAB_RAW
|
||||
%type <num> PE_TERM
|
||||
%type <str> PE_NAME
|
||||
%type <str> PE_NAME_CACHE_TYPE
|
||||
|
@ -77,7 +79,9 @@ event_def: event_pmu |
|
|||
event_legacy_mem |
|
||||
event_legacy_tracepoint sep_dc |
|
||||
event_legacy_numeric sep_dc |
|
||||
event_legacy_raw sep_dc
|
||||
event_legacy_raw sep_dc |
|
||||
event_legacy_shared_raw sep_dc |
|
||||
event_legacy_fabric_raw sep_dc
|
||||
|
||||
event_pmu:
|
||||
PE_NAME '/' event_config '/'
|
||||
|
@ -149,6 +153,18 @@ PE_RAW
|
|||
ABORT_ON(parse_events_add_numeric(list_event, idx, PERF_TYPE_RAW, $1, NULL));
|
||||
}
|
||||
|
||||
event_legacy_shared_raw:
|
||||
PE_SH_RAW
|
||||
{
|
||||
ABORT_ON(parse_events_add_numeric(list_event, idx, 6, $1, NULL));
|
||||
}
|
||||
|
||||
event_legacy_fabric_raw:
|
||||
PE_FAB_RAW
|
||||
{
|
||||
ABORT_ON(parse_events_add_numeric(list_event, idx, 7, $1, NULL));
|
||||
}
|
||||
|
||||
event_config:
|
||||
event_config ',' event_term
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue