Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752610Ab0A3Lpn (ORCPT ); Sat, 30 Jan 2010 06:45:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752669Ab0A3Lnn (ORCPT ); Sat, 30 Jan 2010 06:43:43 -0500 Received: from ns.dcl.info.waseda.ac.jp ([133.9.216.194]:52219 "EHLO ns.dcl.info.waseda.ac.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373Ab0A3Lni (ORCPT ); Sat, 30 Jan 2010 06:43:38 -0500 From: Hitoshi Mitake To: mingo@elte.hu Cc: linux-kernel@vger.kernel.org, Hitoshi Mitake , Peter Zijlstra , Paul Mackerras , Tom Zanussi , Steven Rostedt Subject: [PATCH v2 01/11] perf tools: Add __data_loc support Date: Sat, 30 Jan 2010 20:43:23 +0900 Message-Id: <1264851813-8413-2-git-send-email-mitake@dcl.info.waseda.ac.jp> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1264851813-8413-1-git-send-email-mitake@dcl.info.waseda.ac.jp> References: <1264851813-8413-1-git-send-email-mitake@dcl.info.waseda.ac.jp> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1567 Lines: 48 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 Acked-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Tom Zanussi Cc: Steven Rostedt Signed-off-by: Ingo Molnar --- 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 c5c32be..13aea80 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; + } + return data + field->offset; } -- 1.6.5.2 -- 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/