From: Arnaldo Carvalho de Melo <[email protected]>

As they will have perf_event_attr.enable_on_exec set, starting as soon
as we exec() the workload.

Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/builtin-trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 7e935f1083ec..66300aea08b0 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2109,10 +2109,10 @@ static int trace__run(struct trace *trace, int argc, 
const char **argv)
        if (err < 0)
                goto out_error_mmap;
 
-       perf_evlist__enable(evlist);
-
        if (forks)
                perf_evlist__start_workload(evlist);
+       else
+               perf_evlist__enable(evlist);
 
        trace->multiple_threads = evlist->threads->map[0] == -1 || 
evlist->threads->nr > 1;
 again:
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to