perf top: Add a visual cue for toggle zeroing of samples
authorTaeung Song <treeze.taeung@gmail.com>
Tue, 7 Oct 2014 07:13:15 +0000 (16:13 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 Oct 2014 18:47:48 +0000 (15:47 -0300)
commit1e378ebd117d1828b9d5dbe0538887478fcb9d84
treefaecdadd211eea302fae2326d1b4e78283941efa
parentec4212d88a77eb6caec10777ddd629b702a5ebbd
perf top: Add a visual cue for toggle zeroing of samples

When 'perf top' is run, one can't easily find a difference
between -z option and normal output.
So I added a visual cue to know whether it is the zeroing or not.

Output is as below.

Before:
 $ perf top

 Samples: 61K of event 'cycles', Event count (approx.): 3908136933
 Overhead  Shared Object                       Symbol
    1.42%  firefox                             [.] 0x0000000000011e76
    1.32%  libpthread-2.17.so                  [.] pthread_mutex_lock

If you press key 'z' or run with zero option like '$ perf top --zero', it is as below.

After:
 Samples: 61K of event 'cycles', Event count (approx.): 3908136933 [z]
 Overhead  Shared Object                       Symbol
    1.42%  firefox                             [.] 0x0000000000011e76
    1.32%  libpthread-2.17.so                  [.] pthread_mutex_lock

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1412665995-26359-1-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c