From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>
Subject: [PATCH 3/6] perf top: Don't update total_period on process_sample
Date: Fri, 6 Jan 2012 19:16:01 -0200 [thread overview]
Message-ID: <1325884564-23322-4-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1325884564-23322-1-git-send-email-acme@infradead.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
It will be recalculated at __hists__output_resort, to take into account
filters possibly applied by the TUI, etc.
Since we do the percent math only for those entries that will appear on
the TUI instead of for _all_ the entries at decay time, updating it for
each sample makes the entries seem to decay faster when using the
navigation keys (since the screen will be refreshed), as we're not
coalescing the entries that are being batched to be merged at next
resort/decay time, but considering their periods.
Bug introduced in 743eb86.
Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-k0d0rq9a8nqtkqohov8cir72@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-top.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 4f81eeb..d89dec9 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -235,7 +235,6 @@ static struct hist_entry *perf_evsel__add_hist_entry(struct perf_evsel *evsel,
if (he == NULL)
return NULL;
- evsel->hists.stats.total_period += sample->period;
hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);
return he;
}
--
1.7.4.4
next prev parent reply other threads:[~2012-01-06 21:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 21:15 [GIT PULL 0/6] perf/core cleanups, fixes and improvements Arnaldo Carvalho de Melo
2012-01-06 21:15 ` [PATCH 1/6] perf hists: Rename total_session to total_period Arnaldo Carvalho de Melo
2012-01-06 21:16 ` [PATCH 2/6] perf hists: Stop using 'self' for struct hist_entry Arnaldo Carvalho de Melo
2012-01-06 21:16 ` Arnaldo Carvalho de Melo [this message]
2012-01-06 21:16 ` [PATCH 4/6] perf kvm: Do guest-only counting by default Arnaldo Carvalho de Melo
2012-01-06 21:16 ` [PATCH 5/6] perf tools: Add support for guest/host-only profiling Arnaldo Carvalho de Melo
2012-01-06 21:16 ` [PATCH 6/6] perf tools: Add const.h to MANIFEST to make perf-tar-src-pkg work again Arnaldo Carvalho de Melo
2012-01-08 11:37 ` [GIT PULL 0/6] perf/core cleanups, fixes and improvements Ingo Molnar
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=1325884564-23322-4-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--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
all inboxes | Powered by JetHome®