Received: by 10.223.164.221 with SMTP id h29csp2461519wrb; Thu, 2 Nov 2017 11:17:10 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RECw8GD2OYRDBv6/FNaprgjd/qUQngLdvP/SagJPzMDptpL6g7boFo/0P1HNZDXCPI9q0m X-Received: by 10.98.72.18 with SMTP id v18mr4728426pfa.232.1509646630347; Thu, 02 Nov 2017 11:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509646630; cv=none; d=google.com; s=arc-20160816; b=seFG/BflwqsiwdYG/rX8C6QAr51Ap74HyuJwTs3WMIjcb+TgyMHcynQ6Q/m2dQiW3s 2z6wMy1RSF5+yCAzMFwpHy3njPMTTLD1gDThhsr07bbIhaHcULT8oog60ZQ1Nkl8s4wF nymBeKWfl8i2Gb0+FgaPB5mdSUDJqC0HH7PHqEpFieu8BAKaFinXHzFFoGxGDBoCYkPQ nectVOyp91wZzTfJj3KX2mkG59SieT/zNEvZTS/kkZD5cDB07fvT3zLZBN9qJcFnjZW2 8iZgfhoMDTKEaxPeGN3Tt3E4XGOVh69y0Q3PUEp2MdY3cnpBH/iDCwUggsvdQ/oyi0o7 1aXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=5ecofvdnFLO6R8V80aoQ1P0TVohbjr913IoNVo/bmCc=; b=L560kCfvLfxCEIv3MAWB/d7DukgwIKNvsODAaKC06N1EkP1+WLDo2YU+K1bCdb6eQL oiAPjYm3bG+AaCuUIp3KBr5aN09Nhagd6PJ9mjtirmNDHP0uKWWMdMgCCffUYNUeHKhv 0zvRJaMV8192JOsqnULt344n7NfkRCoB44jIiu1y2eZqL6KishfRzPx4iCjTE8/iGRFW Io2t2Td4uAgshV3QZsg7slAAkm3zDXQ+hMDKm2W826lJlHnVPotYF0F5O7GNw93xLcNn a5mC1GxIQxAZXgcakB3aAYmd9N1abOYAZ/5S+6Ixgg1JHfsY9bO+wOUlxOlr1ltj8yPr wJHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MDP0afqK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si4123909pgq.361.2017.11.02.11.16.57; Thu, 02 Nov 2017 11:17:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MDP0afqK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933947AbdKBSQS (ORCPT + 97 others); Thu, 2 Nov 2017 14:16:18 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:50291 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933851AbdKBSQJ (ORCPT ); Thu, 2 Nov 2017 14:16:09 -0400 Received: by mail-pf0-f193.google.com with SMTP id b6so275499pfh.7 for ; Thu, 02 Nov 2017 11:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5ecofvdnFLO6R8V80aoQ1P0TVohbjr913IoNVo/bmCc=; b=MDP0afqKv2Xp394zM8KbP77eojlHyjd71kM8DsJ9RScepz7L3n/XuEKgipk5QpPXKL VZE+c6hDOPgHwHceLIN/cedaOe1gsd+4hpEVEW7QfxR0ibTwIQcmyM7/VwPQyMV8ihJ1 JKqS4y55DKRtZ9tFlVS3v086f4udct1aviq4MHEJbtu8CXyV3DlmOW6m0q+MddN9yGv3 Wlqef/36a1lYJAAi0Zdh/gPtES+2+8Syf7iRy8EpSMRt9rXU6QYcygGHAK9yMAKFH+r+ 8hmdNOWP8LS3TmPSewO965zoC1j3GJeGHRE66BQU85WlB4QYTPJy6u1tmM6X53uNhpbw j0Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5ecofvdnFLO6R8V80aoQ1P0TVohbjr913IoNVo/bmCc=; b=t+up7ipWXUeReN+zIxWsu/uegsszbmEilRueBfknVolQZL7UWk2lxsUkmXcJ5lNFKJ RkyH5paKbV9+FxPt8aOVY7QRZBBgXD3QBvCpccNg6UpFhr7Vilabv8cROGqf/6zu/u7Y 9fY6IJfSnlXAP2hU9d9HSfJ2jdR12QTqd7Y+5Jy7NPeFE2Zd0wtxSmmG6n9ZTUWDWt4S 3CeP2VvIeaDJAJcgI7SPhcw50shKcOmyZQh/OnYdMWteqvdOse5VuQCtYPe1m3nV4QUA p7MFZGD8Du00BxsDXHYy3gQdw25Vru+p/NLrOwpwXQr6VgOm5rBhlO8HqzQ9zRUwzK+N MrkA== X-Gm-Message-State: AMCzsaVarLKQjAfrjoY32RlvzDl7RsoZ3h4tofQjMupPFFIT0BxfgNvu k0EAPYm0vLRh0CHlO/c5axXRPn7h2ZY= X-Received: by 10.84.136.135 with SMTP id 7mr4190877pll.392.1509646568893; Thu, 02 Nov 2017 11:16:08 -0700 (PDT) Received: from localhost (c-67-169-55-77.hsd1.ca.comcast.net. [67.169.55.77]) by smtp.gmail.com with ESMTPSA id y27sm7923010pfi.107.2017.11.02.11.16.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 11:16:08 -0700 (PDT) From: Stephane Eranian To: linux-kernel@vger.kernel.org Cc: acme@redhat.com, peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com, kan.liang@intel.com, jolsa@redhat.com, Stephane Eranian Subject: [PATCH v2 5/5] perf/script: add support for skid ip Date: Thu, 2 Nov 2017 11:15:59 -0700 Message-Id: <1509646559-919-6-git-send-email-eranian@google.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509646559-919-1-git-send-email-eranian@google.com> References: <1509646559-919-1-git-send-email-eranian@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephane Eranian This patch adds a skid_ip field to perf script to dump the raw value of the PERF_SAMPLE_SKID_IP field in each sample. $ perf script -F +ip,+skid_ip ...... Signed-off-by: Stephane Eranian --- tools/perf/builtin-script.c | 6 ++++++ tools/perf/util/session.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index a3add2cd7856..a13fbc13373b 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -89,6 +89,7 @@ enum perf_output_field { PERF_OUTPUT_SYNTH = 1U << 25, PERF_OUTPUT_PHYS_ADDR = 1U << 26, PERF_OUTPUT_UREGS = 1U << 27, + PERF_OUTPUT_SKID_IP = 1U << 28, }; struct output_option { @@ -123,6 +124,7 @@ struct output_option { {.str = "brstackoff", .field = PERF_OUTPUT_BRSTACKOFF}, {.str = "synth", .field = PERF_OUTPUT_SYNTH}, {.str = "phys_addr", .field = PERF_OUTPUT_PHYS_ADDR}, + {.str = "skid_ip", .field = PERF_OUTPUT_SKID_IP}, }; enum { @@ -1514,6 +1516,10 @@ static void process_event(struct perf_script *script, if (PRINT_FIELD(PHYS_ADDR)) printf("%16" PRIx64, sample->phys_addr); + + if (PRINT_FIELD(SKID_IP)) + printf(" %"PRIx64" ", sample->skid_ip); + printf("\n"); } diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 9390cedee6f4..802227735a89 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1132,7 +1132,7 @@ static void dump_sample(struct perf_evsel *evsel, union perf_event *event, sample_read__printf(sample, evsel->attr.read_format); if (sample_type & PERF_SAMPLE_SKID_IP) - printf("... skid_ip: %" PRIu64 "\n", sample->skid_ip); + printf("... skid_ip: 0x%" PRIx64 "\n", sample->skid_ip); } static void dump_read(struct perf_evsel *evsel, union perf_event *event) -- 2.7.4 From 1583060414875931825@xxx Fri Nov 03 15:47:38 +0000 2017 X-GM-THRID: 1583060414875931825 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread