lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Aug 2014 17:37:39 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jiri Olsa <jolsa@...hat.com>, David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 2/2] perf top: Handle 'z' key for toggle zeroing samples
 in TUI

Em Wed, Aug 13, 2014 at 01:07:30AM +0200, Stephane Eranian escreveu:
> On Tue, Aug 12, 2014 at 10:16 AM, Namhyung Kim <namhyung@...nel.org> wrote:
> > The perf top TUI lacks 'z' key support to toggle sample zeroing.
> > Add it.
> >
> Works for me.
> Tested-by: Stephane Eranian <eranian@...gle.com>

One thing that can be improved: Make it trigger a refresh in the right
after 'z' is pressed.

Also, this toggles the zeroing before each sample, it would be nice to
have a visual cue that this is in effect, probably in the first line in
the screen, perhaps on the far right, something like [z] when this is in
effect and nothing when not.

Right now the way to figure this out is to observe the number of
samples, if it increases monotonically, zeroing before refresh is not in
effect, if it goes from a high number to a smaller or vice versa,
zeroing is in effect :-)

Anyway, applied, people wanting this feature can figure this out, what I
suggested is just polishing.

Thanks!

- Arnaldo
 
> > Reported-by: Stephane Eranian <eranian@...gle.com>
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > ---
> >  tools/perf/ui/browsers/hists.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> > index 045c1e16ac59..381c085a41b8 100644
> > --- a/tools/perf/ui/browsers/hists.c
> > +++ b/tools/perf/ui/browsers/hists.c
> > @@ -10,6 +10,7 @@
> >  #include "../../util/pstack.h"
> >  #include "../../util/sort.h"
> >  #include "../../util/util.h"
> > +#include "../../util/top.h"
> >  #include "../../arch/common.h"
> >
> >  #include "../browser.h"
> > @@ -1530,6 +1531,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
> >         "P             Print histograms to perf.hist.N\n"
> >         "t             Zoom into current Thread\n"
> >         "V             Verbose (DSO names in callchains, etc)\n"
> > +       "z             Toggle zeroing of samples\n"
> >         "/             Filter symbol by name";
> >
> >         if (browser == NULL)
> > @@ -1630,6 +1632,13 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
> >                 case 'F':
> >                         symbol_conf.filter_relative ^= 1;
> >                         continue;
> > +               case 'z':
> > +                       if (!is_report_browser(hbt)) {
> > +                               struct perf_top *top = hbt->arg;
> > +
> > +                               top->zero = !top->zero;
> > +                       }
> > +                       continue;
> >                 case K_F1:
> >                 case 'h':
> >                 case '?':
> > --
> > 2.0.0
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ