From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbcHAVrf (ORCPT ); Mon, 1 Aug 2016 17:47:35 -0400 Received: from smtprelay0227.hostedemail.com ([216.40.44.227]:33613 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752038AbcHAVrN (ORCPT ); Mon, 1 Aug 2016 17:47:13 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2892:2901:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:4321:5007:6120:6261:6742:7774:7875:7903:9010:10004:10400:10848:10903:10967:11232:11658:11914:12043:12296:12517:12519:12555:12663:12740:13069:13311:13357:13439:14096:14097:14181:14659:14721:14819:21080:30003:30029:30054:30070:30075:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: mice42_89e4205062050 X-Filterd-Recvd-Size: 3081 Date: Mon, 1 Aug 2016 17:45:46 -0400 From: Steven Rostedt To: Hari Bathini Cc: daniel@iogearbox.net, peterz@infradead.org, linux-kernel@vger.kernel.org, acme@kernel.org, alexander.shishkin@linux.intel.com, mingo@redhat.com, paulus@samba.org, ebiederm@xmission.com, kernel@kyup.com, viro@zeniv.linux.org.uk, aravinda@linux.vnet.ibm.com, ananth@in.ibm.com Subject: Re: [RFC PATCH v2 2/3] tracefs: add instances support for uprobe events Message-ID: <20160801174546.0453ab85@gandalf.local.home> In-Reply-To: <146965485827.23765.14920656474693831799.stgit@hbathini.in.ibm.com> References: <146965470618.23765.7329786743211962695.stgit@hbathini.in.ibm.com> <146965485827.23765.14920656474693831799.stgit@hbathini.in.ibm.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-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 Thu, 28 Jul 2016 02:57:38 +0530 Hari Bathini wrote: > If a uprobe event is set on a library function, and if a similar uprobe > event trace is needed for a container, a duplicate is created leaving > the uprobe list with multiple entries of the same function: > > $ perf probe --list > probe_libc:malloc (on 0x80490 in /lib64/libc.so.6) > probe_libc:malloc_1 (on __libc_malloc in /lib64/libc.so.6) > $ > > This can soon get out of hand if multiple containers want to probe the > same function/address in their libraries. This patch tries to resolve this > by adding uprobe event trace files to every new instance. Currently, perf > tool can leverage this by using --debugfs-dir option - something like > (assuming instance dir name is 'tracing'): > > $ perf --debugfs-dir=$MOUNT_PNT/instances probe /lib64/libc.so.6 malloc > $ > $ > $ perf --debugfs-dir=$MOUNT_PNT/instances probe --list > probe_libc:malloc (on __libc_malloc in /lib64/libc.so.6) > $ > > New uprobe events can be added to the uprobe_events file under the instance > directory and the profile information for these events will be available in > uprobe_profile file in the same instance directory. Hmm, this does change the behavior of normal instances. # cd /sys/kernel/debug/tracing # echo 'p /bin/bash:0x41adf0' > uprobe_events # ls events/uprobes enable filter p_bash_0x41adf0 # mkdir instances/foo # ls instances/foo/events/uprobes ls: cannot access instances/foo/events/uprobes: No such file or directory Usually, instances will have the same events as the top level directory. This will make uprobes, and only uprobes different. I'm not sure if this is a bad thing or not, I'll have to think about it more. But what would it take to have this only differ for containers, and not normal instances? -- Steve