mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com,
	mingo@redhat.com, tzanussi@gmail.com, a.p.zijlstra@chello.nl,
	mitake@dcl.info.waseda.ac.jp, fweisbec@gmail.com,
	srostedt@redhat.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf tools: Add __data_loc support
Date: Sun, 31 Jan 2010 08:31:09 GMT	[thread overview]
Message-ID: <tip-86d8d29634de4464d568e7c335c0da6cba64e8ab@git.kernel.org> (raw)
In-Reply-To: <1264851813-8413-2-git-send-email-mitake@dcl.info.waseda.ac.jp>

Commit-ID:  86d8d29634de4464d568e7c335c0da6cba64e8ab
Gitweb:     http://git.kernel.org/tip/86d8d29634de4464d568e7c335c0da6cba64e8ab
Author:     Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Sat, 30 Jan 2010 20:43:23 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 31 Jan 2010 08:27:52 +0100

perf tools: Add __data_loc support

This patch is required to test the next patch for perf lock.

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.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Acked-by: 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>
LKML-Reference: <1264851813-8413-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
[ v3: fixed minor stylistic detail ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/util/trace-event-parse.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index c5c32be..c4b3cb8 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -1925,6 +1925,15 @@ 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;
+	}
+
 	return data + field->offset;
 }
 

  reply	other threads:[~2010-01-31  8:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-30 11:43 [PATCH 00/12 v2] perf lock: New subcommand "perf lock", for analyzing lock statistics Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 01/11] perf tools: Add __data_loc support Hitoshi Mitake
2010-01-31  8:31   ` tip-bot for Hitoshi Mitake [this message]
2010-01-30 11:43 ` [PATCH v2 02/11] perf: Add util/include/linuxhash.h to include hash.h of kernel Hitoshi Mitake
2010-01-31  8:31   ` [tip:perf/core] " tip-bot for Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 03/11] lockdep: Add information of file and line where lock inited to struct lockdep_map Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 04/11] lockdep: Add file and line to initialize sequence of spinlock Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 05/11] lockdep: Add file and line to initialize sequence of rwlock Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 06/11] lockdep: Add file and line to initialize sequence of rwsem Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 07/11] lockdep: Add file and line to initialize sequence of rwsem (x86) Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 08/11] lockdep: Add file and line to initialize sequence of mutex Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 09/11] lockdep: Fix the way to initialize class_mutex for information of file and line Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 10/11] perf lock: Enhance information of lock trace events Hitoshi Mitake
2010-01-31  8:31   ` [tip:perf/core] " tip-bot for Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 11/11] perf lock: New subcommand "perf lock", for analyzing lock statistics Hitoshi Mitake
2010-01-31  8:32   ` [tip:perf/core] perf lock: Introduce new tool " tip-bot for Hitoshi Mitake
2010-01-31  8:32   ` [tip:perf/core] perf lock: Clean up various details tip-bot for Ingo Molnar
2010-01-30 11:55 ` Revert "perf record: Intercept all events" Hitoshi Mitake
2010-01-31  8:29 ` [PATCH 00/12 v2] perf lock: New subcommand "perf lock", for analyzing lock statistics Ingo Molnar
2010-01-31 20:31   ` Frederic Weisbecker
2010-02-01  7:27     ` Ingo Molnar
2010-02-04  7:08       ` [PATCH] perf lock: Fix and add misc documentally things Hitoshi Mitake
2010-02-28  8:57         ` [tip:perf/core] " tip-bot for Hitoshi Mitake
2010-02-04  7:04   ` [PATCH 00/12 v2] perf lock: New subcommand "perf lock", for analyzing lock statistics Hitoshi Mitake

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=tip-86d8d29634de4464d568e7c335c0da6cba64e8ab@git.kernel.org \
    --to=mitake@dcl.info.waseda.ac.jp \
    --cc=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome