From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26677 invoked by alias); 8 Nov 2014 04:15:47 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 26667 invoked by uid 89); 8 Nov 2014 04:15:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail4.hitachi.co.jp Received: from mail4.hitachi.co.jp (HELO mail4.hitachi.co.jp) (133.145.228.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Nov 2014 04:15:44 +0000 Received: from mlsv2.hitachi.co.jp (unknown [133.144.234.166]) by mail4.hitachi.co.jp (Postfix) with ESMTP id 6859C33CC2; Sat, 8 Nov 2014 13:15:41 +0900 (JST) Received: from mfilter05.hitachi.co.jp by mlsv2.hitachi.co.jp (8.13.1/8.13.1) id sA84Ffw5014133; Sat, 8 Nov 2014 13:15:41 +0900 Received: from vshuts04.hitachi.co.jp (vshuts04.hitachi.co.jp [10.201.6.86]) by mfilter05.hitachi.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id sA84Fe8e018161; Sat, 8 Nov 2014 13:15:40 +0900 Received: from gxml20a.ad.clb.hitachi.co.jp (unknown [158.213.157.160]) by vshuts04.hitachi.co.jp (Postfix) with ESMTP id AB17B14004C; Sat, 8 Nov 2014 13:15:39 +0900 (JST) Received: from [10.198.220.44] by gxml20a.ad.clb.hitachi.co.jp (Switch-3.1.10/Switch-3.1.9) id 6A841F35M00006B04; Sat, 08 Nov 2014 13:15:39 +0900 Message-ID: <545D98E7.3070006@hitachi.com> Date: Sat, 08 Nov 2014 04:15:00 -0000 From: Masami Hiramatsu User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Hemant Kumar Cc: Namhyung Kim , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, srikar@linux.vnet.ibm.com, peterz@infradead.org, oleg@redhat.com, hegdevasant@linux.vnet.ibm.com, mingo@redhat.com, systemtap@sourceware.org, aravinda@linux.vnet.ibm.com, penberg@iki.fi, brendan.d.gregg@gmail.com, "yrl.pp-manager.tt@hitachi.com" Subject: Re: [RFC] perf-cache command interface design References: <20141102105006.21708.28734.stgit@hemant-fedora> <20141102105557.21708.19032.stgit@hemant-fedora> <87lhnr5sbl.fsf@sejong.aot.lge.com> <54588905.7040002@linux.vnet.ibm.com> <5458CD15.4010101@hitachi.com> <874muew2hk.fsf@sejong.aot.lge.com> <5459E865.6050207@hitachi.com> <545B1DDE.9000202@linux.vnet.ibm.com> <545C80F4.4020905@hitachi.com> <545CA436.8030306@linux.vnet.ibm.com> In-Reply-To: <545CA436.8030306@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-q4/txt/msg00126.txt.bz2 (2014/11/07 19:51), Hemant Kumar wrote: >> >> File Format >> =========== >> All the cache files are placed under ~/.debug/ by default. >> The paths of buildid cache of binary/symbols are not changed. >> >> The SDT/probe caches are placed under the ~/.debug/.probes/path/to/bin/bu/ildid >> and that is linked to ~/.debug/.probes/.buildid/bu/ildid >> # To avoid conflict with files under /probes/*, I picked up .probes/. >> >> This SDT/probe caches contain probe-definitions as following format. >> ---- >> #buildid:BUILDID >> #path:PATH >> p:%PROVIDER/EVENT PATH:OFFSET [ARGS] > > I think this format isn't accepted by the uprobe_events file (because of > the '%') if we want to cat and grep into uprobe_events file directly. > Although, in case of perf record, we can process it to remove '%' and > then write into uprobe_events file. And, '%' is required as a flag for > the SDT entries. Ah, right... > So, either we can modify the uprobe_events file to ignore '%' in the > event group name (with an additional patch in the SDT series) or we can > leave it to the user to write a script which can do some processing to > remove '%' and then echo it to uprobe_events file. > What would you think? Hmm, ok. I think we can unify SDT and probe cache as just an cached event. So replacing % with probe_ prefix is OK I think. What I mean is if you add a file to cache, perf adds SDTs in the file, and if you add a file with some expressions, like '* $params', perf also adds probe caches. And you can use both events for not only tracing but also profiling. e.g. perf cache --add /bin/foo # add foo's SDTs perf cache --add /bin/foo --probe 'foofunc $params' # add a probe cache for foofunc perf record -e %foo:sdtevent -e %foo:foofunc ... # we can record both SDT and cache So, % prefix means "recall cached probe/sdt events to record if needed". If you already set up the probe-events on those, you don't need % as below. perf probe --add "%foo:sdtevent" # add new probe_foo:sdtevent for %foo:sdtevent perf record -e probe_foo:sdtevent ... Note that to avoid crash with existing event groups, we'll add "probe_" prefix for cached events. Thank you, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Research Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com