public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	systemtap <systemtap@sources.redhat.com>,
	DLE <dle-develop@lists.sourceforge.net>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Mike Galbraith <efault@gmx.de>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH -tip v3 04/10] perf probe: Query basic types from debuginfo
Date: Mon, 12 Apr 2010 14:45:08 -0300	[thread overview]
Message-ID: <20100412174508.GC6750@ghostprotocols.net> (raw)
In-Reply-To: <20100412171715.3790.23730.stgit@localhost6.localdomain6>

Em Mon, Apr 12, 2010 at 01:17:15PM -0400, Masami Hiramatsu escreveu:
> Query the basic type information (byte-size and signed-flag) from
> debuginfo and pass that to kprobe-tracer. This is especially useful
> for tracing the members of data structure, because each member has
> different byte-size on the memory.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> 
>  tools/perf/util/probe-event.c  |    9 +++++
>  tools/perf/util/probe-event.h  |    1 +
>  tools/perf/util/probe-finder.c |   78 ++++++++++++++++++++++++++++++++++++----
>  3 files changed, 80 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 19de8b7..05ca4a9 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -740,6 +740,13 @@ static int synthesize_kprobe_trace_arg(struct kprobe_trace_arg *arg,
>  		buf += ret;
>  		buflen -= ret;
>  	}
> +	/* Print argument type */
> +	if (arg->type) {
> +		ret = e_snprintf(buf, buflen, ":%s", arg->type);
> +		if (ret <= 0)
> +			return ret;
> +		buf += ret;
> +	}
>  
>  	return buf - tmp;
>  }
> @@ -848,6 +855,8 @@ void clear_kprobe_trace_event(struct kprobe_trace_event *tev)
>  			free(tev->args[i].name);
>  		if (tev->args[i].value)
>  			free(tev->args[i].value);
> +		if (tev->args[i].type)
> +			free(tev->args[i].type);

It follows the existing style but as kfree, free() also can cope with
NULL pointers, so unconditionally calling free is a shorter form, but
this can be fixed later, possibily in a big cleanup in all of
tools/perf.

- Arnaldo

  reply	other threads:[~2010-04-12 17:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12 17:16 [PATCH -tip v3 00/10] perf-probe updates - data-structure support improvements, etc Masami Hiramatsu
2010-04-12 17:16 ` [PATCH -tip v3 01/10] perf probe: Support argument name Masami Hiramatsu
2010-04-15  7:27   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 02/10] perf probe: Use the last field name as the " Masami Hiramatsu
2010-04-15  7:28   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 03/10] tracing/kprobes: Support basic types on dynamic events Masami Hiramatsu
2010-04-15  7:28   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 04/10] perf probe: Query basic types from debuginfo Masami Hiramatsu
2010-04-12 17:45   ` Arnaldo Carvalho de Melo [this message]
2010-04-15  7:28   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 05/10] perf probe: Support basic type casting Masami Hiramatsu
2010-04-15  7:29   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 06/10] perf probe: Support DW_OP_call_frame_cfa in debuginfo Masami Hiramatsu
2010-04-15  7:29   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-05-07 16:34     ` Robert Richter
2010-05-07 17:16       ` Masami Hiramatsu
2010-05-07 18:31         ` Arnaldo Carvalho de Melo
2010-05-07 19:12           ` Masami Hiramatsu
2010-05-07 19:47             ` Masami Hiramatsu
2010-05-07 20:04               ` Robert Richter
2010-04-12 17:17 ` [PATCH -tip v3 07/10] perf probe: Remove die() from probe-finder code Masami Hiramatsu
2010-04-15  7:29   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 08/10] perf probe: Remove die() from probe-event code Masami Hiramatsu
2010-04-15  7:29   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 09/10] perf probe: Remove xzalloc() from util/probe-{event, finder}.c Masami Hiramatsu
2010-04-15  7:30   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:17 ` [PATCH -tip v3 10/10] perf probe: Remove xstrdup()/xstrndup() " Masami Hiramatsu
2010-04-15  7:30   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-12 17:49 ` [PATCH -tip v3 00/10] perf-probe updates - data-structure support improvements, etc Arnaldo Carvalho de Melo
2010-04-13  9:14   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100412174508.GC6750@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox