Skip to content

Commit dd42baf

Browse files
namhyungacmel
authored andcommitted
perf tools: Fix assertion failure on dynamic entry
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>
1 parent 0c0af78 commit dd42baf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎tools/perf/ui/hist.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,9 @@ void perf_hpp__reset_width(struct perf_hpp_fmt *fmt, struct hists *hists)
645645
if (perf_hpp__is_sort_entry(fmt))
646646
return perf_hpp__reset_sort_width(fmt, hists);
647647

648+
if (perf_hpp__is_dynamic_entry(fmt))
649+
return;
650+
648651
BUG_ON(fmt->idx >= PERF_HPP__MAX_INDEX);
649652

650653
switch (fmt->idx) {

0 commit comments

Comments
 (0)