From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754272AbbFQFbU (ORCPT ); Wed, 17 Jun 2015 01:31:20 -0400 Received: from mail4.hitachi.co.jp ([133.145.228.5]:44104 "EHLO mail4.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbbFQFbN (ORCPT ); Wed, 17 Jun 2015 01:31:13 -0400 Message-ID: <5581061B.8030701@hitachi.com> Date: Wed, 17 Jun 2015 14:31:07 +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: [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> In-Reply-To: <20150616144655.GE10374@kernel.org> 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 On 2015/06/16 23:46, Arnaldo Carvalho de Melo wrote: > Em Tue, Jun 16, 2015 at 08:50:57PM +0900, Masami Hiramatsu escreveu: >> When the last part of converted events are blacklisted or out-of-text, >> those are skipped and perf probe doesn't show usage examples. >> This fixes it to show the example even if the last part of event list >> is skipped. >> >> E.g. without this patch, events are added, but suddenly end; > > End what? Stop being added? "End without the last message", I meant. > I.e. not all eligible events are added? From > your description the problem seems to be that that last message: "You > can now use it..." is not presented, but here, without this patch, it > is: I see, actually, this happens only if the skipped symbols ( vfs_caches_init_early or vfs_caches_init) are placed at the end of the matched symbol list. On Ubuntu 15.04 kernel, it doesn't have vfs_load_quota_inode etc. and the vfs_caches_init is the last part of the matched list. Since it is hard to reproduce, I've added a Note on the end of description :) ---- >> >> Note that this can be reproduced ONLY IF the vfs_caches_init* >> is the last part of matched symbol list. I've checked this happens >> on "3.19.0-generic #18-Ubuntu" kernel binary. >> ---- To reproduce this bug, you need to find a good symbol matching pattern which (1) matches both of valid function in .text and invalid function in .inittext (2) invalid one must be on the end of matched function list. I fortunately hit such pattern and found this bug, but it depends on the kernel binary. [...] > 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... 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