Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757052AbbFQPAw (ORCPT ); Wed, 17 Jun 2015 11:00:52 -0400 Received: from mail.kernel.org ([198.145.29.136]:45260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756320AbbFQPAv (ORCPT ); Wed, 17 Jun 2015 11:00:51 -0400 Date: Wed, 17 Jun 2015 12:00:45 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Naohiro Aota , Peter Zijlstra , Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Jiri Olsa , Ingo Molnar Subject: Re: Re: [PATCH perf/core v3 3/3] [BUGFIX] perf probe: Show usage even if the last event is skipped Message-ID: <20150617150045.GA3079@kernel.org> References: <20150616115050.19906.77371.stgit@localhost.localdomain> <20150616115057.19906.5502.stgit@localhost.localdomain> <20150616144655.GE10374@kernel.org> <5581061B.8030701@hitachi.com> <55818B0A.4030506@hitachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55818B0A.4030506@hitachi.com> 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 Content-Length: 2925 Lines: 75 Em Wed, Jun 17, 2015 at 11:58:18PM +0900, Masami Hiramatsu escreveu: > On 2015/06/17 14:31, Masami Hiramatsu wrote: > >> > I.e. the only problem I found was this: > >> > > >> > [root@zoo ~]# time perf probe -l > /dev/null > >> > > >> > real 0m15.408s > >> > user 0m14.892s > >> > sys 0m0.534s > >> > [root@zoo ~]# > >> > [root@zoo ~]# perf stat perf probe -l > /dev/null > >> > > >> > Performance counter stats for 'perf probe -l': > >> > > >> > 15256.588897 task-clock (msec) # 1.001 CPUs utilized > >> > 116 context-switches # 0.008 K/sec > >> > 4 cpu-migrations # 0.000 K/sec > >> > 230,720 page-faults # 0.015 M/sec > >> > 47,830,405,530 cycles # 3.135 GHz > >> > 43,974,134,505 stalled-cycles-frontend # 91.94% frontend cycles idle > >> > stalled-cycles-backend > >> > 11,540,587,038 instructions # 0.24 insns per cycle > >> > # 3.81 stalled cycles per insn > >> > 2,807,769,592 branches # 184.037 M/sec > >> > 20,087,075 branch-misses # 0.72% of all branches > >> > > >> > 15.240796324 seconds time elapsed > >> > > >> > [root@zoo ~]# > >> > > >> > Can you check why it takes so long and check the need for this patch? > > It is because perf probe -l is not optimized to show a lot of probes yet. > > It initializes and loads debuginfo for each probe. I guess we can reuse > > debuginfo among them. let me try... > > > > OK, I've ensured that's true, > > [root@localhost perf]# time ./perf probe -l &> /dev/null > > real 0m25.376s > user 0m24.381s > sys 0m1.012s > > [root@localhost perf]# time ./perf probe --no-dwarf -l &> /dev/null > > real 0m0.059s > user 0m0.039s > sys 0m0.020s > > (Note that --no-dwarf is my local patch for debugging, not sending yet) > > So, the problem is on the debuginfo processing. I've also fixed that > by caching the last used debuginfo. :) > > [root@localhost perf]# time ./perf probe -l &> /dev/null > > real 0m0.161s > user 0m0.136s > sys 0m0.025s > > I'll send the patch asap. Thanks! I really need to go thru builtin-probe.c looking at how it uses the symbol functions, to see what I can change in symbol*.[ch] to help it with its needs. Till then tho, please send the patch, that is a really great speedup! :-) - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/