From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752629AbcBURiB (ORCPT ); Sun, 21 Feb 2016 12:38:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47472 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbcBURhg (ORCPT ); Sun, 21 Feb 2016 12:37:36 -0500 Date: Sun, 21 Feb 2016 18:37:32 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen Subject: Re: [PATCH 1/5] perf tools: Fix assertion failure on dynamic entry Message-ID: <20160221173732.GF10701@krava.homerouter.cpe> References: <1456064558-13086-1-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1456064558-13086-1-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 21, 2016 at 11:22:34PM +0900, Namhyung Kim wrote: > 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 Acked-by: Jiri Olsa thanks, jirka > --- > 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.7.1 >