Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756959AbbFQO62 (ORCPT ); Wed, 17 Jun 2015 10:58:28 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:44059 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755431AbbFQO61 (ORCPT ); Wed, 17 Jun 2015 10:58:27 -0400 Message-ID: <55818B0A.4030506@hitachi.com> Date: Wed, 17 Jun 2015 23:58:18 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo 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 References: <20150616115050.19906.77371.stgit@localhost.localdomain> <20150616115057.19906.5502.stgit@localhost.localdomain> <20150616144655.GE10374@kernel.org> <5581061B.8030701@hitachi.com> In-Reply-To: <5581061B.8030701@hitachi.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2727 Lines: 75 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. Thank you! -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- 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/