summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2017-10-20 22:27:55 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-11-16 18:49:51 +0100
commitc2f1cead19b628d7a23d2cfc43e444af669f9eab (patch)
treee1cba5c03868a7a6adb78264eb0bcef4344e15a4 /tools/perf/util/evsel.h
parenttools headers: Synchronize kernel ABI headers wrt SPDX tags (diff)
downloadlinux-c2f1cead19b628d7a23d2cfc43e444af669f9eab.tar.xz
linux-c2f1cead19b628d7a23d2cfc43e444af669f9eab.zip
perf record: Fix -c/-F options for cpu event aliases
The Intel PMU event aliases have a implicit period= specifier to set the default period. Unfortunately this breaks overriding these periods with -c or -F, because the alias terms look like they are user specified to the internal parser, and user specified event qualifiers override the command line options. Track that they are coming from aliases by adding a "weak" state to the term. Any weak terms don't override command line options. I only did it for -c/-F for now, I think that's the only case that's broken currently. Before: $ perf record -c 1000 -vv -e uops_issued.any ... { sample_period, sample_freq } 2000003 After: $ perf record -c 1000 -vv -e uops_issued.any ... { sample_period, sample_freq } 1000 Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/20171020202755.21410-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 9277df96ffda..157f49e8a772 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -67,6 +67,7 @@ struct perf_evsel_config_term {
bool overwrite;
char *branch;
} val;
+ bool weak;
};
struct perf_stat_evsel;