perf record: Default -t option to no inheritance
The change to per-cpu mmaps causes the -p, -t and -u options now to have inheritance enabled by default. Change that back to no inheritance but for the -t option only. Requested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1384768557-23331-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
167faf32b0
commit
69e7e5b02b
@ -57,6 +57,8 @@ OPTIONS
|
|||||||
-t::
|
-t::
|
||||||
--tid=::
|
--tid=::
|
||||||
Record events on existing thread ID (comma separated list).
|
Record events on existing thread ID (comma separated list).
|
||||||
|
This option also disables inheritance by default. Enable it by adding
|
||||||
|
--inherit.
|
||||||
|
|
||||||
-u::
|
-u::
|
||||||
--uid=::
|
--uid=::
|
||||||
|
@ -843,8 +843,9 @@ const struct option record_options[] = {
|
|||||||
OPT_U64('c', "count", &record.opts.user_interval, "event period to sample"),
|
OPT_U64('c', "count", &record.opts.user_interval, "event period to sample"),
|
||||||
OPT_STRING('o', "output", &record.file.path, "file",
|
OPT_STRING('o', "output", &record.file.path, "file",
|
||||||
"output file name"),
|
"output file name"),
|
||||||
OPT_BOOLEAN('i', "no-inherit", &record.opts.no_inherit,
|
OPT_BOOLEAN_SET('i', "no-inherit", &record.opts.no_inherit,
|
||||||
"child tasks do not inherit counters"),
|
&record.opts.no_inherit_set,
|
||||||
|
"child tasks do not inherit counters"),
|
||||||
OPT_UINTEGER('F', "freq", &record.opts.user_freq, "profile at this frequency"),
|
OPT_UINTEGER('F', "freq", &record.opts.user_freq, "profile at this frequency"),
|
||||||
OPT_CALLBACK('m', "mmap-pages", &record.opts.mmap_pages, "pages",
|
OPT_CALLBACK('m', "mmap-pages", &record.opts.mmap_pages, "pages",
|
||||||
"number of mmap data pages",
|
"number of mmap data pages",
|
||||||
@ -939,6 +940,9 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
|
|||||||
goto out_symbol_exit;
|
goto out_symbol_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rec->opts.target.tid && !rec->opts.no_inherit_set)
|
||||||
|
rec->opts.no_inherit = true;
|
||||||
|
|
||||||
err = target__validate(&rec->opts.target);
|
err = target__validate(&rec->opts.target);
|
||||||
if (err) {
|
if (err) {
|
||||||
target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
|
target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
|
||||||
|
@ -254,6 +254,7 @@ struct perf_record_opts {
|
|||||||
bool inherit_stat;
|
bool inherit_stat;
|
||||||
bool no_delay;
|
bool no_delay;
|
||||||
bool no_inherit;
|
bool no_inherit;
|
||||||
|
bool no_inherit_set;
|
||||||
bool no_samples;
|
bool no_samples;
|
||||||
bool raw_samples;
|
bool raw_samples;
|
||||||
bool sample_address;
|
bool sample_address;
|
||||||
|
Loading…
Reference in New Issue
Block a user