Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1339778

[PATCH 07/15] perf tools: Fix assertion failure on dynamic entry

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 07/15] perf tools: Fix assertion failure on dynamic entry
Date 2016-02-22 19:10 +0100
Message-ID <r535N-1j6-51@gated-at.bofh.it> (permalink)
References <r535L-1j6-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Namhyung Kim <namhyung@kernel.org>

The dynamic entry is created for each field in a tracepoint event.
Since they have no fixed hpp format index, it should skip when
perf_hpp__reset_width() is called.

This caused following assertion failure..

  $ perf record -e sched:sched_switch -a sleep 1

  $ perf report -s comm,next_pid --stdio
  perf: ui/hist.c:651: perf_hpp__reset_width:
    Assertion `!(fmt->idx >= PERF_HPP__MAX_INDEX)' failed.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1456064558-13086-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/hist.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index 1ba4117d9c2d..12223d791e9f 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -645,6 +645,9 @@ void perf_hpp__reset_width(struct perf_hpp_fmt *fmt, struct hists *hists)
 	if (perf_hpp__is_sort_entry(fmt))
 		return perf_hpp__reset_sort_width(fmt, hists);
 
+	if (perf_hpp__is_dynamic_entry(fmt))
+		return;
+
 	BUG_ON(fmt->idx >= PERF_HPP__MAX_INDEX);
 
 	switch (fmt->idx) {
-- 
2.5.0

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/15] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-22 19:10 +0100
  [PATCH 12/15] perf tools: Support setting different slots in a BPF map separately Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-22 19:10 +0100
  [PATCH 11/15] perf tools: Enable passing event to BPF object Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-22 19:10 +0100
  [PATCH 07/15] perf tools: Fix assertion failure on dynamic entry Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-22 19:10 +0100
  [PATCH 03/15] perf tools: Fix segfault on dynamic entries Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-22 19:10 +0100
  [PATCH 15/15] perf tools: Introduce bpf-output event Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-22 19:10 +0100
  Re: [GIT PULL 00/15] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-02-24 08:30 +0100

csiph-web