From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754797AbbI3WDX (ORCPT ); Wed, 30 Sep 2015 18:03:23 -0400 Received: from mail.kernel.org ([198.145.29.136]:39414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754572AbbI3WDT (ORCPT ); Wed, 30 Sep 2015 18:03:19 -0400 Date: Wed, 30 Sep 2015 19:03:15 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Kan Liang Subject: Re: [PATCH] perf report: Fix a bug on "--call-graph none" option Message-ID: <20150930220315.GN1944@kernel.org> References: <1443587640-24242-1-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443587640-24242-1-git-send-email-namhyung@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Sep 30, 2015 at 01:34:00PM +0900, Namhyung Kim escreveu: > The patch f9db0d0f1b2c ("perf callchain: Allow disabling call graphs > per event") added an ability to enable/disable callchain recording per > event. But it had a problem when the enablement setting is changed at > 'perf report' time using -g/--call-graph option. > > For example, the following scenario will get a segfault. > > $ perf record -ag sleep 1 > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.500 MB perf.data (2555 samples) ] > > $ perf report -g none > perf: Segmentation fault > -------- backtrace -------- > perf[0x53a98a] > /usr/lib/libc.so.6(+0x335af)[0x7f4e91df95af] > > This is because callchain_param.sort() callback was not set but it > tried to call the function as it had the PERF_SAMPLE_CALLCHAIN bit. Thanks, reproduced, tested the fix, applied. - Arnaldo