All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <srostedt@redhat.com>
To: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>,
	Tom Zanussi <tzanussi@gmail.com>
Subject: Re: [PATCH 1/2] Does raw_field_ptr() supports __data_loc?
Date: Mon, 07 Dec 2009 11:09:18 -0500	[thread overview]
Message-ID: <1260202158.31359.170.camel@localhost.localdomain> (raw)
In-Reply-To: <1260156884-8474-1-git-send-email-mitake@dcl.info.waseda.ac.jp>

On Mon, 2009-12-07 at 12:34 +0900, Hitoshi Mitake wrote:
> VERY very sorry for my long silence...
> 
> Please don't commit this patch, Ingo.
> This patch is required to test the next patch for perf lock.
> 
> I have a question for Steven Rostedt and Tom Zanussi.
> Does current raw_field_ptr() support __data_loc?
> 
> At 064739bc4b3d7f424b2f25547e6611bcf0132415 ,
> support for the modifier "__data_loc" of format is added.
> 
> But, when I wanted to parse format of lock_acquired (or some event else),
> raw_field_ptr() did not returned correct pointer.
> 
> So I modified raw_field_ptr() like this patch. Then raw_field_ptr() works well.
> Parser was large so I'd like to ask you about this.
> 
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Tom Zanussi <tzanussi@gmail.com>
> Cc: Steven Rostedt <srostedt@redhat.com>
> 
> I have a question
> ---
>  tools/perf/util/trace-event-parse.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
> index 0302405..494a470 100644
> --- a/tools/perf/util/trace-event-parse.c
> +++ b/tools/perf/util/trace-event-parse.c
> @@ -1925,6 +1925,13 @@ void *raw_field_ptr(struct event *event, const char *name, void *data)
>  	if (!field)
>  		return NULL;
>  
> +	if (field->flags & FIELD_IS_STRING) {
> +		int offset;
> +		offset = *(int *)(data + field->offset);
> +		offset &= 0xffff;
> +		return data + offset;
> +	}
> +

Hmm, I guess I need to update the code in perf again. The way I did this
was to have FIELD_IS_STRING evaluated in the eval_num_arg.


-- Steve

>  	return data + field->offset;
>  }
>  


  parent reply	other threads:[~2009-12-07 16:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12  6:43 [PATCH][RFC] Measuring term of acquiring spinlock Hitoshi Mitake
2009-11-12  7:39 ` Ingo Molnar
2009-11-13  4:21   ` Hitoshi Mitake
2009-11-13  8:17     ` Ingo Molnar
2009-11-13  8:24       ` Peter Zijlstra
2009-11-13  8:40       ` Frederic Weisbecker
2009-11-13  8:51         ` Ingo Molnar
2009-11-13  9:06           ` [PATCH] tracing: Rename lockdep event subsystem into lock Frederic Weisbecker
2009-11-13  9:10             ` Peter Zijlstra
2009-11-13  9:26               ` Ingo Molnar
2009-11-13  9:36               ` Frederic Weisbecker
2009-11-13  9:31             ` [tip:perf/core] tracing: Rename 'lockdep' event subsystem into 'lock' tip-bot for Frederic Weisbecker
2009-11-13  9:57             ` tip-bot for Frederic Weisbecker
2009-11-13 10:51     ` [PATCH][RFC] Measuring term of acquiring spinlock Frederic Weisbecker
2009-11-15  1:20       ` Hitoshi Mitake
2009-11-15  2:21         ` Frederic Weisbecker
2009-11-15  8:38           ` Hitoshi Mitake
2009-12-07  3:34           ` [PATCH 1/2] Does raw_field_ptr() supports __data_loc? Hitoshi Mitake
2009-12-07  4:02             ` Frederic Weisbecker
2009-12-07 16:09             ` Steven Rostedt [this message]
2009-12-07  3:34           ` [PATCH 2/2] perf lock: New subcommand "lock" to perf for analyzing lock statistics Hitoshi Mitake
2009-12-07  4:41             ` Frederic Weisbecker
2009-12-07  7:27               ` Ingo Molnar
2009-12-07  8:38                 ` Xiao Guangrong
2009-12-07 15:00                   ` Hitoshi Mitake
2009-12-07 16:38                   ` Steven Rostedt
2009-12-07 19:48                   ` Frederic Weisbecker
2009-12-07 19:57                     ` Frederic Weisbecker
2009-12-08  1:31                     ` Xiao Guangrong
2009-12-07 14:57                 ` Hitoshi Mitake
2009-12-07 14:51               ` Hitoshi Mitake
2009-12-07 20:16                 ` Frederic Weisbecker

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=1260202158.31359.170.camel@localhost.localdomain \
    --to=srostedt@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mitake@dcl.info.waseda.ac.jp \
    --cc=paulus@samba.org \
    --cc=tzanussi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.