From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19218 invoked by alias); 8 Oct 2013 12:54:16 -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 19210 invoked by uid 89); 8 Oct 2013 12:54:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e23smtp02.au.ibm.com Received: from e23smtp02.au.ibm.com (HELO e23smtp02.au.ibm.com) (202.81.31.144) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 08 Oct 2013 12:54:14 +0000 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Oct 2013 22:54:08 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp02.au.ibm.com (202.81.31.208) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 8 Oct 2013 22:54:07 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 1FA352BB0053 for ; Tue, 8 Oct 2013 23:54:06 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r98CbAKP45744360 for ; Tue, 8 Oct 2013 23:37:10 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r98Cs4XV026702 for ; Tue, 8 Oct 2013 23:54:05 +1100 Received: from localhost.localdomain ([9.79.222.54]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r98Cruxm026553; Tue, 8 Oct 2013 23:53:59 +1100 Message-ID: <5254005F.4010103@linux.vnet.ibm.com> Date: Tue, 08 Oct 2013 12:54:00 -0000 From: Hemant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Masami Hiramatsu CC: linux-kernel@vger.kernel.org, srikar@linux.vnet.ibm.com, peterz@infradead.org, oleg@redhat.com, hegdevasant@linux.vnet.ibm.com, mingo@redhat.com, anton@redhat.com, systemtap@sourceware.org, namhyung@kernel.org, aravinda@linux.vnet.ibm.com Subject: Re: [PATCH v2 0/3] Perf support to SDT markers References: <20131007063911.11693.33624.stgit@hemant-fedora> <5253A04E.4020809@hitachi.com> In-Reply-To: <5253A04E.4020809@hitachi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13100812-5490-0000-0000-00000446F52A X-SW-Source: 2013-q4/txt/msg00027.txt.bz2 On 10/08/2013 11:33 AM, Masami Hiramatsu wrote: > Hi, Hi Masami and thanks a lot for testing these patches. > > (2013/10/07 15:46), Hemant Kumar wrote: >> This patchset helps in probing dtrace style markers(SDT) present in user space >> applications through perf. Notes/markes are placed at important places by the >> developers. They have a negligible overhead when not enabled. We can enable >> them and probe at these places and find some important information like the >> arguments' values, etc. > Thank you for updating! > By the way, could you rebase this series to the latest -tip kernel next time? > It is more convenient for us to test & merge it. Yes, I will rebase this series next time. > > [...] >> - Now use perf to list the markers in the app: >> # perf probe --markers -x ./user_app >> >> %user_app:foo_start >> %user_app:fun_start > Here, what I got. > > $ ./perf probe --markers -x /lib64/librt.so > %librt:lll_futex_wake > > OK, it lists up markers. > > $ ./perf probe --markers -x ./perf > SDT markers not present! > Error : Failed to find SDT markers!(-1) > > OK, this shows an error, INHO, it'd better show which binary doesn't have markers. OK, will include the binary name too. > > $ ./perf probe --markers > Failed to open (null) > Error : Failed to find SDT markers!(-1) > > Hmm, it's a bit odd error. It should check if there is an elf binary is specified. Yeah, correct. > > $ ./perf probe --markers /lib64/librt.so > %librt:lll_futex_wake > > It seems to work without -x. However, that is only when the path is started with /. > And also the usage is not described by --help. > > $ ./perf probe --markers ./perf > Semantic error :File always requires line number or lazy pattern. > Error: Parse Error. (-22) > > So, to avoid confusion, --markers should abort without -x(--exec) option. Yes, we can restrict action of --markers for -x option only. I thought of keeping the same behavior as in case of function listing but I guess restricting it would be better since, --markers should only be available in user space. > >> - And then use perf probe to add a probe point : >> >> # perf probe -x ./user_app -a '%user_app:foo_start' > And also, without -x, -a also exits with an odd error message. > > $ ./perf probe -a %libm:slowexp_p6 > Failed to open (null) > Error: Failed to add events. (-1) Ok, will rectify this behavior. > > I'll review each patch soon. Thanks, looking forward to that. - Hemant