From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760116AbcCDV62 (ORCPT ); Fri, 4 Mar 2016 16:58:28 -0500 Received: from mail.kernel.org ([198.145.29.136]:35433 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759087AbcCDV60 (ORCPT ); Fri, 4 Mar 2016 16:58:26 -0500 Date: Fri, 4 Mar 2016 18:58:22 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen , Stephane Eranian , Wang Nan Subject: Re: [PATCH v2 2/8] perf tools: Introduce perf_hpp__setup_hists_formats() Message-ID: <20160304215822.GZ3604@kernel.org> References: <1457103582-28396-1-git-send-email-namhyung@kernel.org> <1457103582-28396-3-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457103582-28396-3-git-send-email-namhyung@kernel.org> X-Url: http://acmel.wordpress.com 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 Em Fri, Mar 04, 2016 at 11:59:36PM +0900, Namhyung Kim escreveu: > The perf_hpp__setup_hists_formats() is to build hists-specific output > formats (and sort keys). Currently it's only used in order to build the > output format in a hierarchy with same sort keys, but it could be used > with different sort keys in non-hierarchy mode later. After applying this one: [root@jouet ~]# perf top --hierarchy # press 'q' to exit and get this: perf: Segmentation fault -------- backtrace -------- perf[0x54b60b] /lib64/libc.so.6(+0x34b20)[0x7fb7e06e9b20] perf[0x4e9780] perf(perf_evsel__delete+0x20)[0x498450] perf(perf_evlist__delete+0x182)[0x48fbe2] perf(cmd_top+0xc93)[0x440893] perf[0x481c01] perf(main+0x67a)[0x423dea] /lib64/libc.so.6(__libc_start_main+0xf0)[0x7fb7e06d5580] perf(_start+0x29)[0x423f09] [0x0] [root@jouet ~]# rebuild it with DEBUG=1, run it on gdb, press 'q' to exit 'perf top': (gdb) run top --stdio --hierarchy Program received signal SIGSEGV, Segmentation fault. 0x000000000051632b in hists_evsel__exit (evsel=0x19b95b0) at util/hist.c:2143 2143 perf_hpp_list__for_each_format_safe(&node->hpp, fmt, pos) { Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-19.fc23.x86_64 glibc-2.22-10.fc23.x86_64 libunwind-1.1-10.fc23.x86_64 nss-softokn-freebl-3.22.0-1.0.fc23.x86_64 numactl-libs-2.0.10-3.fc23.x86_64 perl-libs-5.22.1-350.fc23.x86_64 python-libs-2.7.10-8.fc23.x86_64 slang-2.3.0-4.fc23.x86_64 (gdb) bt #0 0x000000000051632b in hists_evsel__exit (evsel=0x19b95b0) at util/hist.c:2143 #1 0x00000000004b5a2c in perf_evsel__exit (evsel=0x19b95b0) at util/evsel.c:1094 #2 0x00000000004b5a6a in perf_evsel__delete (evsel=0x19b95b0) at util/evsel.c:1099 #3 0x00000000004adf5d in perf_evlist__purge (evlist=0x19b8b90) at util/evlist.c:115 #4 0x00000000004ae090 in perf_evlist__delete (evlist=0x19b8b90) at util/evlist.c:135 #5 0x0000000000446547 in cmd_top (argc=0, argv=0x7fffffffe310, prefix=0x0) at builtin-top.c:1346 #6 0x000000000049e614 in run_builtin (p=0x90f5e0 , argc=3, argv=0x7fffffffe310) at perf.c:390 #7 0x000000000049e87c in handle_internal_command (argc=3, argv=0x7fffffffe310) at perf.c:451 #8 0x000000000049e9c1 in run_argv (argcp=0x7fffffffe16c, argv=0x7fffffffe160) at perf.c:497 #9 0x000000000049ed67 in main (argc=3, argv=0x7fffffffe310) at perf.c:624 (gdb)