Commit d2db9a98 authored by Wang Nan's avatar Wang Nan Committed by Arnaldo Carvalho de Melo

perf record: Use OPT_BOOLEAN_SET for buildid cache related options

'perf record' knows whether buildid cache is enabled (via
--no-no-buildid-cache) deliberately. Buildid cache can be turned off in
some situations.

Output switching support needs this feature to turn off buildid cache
by default.
Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1453715801-7732-33-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarHe Kuang <hekuang@huawei.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 37b20151
...@@ -49,7 +49,9 @@ struct record { ...@@ -49,7 +49,9 @@ struct record {
const char *progname; const char *progname;
int realtime_prio; int realtime_prio;
bool no_buildid; bool no_buildid;
bool no_buildid_set;
bool no_buildid_cache; bool no_buildid_cache;
bool no_buildid_cache_set;
bool buildid_all; bool buildid_all;
unsigned long long samples; unsigned long long samples;
}; };
...@@ -1097,10 +1099,12 @@ struct option __record_options[] = { ...@@ -1097,10 +1099,12 @@ struct option __record_options[] = {
OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"), OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"),
OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples, OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples,
"don't sample"), "don't sample"),
OPT_BOOLEAN('N', "no-buildid-cache", &record.no_buildid_cache, OPT_BOOLEAN_SET('N', "no-buildid-cache", &record.no_buildid_cache,
"do not update the buildid cache"), &record.no_buildid_cache_set,
OPT_BOOLEAN('B', "no-buildid", &record.no_buildid, "do not update the buildid cache"),
"do not collect buildids in perf.data"), OPT_BOOLEAN_SET('B', "no-buildid", &record.no_buildid,
&record.no_buildid_set,
"do not collect buildids in perf.data"),
OPT_CALLBACK('G', "cgroup", &record.evlist, "name", OPT_CALLBACK('G', "cgroup", &record.evlist, "name",
"monitor event in cgroup name only", "monitor event in cgroup name only",
parse_cgroups), parse_cgroups),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment