* [BUG] perf top: -z option does not work
@ 2014-08-12 4:44 Stephane Eranian
2014-08-12 8:09 ` Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Stephane Eranian @ 2014-08-12 4:44 UTC (permalink / raw)
To: LKML
Cc: Jiri Olsa, Arnaldo Carvalho de Melo, Namhyung Kim, mingo@elte.hu,
Peter Zijlstra, David Ahern
Hi,
My understanding is that the -z option is used to only print a profile
since the last refresh. So if I have a refresh of 5s, then it prints the profile
based on the samples accumulated over the last 5 seconds.
The Z mode used to be available interactively. Nowadays, it seems only
avail from the cmdline. But it does not work.
I run a simple test.
$ sudo perf top -z
Then for 5s I run a cycle-burning noploop program.
It shows up at the top. But when it terminates, the program still stays
at the top of the profile for a long time. This is not what I'd expect.
The noploop line should disappear in the next couple of refreshes after
the program has terminated.
I am using tip.git and seeing the problem. But it seems, it's been there for a
long time.
Any idea what's wrong?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] perf top: -z option does not work
2014-08-12 4:44 [BUG] perf top: -z option does not work Stephane Eranian
@ 2014-08-12 8:09 ` Namhyung Kim
2014-08-12 12:24 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2014-08-12 8:09 UTC (permalink / raw)
To: Stephane Eranian
Cc: LKML, Jiri Olsa, Arnaldo Carvalho de Melo, mingo@elte.hu,
Peter Zijlstra, David Ahern
Hi Stephane,
On Tue, 12 Aug 2014 06:44:34 +0200, Stephane Eranian wrote:
> Hi,
>
>
> My understanding is that the -z option is used to only print a profile
> since the last refresh. So if I have a refresh of 5s, then it prints the profile
> based on the samples accumulated over the last 5 seconds.
Yep, that's what I understand about the -z behavior too.
>
> The Z mode used to be available interactively. Nowadays, it seems only
> avail from the cmdline. But it does not work.
Hmm.. it seems the stdio supports 'z' key but TUI don't.
>
> I run a simple test.
> $ sudo perf top -z
>
> Then for 5s I run a cycle-burning noploop program.
> It shows up at the top. But when it terminates, the program still stays
> at the top of the profile for a long time. This is not what I'd expect.
> The noploop line should disappear in the next couple of refreshes after
> the program has terminated.
>
> I am using tip.git and seeing the problem. But it seems, it's been there for a
> long time.
>
> Any idea what's wrong?
Looking at the code, it only zero out the annotation info but hist
entries. I guess we need to check the flag and throw out existing
entries instead of decaying.
Also I wonder about the order of decaying - shouldn't it be decayed
before processing current entries? It seems current code processes
current entries first and then decays...
I'll prepare patches for this soon.
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] perf top: -z option does not work
2014-08-12 8:09 ` Namhyung Kim
@ 2014-08-12 12:24 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-12 12:24 UTC (permalink / raw)
To: Namhyung Kim
Cc: Stephane Eranian, LKML, Jiri Olsa, mingo@elte.hu, Peter Zijlstra,
David Ahern
Em Tue, Aug 12, 2014 at 05:09:17PM +0900, Namhyung Kim escreveu:
> Hi Stephane,
>
> On Tue, 12 Aug 2014 06:44:34 +0200, Stephane Eranian wrote:
> > Hi,
> >
> >
> > My understanding is that the -z option is used to only print a profile
> > since the last refresh. So if I have a refresh of 5s, then it prints the profile
> > based on the samples accumulated over the last 5 seconds.
>
> Yep, that's what I understand about the -z behavior too.
>
> >
> > The Z mode used to be available interactively. Nowadays, it seems only
> > avail from the cmdline. But it does not work.
>
> Hmm.. it seems the stdio supports 'z' key but TUI don't.
Problem introduced long ago when I moved 'top' to use the same hists
browser as 'report', to have all the zooming, --sort, etc goodies.
I see that Namhyung proposed a patch to fix that, will review it,
thanks!
- Arnaldo
> >
> > I run a simple test.
> > $ sudo perf top -z
> >
> > Then for 5s I run a cycle-burning noploop program.
> > It shows up at the top. But when it terminates, the program still stays
> > at the top of the profile for a long time. This is not what I'd expect.
> > The noploop line should disappear in the next couple of refreshes after
> > the program has terminated.
> >
> > I am using tip.git and seeing the problem. But it seems, it's been there for a
> > long time.
> >
> > Any idea what's wrong?
>
> Looking at the code, it only zero out the annotation info but hist
> entries. I guess we need to check the flag and throw out existing
> entries instead of decaying.
>
> Also I wonder about the order of decaying - shouldn't it be decayed
> before processing current entries? It seems current code processes
> current entries first and then decays...
>
> I'll prepare patches for this soon.
>
> Thanks,
> Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-13 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12 4:44 [BUG] perf top: -z option does not work Stephane Eranian
2014-08-12 8:09 ` Namhyung Kim
2014-08-12 12:24 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox