From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbcGECIR (ORCPT ); Mon, 4 Jul 2016 22:08:17 -0400 Received: from mail.kernel.org ([198.145.29.136]:44636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751240AbcGECIQ (ORCPT ); Mon, 4 Jul 2016 22:08:16 -0400 Date: Tue, 5 Jul 2016 11:08:10 +0900 From: Masami Hiramatsu To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Namhyung Kim , Peter Zijlstra , Ingo Molnar , Hemant Kumar , Ananth N Mavinakayanahalli , Brendan Gregg Subject: Re: [PATCH perf/core v13 06/15] perf buildid-cache: Scan and import user SDT events to probe cache Message-Id: <20160705110810.ff660dea69632954ae87643b@kernel.org> In-Reply-To: <20160701182201.GP5324@kernel.org> References: <146736018054.27797.14439910564760436056.stgit@devbox> <146736025058.27797.13043265488541434502.stgit@devbox> <20160701182201.GP5324@kernel.org> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 1 Jul 2016 15:22:01 -0300 Arnaldo Carvalho de Melo wrote: > Em Fri, Jul 01, 2016 at 05:04:10PM +0900, Masami Hiramatsu escreveu: > > From: Masami Hiramatsu > > > > perf buildid-cache --add scans given binary and add > > the SDT events to probe cache. "sdt_" prefix is appended for > > all SDT providers to avoid event-name clash with other pre-defined > > events. It is possible to use the cached SDT events as other cached > > events, via perf probe --add "sdt_:=". > > > > e.g. > > ---- > > # perf buildid-cache --add /lib/libc-2.17.so > > # perf probe --cache --list | head -n 5 > > /usr/lib/libc-2.17.so (a6fb821bdf53660eb2c29f778757aef294d3d392): > > sdt_libc:setjmp=setjmp > > sdt_libc:longjmp=longjmp > > sdt_libc:longjmp_target=longjmp_target > > sdt_libc:memory_heap_new=memory_heap_new > > # perf probe -x /usr/lib/libc-2.17.so \ > > -a sdt_libc:memory_heap_new=memory_heap_new > > Why not remove the need for that build-cache --add? I.e. go straight to: > > perf probe -x /usr/lib/libc-2.17.so -a sdt_libc:memory_heap_new=memory_heap_new > > And all the various steps above be done automagically? Ah, this has been done :) Yes, you can do that already. See commit dd975497ad ("perf probe: Introduce perf_cache interfaces") which introduces probe cache and it automatically add the target binary to the buildid-cache. Thank you, -- Masami Hiramatsu