public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	"mingo\@elte.hu" <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [BUG] perf top: -z option does not work
Date: Tue, 12 Aug 2014 17:09:17 +0900	[thread overview]
Message-ID: <878umuf7te.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <CABPqkBRqqz6dEYuFvJL4M+p2h-m0P09h4fDVq6-f8fZJq6NSCA@mail.gmail.com> (Stephane Eranian's message of "Tue, 12 Aug 2014 06:44:34 +0200")

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

  reply	other threads:[~2014-08-12  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12  4:44 [BUG] perf top: -z option does not work Stephane Eranian
2014-08-12  8:09 ` Namhyung Kim [this message]
2014-08-12 12:24   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878umuf7te.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox