linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/1] perf/core fix
@ 2011-10-27 14:08 Arnaldo Carvalho de Melo
  2011-10-27 14:08 ` [PATCH 1/1] perf hists: Fix recalculation of total_period when sorting entries Arnaldo Carvalho de Melo
  2011-10-27 15:18 ` [GIT PULL 0/1] perf/core fix Ingo Molnar
  0 siblings, 2 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-10-27 14:08 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, arnaldo.melo

Hi Ingo,

        Please consider pulling from:

git://github.com/acmel/linux.git perf/core

Regards,

- Arnaldo

Arnaldo Carvalho de Melo (1):
  perf hists: Fix recalculation of total_period when sorting entries

 tools/perf/util/hist.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] perf hists: Fix recalculation of total_period when sorting entries
  2011-10-27 14:08 [GIT PULL 0/1] perf/core fix Arnaldo Carvalho de Melo
@ 2011-10-27 14:08 ` Arnaldo Carvalho de Melo
  2011-10-27 15:18 ` [GIT PULL 0/1] perf/core fix Ingo Molnar
  1 sibling, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-10-27 14:08 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

We were doing parts of it in hists__collapse_resort and parts of it in
hists__output_resort, leading to a bogus total_period.

Fix it by doing just the filtering operation when collapsing because
there we know that the Zoom operations adds filters just  what is in
hists->entries, not to the new batch of entries being collapsed.

And move all the nr_entries + total_period recalculation to
hists__output_resort since we will traverse all entries anyway there.

Problem introduced when developing threaded addition of new batches
of hist_entries, i.e. post v3.1.

Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
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-8xyh165h7hmwy0696hu25en6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/hist.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index f6a9939..a36a3fa 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -365,7 +365,6 @@ static void __hists__collapse_resort(struct hists *hists, bool threaded)
 
 	root = hists__get_rotate_entries_in(hists);
 	next = rb_first(root);
-	hists->stats.total_period = 0;
 
 	while (next) {
 		n = rb_entry(next, struct hist_entry, rb_node_in);
@@ -379,7 +378,6 @@ static void __hists__collapse_resort(struct hists *hists, bool threaded)
 			 * been set by, say, the hist_browser.
 			 */
 			hists__apply_filters(hists, n);
-			hists__inc_nr_entries(hists, n);
 		}
 	}
 }
@@ -442,6 +440,7 @@ static void __hists__output_resort(struct hists *hists, bool threaded)
 	hists->entries = RB_ROOT;
 
 	hists->nr_entries = 0;
+	hists->stats.total_period = 0;
 	hists__reset_col_len(hists);
 
 	while (next) {
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [GIT PULL 0/1] perf/core fix
  2011-10-27 14:08 [GIT PULL 0/1] perf/core fix Arnaldo Carvalho de Melo
  2011-10-27 14:08 ` [PATCH 1/1] perf hists: Fix recalculation of total_period when sorting entries Arnaldo Carvalho de Melo
@ 2011-10-27 15:18 ` Ingo Molnar
  1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2011-10-27 15:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian, arnaldo.melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
>         Please consider pulling from:
> 
> git://github.com/acmel/linux.git perf/core
> 
> Regards,
> 
> - Arnaldo
> 
> Arnaldo Carvalho de Melo (1):
>   perf hists: Fix recalculation of total_period when sorting entries
> 
>  tools/perf/util/hist.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [GIT PULL 0/1] perf/core fix
@ 2012-05-24  1:08 Arnaldo Carvalho de Melo
  2012-05-24 10:29 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-05-24  1:08 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, arnaldo.melo,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please pull,

- Arnaldo

The following changes since commit ab0cce560ef177bdc7a8f73e9962be9d829a7b2c:

  Revert "sched, perf: Use a single callback into the scheduler" (2012-05-23 17:40:51 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/core

for you to fetch changes up to a1d44b9acdf7b2820ef762846150b4d13b84e075:

  perf evlist: Explicititely initialize input_name (2012-05-23 21:47:51 -0300)

----------------------------------------------------------------
Fix perf evlist uninitialized local variable

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      perf evlist: Explicititely initialize input_name

 tools/perf/builtin-evlist.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL 0/1] perf/core fix
  2012-05-24  1:08 Arnaldo Carvalho de Melo
@ 2012-05-24 10:29 ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2012-05-24 10:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	arnaldo.melo, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	Please pull,
> 
> - Arnaldo
> 
> The following changes since commit ab0cce560ef177bdc7a8f73e9962be9d829a7b2c:
> 
>   Revert "sched, perf: Use a single callback into the scheduler" (2012-05-23 17:40:51 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/core
> 
> for you to fetch changes up to a1d44b9acdf7b2820ef762846150b4d13b84e075:
> 
>   perf evlist: Explicititely initialize input_name (2012-05-23 21:47:51 -0300)
> 
> ----------------------------------------------------------------
> Fix perf evlist uninitialized local variable
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (1):
>       perf evlist: Explicititely initialize input_name
> 
>  tools/perf/builtin-evlist.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Pulled, thanks Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-24 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-27 14:08 [GIT PULL 0/1] perf/core fix Arnaldo Carvalho de Melo
2011-10-27 14:08 ` [PATCH 1/1] perf hists: Fix recalculation of total_period when sorting entries Arnaldo Carvalho de Melo
2011-10-27 15:18 ` [GIT PULL 0/1] perf/core fix Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2012-05-24  1:08 Arnaldo Carvalho de Melo
2012-05-24 10:29 ` Ingo Molnar

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).