From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17395 invoked by alias); 12 Oct 2009 20:18:19 -0000 Received: (qmail 17383 invoked by uid 22791); 12 Oct 2009 20:18:18 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Oct 2009 20:18:13 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9CKICK1025272 for ; Mon, 12 Oct 2009 16:18:12 -0400 Received: from [10.16.2.46] (dhcp-100-2-46.bos.redhat.com [10.16.2.46]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9CKI8pV027520; Mon, 12 Oct 2009 16:18:09 -0400 Message-ID: <4AD39002.2080907@redhat.com> Date: Mon, 12 Oct 2009 20:18:00 -0000 From: Masami Hiramatsu User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: Frederic Weisbecker CC: Steven Rostedt , Ingo Molnar , lkml , systemtap , DLE , Thomas Gleixner , Arnaldo Carvalho de Melo , Mike Galbraith , Paul Mackerras , Peter Zijlstra , Christoph Hellwig , Ananth N Mavinakayanahalli , Jim Keniston , "Frank Ch. Eigler" Subject: Re: [PATCH tracing/kprobes v3 4/7] tracing/kprobes: Avoid field name confliction References: <20091007222733.1684.32035.stgit@dhcp-100-2-132.bos.redhat.com> <20091007222807.1684.26880.stgit@dhcp-100-2-132.bos.redhat.com> <20091012173752.GB5059@nowhere> <4AD37FEF.9050807@redhat.com> <20091012194852.GB4748@nowhere> In-Reply-To: <20091012194852.GB4748@nowhere> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2009-q4/txt/msg00136.txt.bz2 Frederic Weisbecker wrote: > On Mon, Oct 12, 2009 at 03:13:51PM -0400, Masami Hiramatsu wrote: >> Frederic Weisbecker wrote: >>> The conflict issue might not be obvious for a user desperately trying to set >>> a kprobe. Even for other failcases, it might not be obvious (blacklisted >>> symbols, syntax errors...) >>> >>> May be should you improve the error granularity and print a KERN_DEBUG >>> message? >> >> Agreed, and kprobes error handling should be improved too (in the most cases, >> it just returns -EINVAL). >> >> Thank you. >> > > > And btw, I'm enable to create a probe, neither through ftrace nor perf: > > $ sudo ./perf probe -P 'p:sys_close sys_close $retval' > Adding new event: p:sys_close sys_close+0 $retval > > Error: Failed to create event: Invalid argument > > > # echo 'p:sys_open sys_open $retval'> /debug/tracing/kprobe_events > bash: echo: write error : Invalid argument > > I suspect I missed something very obvious with the syntax :) Ah, only kretprobe events can use $retval :-) So, you should specify 'r' instead of 'p'. -P 'r:sys_close sys_close $retval' > I've applied your patches in: > > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git > tracing/kprobes > > Thanks. Thank you! -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America), Inc. Software Solutions Division e-mail: mhiramat@redhat.com