mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
perf tools: Fix cache event name generation
If the event name is specified with all 3 components, the last one
overwrites the previous one during the name composing within the
parse_events_add_cache function.
Fixing this by properly adjusting the string index.
Reported-by: Joel Uckelman <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Joel Uckelman <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
LPU-Reference: [email protected]
[ committer note: Remove the newline fix, done already in 42e1fb7 ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
49f20d723e
commit
275ef3878f
1 changed files with 1 additions and 1 deletions
|
|
@ -308,7 +308,7 @@ int parse_events_add_cache(struct list_head **list, int *idx,
|
|||
for (i = 0; (i < 2) && (op_result[i]); i++) {
|
||||
char *str = op_result[i];
|
||||
|
||||
snprintf(name + n, MAX_NAME_LEN - n, "-%s", str);
|
||||
n += snprintf(name + n, MAX_NAME_LEN - n, "-%s", str);
|
||||
|
||||
if (cache_op == -1) {
|
||||
cache_op = parse_aliases(str, perf_evsel__hw_cache_op,
|
||||
|
|
|
|||
Loading…
Reference in a new issue