Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932637Ab3HNMoa (ORCPT ); Wed, 14 Aug 2013 08:44:30 -0400 Received: from mga14.intel.com ([143.182.124.37]:33982 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932576Ab3HNMna (ORCPT ); Wed, 14 Aug 2013 08:43:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,876,1367996400"; d="scan'208";a="346237643" From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Jiri Olsa , Mike Galbraith , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Stephane Eranian , Ingo Molnar Subject: [PATCH V11 12/15] perf tools: add missing 'abi' member to 'struct regs_dump' Date: Wed, 14 Aug 2013 15:48:34 +0300 Message-Id: <1376484517-5339-13-git-send-email-adrian.hunter@intel.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1376484517-5339-1-git-send-email-adrian.hunter@intel.com> References: <1376484517-5339-1-git-send-email-adrian.hunter@intel.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1545 Lines: 52 And store the parsed value there. Note that the 'abi' is 0 (no registers), 1 (32-bit registers) or 2 (64-bit registers), but the registers are anyway copied one-by-one as 64-bit values onto the event i.e. see 'perf_output_sample_regs()' Signed-off-by: Adrian Hunter --- tools/perf/util/event.h | 1 + tools/perf/util/evsel.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index b0921fe..6bb5d7c 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -78,6 +78,7 @@ struct sample_event { }; struct regs_dump { + u64 abi; u64 *regs; }; diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 4b2819b..81c170f 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1389,13 +1389,12 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, } if (type & PERF_SAMPLE_REGS_USER) { - u64 avail; - /* First u64 tells us if we have any regs in sample. */ OVERFLOW_CHECK_u64(array); - avail = *array++; + data->user_regs.abi = *array; + array++; - if (avail) { + if (data->user_regs.abi) { u64 regs_user = evsel->attr.sample_regs_user; sz = hweight_long(regs_user) * sizeof(u64); -- 1.7.11.7 -- 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/