Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933240AbZJLVfo (ORCPT ); Mon, 12 Oct 2009 17:35:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932469AbZJLVfn (ORCPT ); Mon, 12 Oct 2009 17:35:43 -0400 Received: from ey-out-2122.google.com ([74.125.78.25]:2243 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932204AbZJLVfm (ORCPT ); Mon, 12 Oct 2009 17:35:42 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=RrO8l35OQg4XIWCcrsEh+jua5aEqINYMS8/JQg/mPVwec9YhUcp2OllJMbAW5X4ehd vxLdBtYCo8lxgpK81MtQDL30Re6pn2IEhaG+MAthwI+O6xAiwpfT/ER/fSl4q0XqWqOE m/UxzrFUyb1sUza/KnrZ/EzQWYeOCpxbUVqu0= Date: Mon, 12 Oct 2009 23:34:30 +0200 From: Frederic Weisbecker To: Masami Hiramatsu 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 3/7] tracing/kprobes: Rename special variables Message-ID: <20091012213429.GF4748@nowhere> References: <20091007222733.1684.32035.stgit@dhcp-100-2-132.bos.redhat.com> <20091007222759.1684.3319.stgit@dhcp-100-2-132.bos.redhat.com> <4AD39D89.6070609@redhat.com> <20091012212824.GE4748@nowhere> <4AD3A178.2080903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AD3A178.2080903@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2087 Lines: 64 On Mon, Oct 12, 2009 at 05:36:56PM -0400, Masami Hiramatsu wrote: > Frederic Weisbecker wrote: >> On Mon, Oct 12, 2009 at 05:20:09PM -0400, Masami Hiramatsu wrote: >>> Masami Hiramatsu wrote: >>>> @@ -427,28 +427,17 @@ static int parse_probe_vars(char *arg, struct fetch_func *ff, int is_return) >>>> int ret = 0; >>>> unsigned long param; >>>> >>>> - switch (arg[0]) { >>>> - case 'a': /* argument */ >>>> - ret = strict_strtoul(arg + 1, 10,¶m); >>>> - if (ret || param> PARAM_MAX_ARGS) >>>> - ret = -EINVAL; >>>> - else { >>>> - ff->func = fetch_argument; >>>> - ff->data = (void *)param; >>>> - } >>>> - break; >>>> - case 'r': /* retval or retaddr */ >>>> - if (is_return&& arg[1] == 'v') { >>>> + if (strcmp(arg, "retval") == 0) { >>>> + if (is_return) { >>>> ff->func = fetch_retvalue; >>>> ff->data = NULL; >>>> } else >>>> ret = -EINVAL; >>>> - break; >>>> - case 's': /* stack */ >>>> - if (arg[1] == 'a') { >>>> + } else if (strncmp(arg, "stack", 5) == 0) { >>>> + if (arg[5] == '\0') { >>>> ff->func = fetch_stack_address; >>>> ff->data = NULL; >>>> - } else { >>>> + } else if (isdigit(arg[5])) { >>>> ret = strict_strtoul(arg + 1, 10,¶m); >>> ^^^^^^^ this should be arg + 5. >>> >>>> @@ -456,11 +445,18 @@ static int parse_probe_vars(char *arg, struct fetch_func *ff, int is_return) >>>> ff->func = fetch_stack; >>>> ff->data = (void *)param; >>>> } >>>> + } else >>>> + ret = -EINVAL; >>>> + } else if (strncmp(arg, "arg", 3) == 0&& isdigit(arg[4])) { >> >> >> >> And this should be isdigit(arg[3]) actually, what you want to test is the >> first character after arg, right? > > Right. I'll fix it... > > > Thank you, No need to, I've rebased and pushed to the same tree :-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/