diff options
author | Zhang, Yanmin <yanmin_zhang@linux.intel.com> | 2010-03-18 15:36:04 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-18 16:21:11 +0100 |
commit | 46be604b5ba738d53e5f5314813a4e7092864baf (patch) | |
tree | e06fa3a1bc3ed6c2bd10c2379fa5478522477baa /tools/perf/util/thread.c | |
parent | perf stat: Enable counters when collecting process-wide or system-wide data (diff) | |
download | linux-46be604b5ba738d53e5f5314813a4e7092864baf.tar.xz linux-46be604b5ba738d53e5f5314813a4e7092864baf.zip |
perf record: Enable counters only when kernel is execing subcommand
'perf record' starts counters before subcommand is execed, so
the statistics is not precise because it includes data of some
preparation steps. I fix it with the patch.
In addition, change the condition to fork/exec subcommand. If
there is a subcommand parameter, perf always fork/exec it. The
usage example is:
# perf record -f -a sleep 10
So this command could collect statistics for 10 seconds
precisely. User still could stop it by CTRL+C. Without the new
capability, user could only input CTRL+C to stop it without
precise time clock.
Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sheng Yang <sheng@linux.intel.com>
Cc: oerg Roedel <joro@8bytes.org>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: <zhiteng.huang@intel.com>
Cc: Zachary Amsden <zamsden@redhat.com>
LKML-Reference: <1268922965-14774-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/thread.c')
0 files changed, 0 insertions, 0 deletions