* perf top -z not working?
@ 2012-10-17 12:26 Ryan Johnson
2012-10-17 13:49 ` Chulmin Kim
0 siblings, 1 reply; 13+ messages in thread
From: Ryan Johnson @ 2012-10-17 12:26 UTC (permalink / raw)
To: linux-perf-users
Hi,
(Please CC me in replies, not a list member)
It seems that `perf top -z' does not behave as advertized, at least not
on the 3.2.0-25 kernel (Ubuntu) that I'm running. The man page states
that it should "zero history across display updates" but the counts
still seem to accumulate (the total samples reported rises
monotonically) and processes still show up in the display long after
they have exited. Pressing `z' or `Z' seems to have no effect, either.
Have I misunderstood this feature, or is this a bug that has perhaps
been fixed in later kernel versions? I haven't been successful searching
for information about it, beyond the man pages and what the perf wiki says.
Thanks,
Ryan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-17 12:26 perf top -z not working? Ryan Johnson
@ 2012-10-17 13:49 ` Chulmin Kim
2012-10-22 1:46 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 13+ messages in thread
From: Chulmin Kim @ 2012-10-17 13:49 UTC (permalink / raw)
To: linux-perf-users; +Cc: Ryan Johnson
2012-10-17 오후 9:26, Ryan Johnson 쓴 글:
> Hi,
>
> (Please CC me in replies, not a list member)
>
> It seems that `perf top -z' does not behave as advertized, at least
> not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The man page
> states that it should "zero history across display updates" but the
> counts still seem to accumulate (the total samples reported rises
> monotonically) and processes still show up in the display long after
> they have exited. Pressing `z' or `Z' seems to have no effect, either.
My kernel version is 3.0.0 (ubuntu 11.10).
Mine seems to work well. The result was not the accumulated one,
definitely.
In my opinion, it is a buf in the perf tool in that kernel version.
>
> Have I misunderstood this feature, or is this a bug that has perhaps
> been fixed in later kernel versions? I haven't been successful
> searching for information about it, beyond the man pages and what the
> perf wiki says.
>
> Thanks,
> Ryan
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-perf-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-17 13:49 ` Chulmin Kim
@ 2012-10-22 1:46 ` Arnaldo Carvalho de Melo
2012-10-22 11:50 ` Ryan Johnson
0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-10-22 1:46 UTC (permalink / raw)
To: Chulmin Kim; +Cc: linux-perf-users, Ryan Johnson
Em Wed, Oct 17, 2012 at 10:49:42PM +0900, Chulmin Kim escreveu:
> 2012-10-17 오후 9:26, Ryan Johnson 쓴 글:
> >(Please CC me in replies, not a list member)
> >
> >It seems that `perf top -z' does not behave as advertized, at
> >least not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The
> >man page states that it should "zero history across display
> >updates" but the counts still seem to accumulate (the total
> >samples reported rises monotonically) and processes still show up
> >in the display long after they have exited. Pressing `z' or `Z'
> >seems to have no effect, either.
Are you using the --tui or --stdio interface? Try with both and check if
it works in one of them, I bet the problem is with --tui.
- Arnaldo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 1:46 ` Arnaldo Carvalho de Melo
@ 2012-10-22 11:50 ` Ryan Johnson
2012-10-22 13:12 ` David Ahern
0 siblings, 1 reply; 13+ messages in thread
From: Ryan Johnson @ 2012-10-22 11:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: Chulmin Kim, linux-perf-users
On 21/10/2012 9:46 PM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Oct 17, 2012 at 10:49:42PM +0900, Chulmin Kim escreveu:
>> 2012-10-17 오후 9:26, Ryan Johnson 쓴 글:
>>> (Please CC me in replies, not a list member)
>>>
>>> It seems that `perf top -z' does not behave as advertized, at
>>> least not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The
>>> man page states that it should "zero history across display
>>> updates" but the counts still seem to accumulate (the total
>>> samples reported rises monotonically) and processes still show up
>>> in the display long after they have exited. Pressing `z' or `Z'
>>> seems to have no effect, either.
> Are you using the --tui or --stdio interface? Try with both and check if
> it works in one of them, I bet the problem is with --tui.
--stdio does the same, so I'll have to try updating my kernel like
Chulmin suggested (haven't had time to do that yet)
Thanks,
Ryan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 11:50 ` Ryan Johnson
@ 2012-10-22 13:12 ` David Ahern
2012-10-22 14:10 ` Ryan Johnson
2012-10-23 6:04 ` Namhyung Kim
0 siblings, 2 replies; 13+ messages in thread
From: David Ahern @ 2012-10-22 13:12 UTC (permalink / raw)
To: Ryan Johnson; +Cc: Arnaldo Carvalho de Melo, Chulmin Kim, linux-perf-users
On 10/22/12 5:50 AM, Ryan Johnson wrote:
>>>> It seems that `perf top -z' does not behave as advertized, at
>>>> least not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The
>>>> man page states that it should "zero history across display
>>>> updates" but the counts still seem to accumulate (the total
>>>> samples reported rises monotonically) and processes still show up
>>>> in the display long after they have exited. Pressing `z' or `Z'
>>>> seems to have no effect, either.
>> Are you using the --tui or --stdio interface? Try with both and check if
>> it works in one of them, I bet the problem is with --tui.
> --stdio does the same, so I'll have to try updating my kernel like
> Chulmin suggested (haven't had time to do that yet)
The kernel has nothing to do with the feature. From builtin-top.c, this
part is either not happening or more likely not happening correctly.
if (top->zero)
symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
else
symbol__annotate_decay_histogram(symbol, top->sym_evsel->idx);
I recall it working recently - last year or so. Can you try different
versions -- say 3.0, 3.2, 3.4 and latest? If you have a copy of Linus'
tree or Arnaldo's git tree it should not take much time.
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 13:12 ` David Ahern
@ 2012-10-22 14:10 ` Ryan Johnson
2012-10-22 14:13 ` Chulmin Kim
2012-10-22 14:45 ` Arnaldo Carvalho de Melo
2012-10-23 6:04 ` Namhyung Kim
1 sibling, 2 replies; 13+ messages in thread
From: Ryan Johnson @ 2012-10-22 14:10 UTC (permalink / raw)
To: David Ahern; +Cc: Arnaldo Carvalho de Melo, Chulmin Kim, linux-perf-users
On 22/10/2012 9:12 AM, David Ahern wrote:
> On 10/22/12 5:50 AM, Ryan Johnson wrote:
>>>>> It seems that `perf top -z' does not behave as advertized, at
>>>>> least not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The
>>>>> man page states that it should "zero history across display
>>>>> updates" but the counts still seem to accumulate (the total
>>>>> samples reported rises monotonically) and processes still show up
>>>>> in the display long after they have exited. Pressing `z' or `Z'
>>>>> seems to have no effect, either.
>>> Are you using the --tui or --stdio interface? Try with both and
>>> check if
>>> it works in one of them, I bet the problem is with --tui.
>> --stdio does the same, so I'll have to try updating my kernel like
>> Chulmin suggested (haven't had time to do that yet)
>
> The kernel has nothing to do with the feature. From builtin-top.c,
> this part is either not happening or more likely not happening correctly.
>
> if (top->zero)
> symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
> else
> symbol__annotate_decay_histogram(symbol, top->sym_evsel->idx);
>
> I recall it working recently - last year or so. Can you try different
> versions -- say 3.0, 3.2, 3.4 and latest? If you have a copy of Linus'
> tree or Arnaldo's git tree it should not take much time.
Chulmin says his 3.0 version works. My 3.2.18 doesn't. I don't have a
copy of the git tree on that machine, but I'll try building 3.4.x and
tip when I get a chance. I have never built perf-tools before, though,
so I'd appreciate tips on what might be different for building
perf-tools compared to the kernel, and how to avoid building the
standard kernel along the way. Hopefully it's just configure-make-install?
Regards,
Ryan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 14:10 ` Ryan Johnson
@ 2012-10-22 14:13 ` Chulmin Kim
2012-10-22 14:15 ` Chulmin Kim
2012-10-22 14:45 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 13+ messages in thread
From: Chulmin Kim @ 2012-10-22 14:13 UTC (permalink / raw)
To: Ryan Johnson; +Cc: linux-perf-users
2012-10-22 오후 11:10, Ryan Johnson 쓴 글:
> On 22/10/2012 9:12 AM, David Ahern wrote:
>> On 10/22/12 5:50 AM, Ryan Johnson wrote:
>>>>>> It seems that `perf top -z' does not behave as advertized, at
>>>>>> least not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The
>>>>>> man page states that it should "zero history across display
>>>>>> updates" but the counts still seem to accumulate (the total
>>>>>> samples reported rises monotonically) and processes still show up
>>>>>> in the display long after they have exited. Pressing `z' or `Z'
>>>>>> seems to have no effect, either.
>>>> Are you using the --tui or --stdio interface? Try with both and
>>>> check if
>>>> it works in one of them, I bet the problem is with --tui.
>>> --stdio does the same, so I'll have to try updating my kernel like
>>> Chulmin suggested (haven't had time to do that yet)
>>
>> The kernel has nothing to do with the feature. From builtin-top.c,
>> this part is either not happening or more likely not happening
>> correctly.
>>
>> if (top->zero)
>> symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
>> else
>> symbol__annotate_decay_histogram(symbol, top->sym_evsel->idx);
>>
>> I recall it working recently - last year or so. Can you try different
>> versions -- say 3.0, 3.2, 3.4 and latest? If you have a copy of
>> Linus' tree or Arnaldo's git tree it should not take much time.
> Chulmin says his 3.0 version works. My 3.2.18 doesn't. I don't have a
> copy of the git tree on that machine, but I'll try building 3.4.x and
> tip when I get a chance. I have never built perf-tools before, though,
> so I'd appreciate tips on what might be different for building
> perf-tools compared to the kernel, and how to avoid building the
> standard kernel along the way. Hopefully it's just
> configure-make-install?
>
How about checking your "top" version first?
According to David's suggestion, it is the matter of top version.
Mine was 3.2.8. (top --version).
> Regards,
> Ryan
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 14:13 ` Chulmin Kim
@ 2012-10-22 14:15 ` Chulmin Kim
0 siblings, 0 replies; 13+ messages in thread
From: Chulmin Kim @ 2012-10-22 14:15 UTC (permalink / raw)
To: linux-perf-users
2012-10-22 오후 11:13, Chulmin Kim 쓴 글:
> 2012-10-22 오후 11:10, Ryan Johnson 쓴 글:
>> On 22/10/2012 9:12 AM, David Ahern wrote:
>>> On 10/22/12 5:50 AM, Ryan Johnson wrote:
>>>>>>> It seems that `perf top -z' does not behave as advertized, at
>>>>>>> least not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The
>>>>>>> man page states that it should "zero history across display
>>>>>>> updates" but the counts still seem to accumulate (the total
>>>>>>> samples reported rises monotonically) and processes still show up
>>>>>>> in the display long after they have exited. Pressing `z' or `Z'
>>>>>>> seems to have no effect, either.
>>>>> Are you using the --tui or --stdio interface? Try with both and
>>>>> check if
>>>>> it works in one of them, I bet the problem is with --tui.
>>>> --stdio does the same, so I'll have to try updating my kernel like
>>>> Chulmin suggested (haven't had time to do that yet)
>>>
>>> The kernel has nothing to do with the feature. From builtin-top.c,
>>> this part is either not happening or more likely not happening
>>> correctly.
>>>
>>> if (top->zero)
>>> symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
>>> else
>>> symbol__annotate_decay_histogram(symbol, top->sym_evsel->idx);
>>>
>>> I recall it working recently - last year or so. Can you try
>>> different versions -- say 3.0, 3.2, 3.4 and latest? If you have a
>>> copy of Linus' tree or Arnaldo's git tree it should not take much time.
>> Chulmin says his 3.0 version works. My 3.2.18 doesn't. I don't have a
>> copy of the git tree on that machine, but I'll try building 3.4.x and
>> tip when I get a chance. I have never built perf-tools before,
>> though, so I'd appreciate tips on what might be different for
>> building perf-tools compared to the kernel, and how to avoid building
>> the standard kernel along the way. Hopefully it's just
>> configure-make-install?
>>
>
> How about checking your "top" version first?
>
> According to David's suggestion, it is the matter of top version.
>
> Mine was 3.2.8. (top --version).
>
>
Forget this message. My misunderstanding. :)
>
>
>> Regards,
>> Ryan
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 14:10 ` Ryan Johnson
2012-10-22 14:13 ` Chulmin Kim
@ 2012-10-22 14:45 ` Arnaldo Carvalho de Melo
2012-10-22 15:01 ` David Ahern
2012-10-22 16:04 ` Ryan Johnson
1 sibling, 2 replies; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-10-22 14:45 UTC (permalink / raw)
To: Ryan Johnson; +Cc: David Ahern, Chulmin Kim, linux-perf-users
Em Mon, Oct 22, 2012 at 10:10:25AM -0400, Ryan Johnson escreveu:
> On 22/10/2012 9:12 AM, David Ahern wrote:
> >The kernel has nothing to do with the feature. From builtin-top.c,
> >this part is either not happening or more likely not happening
> >correctly.
> >
> > if (top->zero)
> > symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
> > else
> > symbol__annotate_decay_histogram(symbol, top->sym_evsel->idx);
> >
> >I recall it working recently - last year or so. Can you try
> >different versions -- say 3.0, 3.2, 3.4 and latest? If you have a
> >copy of Linus' tree or Arnaldo's git tree it should not take much
> >time.
> Chulmin says his 3.0 version works. My 3.2.18 doesn't. I don't have
> a copy of the git tree on that machine, but I'll try building 3.4.x
> and tip when I get a chance. I have never built perf-tools before,
> though, so I'd appreciate tips on what might be different for
> building perf-tools compared to the kernel, and how to avoid
> building the standard kernel along the way. Hopefully it's just
> configure-make-install?
To build just the tools, on a /usr/src/linux or wherever you have the
newer kernel sources:
make -C tools/perf install
Then make sure you use what is in your ~/bin/ before the standard path:
export PATH=~/bin:$PATH
hash -r
Then try perf top -z again.
- Arnaldo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 14:45 ` Arnaldo Carvalho de Melo
@ 2012-10-22 15:01 ` David Ahern
2012-10-22 16:04 ` Ryan Johnson
1 sibling, 0 replies; 13+ messages in thread
From: David Ahern @ 2012-10-22 15:01 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ryan Johnson; +Cc: Chulmin Kim, linux-perf-users
On 10/22/12 8:45 AM, Arnaldo Carvalho de Melo wrote:
To add to Arnaldo's instructions, here's how to get a copy of his tree:
mkdir perf.git
cd perf.git
git init
git add remote acme git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
git remote update
git checkout remotes/acme/perf/core
mkdir /tmp/pbuild
make -C tools/perf O=/tmp/pbuild
/tmp/pbuild/perf top -z
To try out a different version:
git checkout v3.0
make -C tools/perf
or v3.2, v3.4, etc.
Building perf is fairly quick and you do not have to install them --
just run the built binary.
>
> To build just the tools, on a /usr/src/linux or wherever you have the
> newer kernel sources:
>
> make -C tools/perf install
>
> Then make sure you use what is in your ~/bin/ before the standard path:
>
> export PATH=~/bin:$PATH
> hash -r
>
> Then try perf top -z again.
>
> - Arnaldo
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 14:45 ` Arnaldo Carvalho de Melo
2012-10-22 15:01 ` David Ahern
@ 2012-10-22 16:04 ` Ryan Johnson
1 sibling, 0 replies; 13+ messages in thread
From: Ryan Johnson @ 2012-10-22 16:04 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: David Ahern, Chulmin Kim, linux-perf-users
On 22/10/2012 10:45 AM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Oct 22, 2012 at 10:10:25AM -0400, Ryan Johnson escreveu:
>> On 22/10/2012 9:12 AM, David Ahern wrote:
>>> The kernel has nothing to do with the feature. From builtin-top.c,
>>> this part is either not happening or more likely not happening
>>> correctly.
>>>
>>> if (top->zero)
>>> symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
>>> else
>>> symbol__annotate_decay_histogram(symbol, top->sym_evsel->idx);
>>>
>>> I recall it working recently - last year or so. Can you try
>>> different versions -- say 3.0, 3.2, 3.4 and latest? If you have a
>>> copy of Linus' tree or Arnaldo's git tree it should not take much
>>> time.
>> Chulmin says his 3.0 version works. My 3.2.18 doesn't. I don't have
>> a copy of the git tree on that machine, but I'll try building 3.4.x
>> and tip when I get a chance. I have never built perf-tools before,
>> though, so I'd appreciate tips on what might be different for
>> building perf-tools compared to the kernel, and how to avoid
>> building the standard kernel along the way. Hopefully it's just
>> configure-make-install?
> To build just the tools, on a /usr/src/linux or wherever you have the
> newer kernel sources:
>
> make -C tools/perf install
>
> Then make sure you use what is in your ~/bin/ before the standard path:
>
> export PATH=~/bin:$PATH
> hash -r
>
> Then try perf top -z again.
OK! That doesn't sound bad at all.
Thanks,
Ryan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-22 13:12 ` David Ahern
2012-10-22 14:10 ` Ryan Johnson
@ 2012-10-23 6:04 ` Namhyung Kim
2012-10-23 16:10 ` David Ahern
1 sibling, 1 reply; 13+ messages in thread
From: Namhyung Kim @ 2012-10-23 6:04 UTC (permalink / raw)
To: David Ahern
Cc: Ryan Johnson, Arnaldo Carvalho de Melo, Chulmin Kim,
linux-perf-users
On Mon, 22 Oct 2012 07:12:19 -0600, David Ahern wrote:
> On 10/22/12 5:50 AM, Ryan Johnson wrote:
>>>>> It seems that `perf top -z' does not behave as advertized, at
>>>>> least not on the 3.2.0-25 kernel (Ubuntu) that I'm running. The
>>>>> man page states that it should "zero history across display
>>>>> updates" but the counts still seem to accumulate (the total
>>>>> samples reported rises monotonically) and processes still show up
>>>>> in the display long after they have exited. Pressing `z' or `Z'
>>>>> seems to have no effect, either.
>>> Are you using the --tui or --stdio interface? Try with both and check if
>>> it works in one of them, I bet the problem is with --tui.
>> --stdio does the same, so I'll have to try updating my kernel like
>> Chulmin suggested (haven't had time to do that yet)
>
> The kernel has nothing to do with the feature. From builtin-top.c,
> this part is either not happening or more likely not happening
> correctly.
>
> if (top->zero)
> symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
> else
> symbol__annotate_decay_histogram(symbol, top->sym_evsel->idx);
Why symbol__annotate_zero_histogram only? AFAICS it only zeros sym_hist
not hist_entry so meaningful just for annotation, right?
Anyway, it's called iff top->sym_filter_entry is set. Not sure what's
the intended behavior of the -z switch..
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: perf top -z not working?
2012-10-23 6:04 ` Namhyung Kim
@ 2012-10-23 16:10 ` David Ahern
0 siblings, 0 replies; 13+ messages in thread
From: David Ahern @ 2012-10-23 16:10 UTC (permalink / raw)
To: Namhyung Kim, Ryan Johnson, Arnaldo Carvalho de Melo
Cc: Chulmin Kim, linux-perf-users
took a minute to bisect it this morning:
$ git bisect good
ab81f3fd350c510730adb1ca40ef55c2b2952121 is the first bad commit
commit ab81f3fd350c510730adb1ca40ef55c2b2952121
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Wed Oct 5 19:16:15 2011 -0300
perf top: Reuse the 'report' hist_entry/hists classes
This actually fixes several problems we had in the old 'perf top':
1. Unresolved symbols not show, limitation that came from the old
"KernelTop" codebase, to solve it we would need to do changes
that would make sym_entry have most of the hist_entry fields.
2. It was using the number of samples, not the sum of sample->period.
And brings the --sort code that allows us to have all the views in
'perf report', for instance:
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-10-23 16:10 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 12:26 perf top -z not working? Ryan Johnson
2012-10-17 13:49 ` Chulmin Kim
2012-10-22 1:46 ` Arnaldo Carvalho de Melo
2012-10-22 11:50 ` Ryan Johnson
2012-10-22 13:12 ` David Ahern
2012-10-22 14:10 ` Ryan Johnson
2012-10-22 14:13 ` Chulmin Kim
2012-10-22 14:15 ` Chulmin Kim
2012-10-22 14:45 ` Arnaldo Carvalho de Melo
2012-10-22 15:01 ` David Ahern
2012-10-22 16:04 ` Ryan Johnson
2012-10-23 6:04 ` Namhyung Kim
2012-10-23 16:10 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).