diff options
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r-- | tools/perf/builtin-stat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index e619ac89dff5..ff8c413b7e73 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -72,7 +72,7 @@ static unsigned int nr_cpus = 0; | |||
72 | static int run_idx = 0; | 72 | static int run_idx = 0; |
73 | 73 | ||
74 | static int run_count = 1; | 74 | static int run_count = 1; |
75 | static bool inherit = true; | 75 | static bool no_inherit = false; |
76 | static bool scale = true; | 76 | static bool scale = true; |
77 | static pid_t target_pid = -1; | 77 | static pid_t target_pid = -1; |
78 | static pid_t target_tid = -1; | 78 | static pid_t target_tid = -1; |
@@ -167,8 +167,8 @@ static int create_perf_stat_counter(int counter) | |||
167 | ++ncreated; | 167 | ++ncreated; |
168 | } | 168 | } |
169 | } else { | 169 | } else { |
170 | attr->inherit = inherit; | 170 | attr->inherit = !no_inherit; |
171 | if (target_pid == -1) { | 171 | if (target_pid == -1 && target_tid == -1) { |
172 | attr->disabled = 1; | 172 | attr->disabled = 1; |
173 | attr->enable_on_exec = 1; | 173 | attr->enable_on_exec = 1; |
174 | } | 174 | } |
@@ -518,8 +518,8 @@ static const struct option options[] = { | |||
518 | OPT_CALLBACK('e', "event", NULL, "event", | 518 | OPT_CALLBACK('e', "event", NULL, "event", |
519 | "event selector. use 'perf list' to list available events", | 519 | "event selector. use 'perf list' to list available events", |
520 | parse_events), | 520 | parse_events), |
521 | OPT_BOOLEAN('i', "inherit", &inherit, | 521 | OPT_BOOLEAN('i', "no-inherit", &no_inherit, |
522 | "child tasks inherit counters"), | 522 | "child tasks do not inherit counters"), |
523 | OPT_INTEGER('p', "pid", &target_pid, | 523 | OPT_INTEGER('p', "pid", &target_pid, |
524 | "stat events on existing process id"), | 524 | "stat events on existing process id"), |
525 | OPT_INTEGER('t', "tid", &target_tid, | 525 | OPT_INTEGER('t', "tid", &target_tid, |