aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorZhang, Yanmin <[email protected]>2010-03-18 11:36:03 -0300
committerIngo Molnar <[email protected]>2010-03-18 16:21:11 +0100
commit6be2850effd6a8bae11d623c8c52e88d2fbc0e96 (patch)
treef8a2e34dc16a8e79e87b4c3fbe420c2346343cf1 /include/linux
parentd6dc0b4ead6e8720096ecfa3d9e899b47ddbc8ed (diff)
perf stat: Enable counters when collecting process-wide or system-wide data
Command 'perf stat' doesn't enable counters when collecting an existing (by -p) process or system-wide statistics. Fix the issue. Change the condition of fork/exec subcommand. If there is a subcommand parameter, perf always forks/execs it. The usage example is: # perf stat -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 use CTRL+C to stop it without precise time clock. Another issue is 'perf stat -a' consumes 100% time of a full single logical cpu. It has a bad impact on running workload. Fix it by adding a sleep(1) in the while(!done) loop in function run_perf_stat. Signed-off-by: Zhang Yanmin <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sheng Yang <[email protected]> Cc: Marcelo Tosatti <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Jes Sorensen <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: Zachary Amsden <[email protected]> Cc: <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions