Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp459153imm; Thu, 31 May 2018 03:48:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJymnnBr0zJIDdcUu7IsxJt7G5mb881yk/GnIxrlkQojghn7fMDDEV7ek54t/kWroianHZi X-Received: by 2002:a62:f24a:: with SMTP id y10-v6mr6331405pfl.75.1527763693859; Thu, 31 May 2018 03:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527763693; cv=none; d=google.com; s=arc-20160816; b=dGBsY+U4o1mlIz9Nboam1ewT5tFrjD3l12obJQJfx7bhzE47ueQTr4JHc/p0oIfcgk G0n6B6SLMHNDwgIvFfLllYqrnf8XQusd8SO/s0GMZFF1Xg0FdE3HKWY9GQWNNtsCLJ4L AVdkdRtuyM+LQucUM71YEQ3aV/u2Gq5HeL6Ll9c3gb5HAxufMzuAALP3A7B50gun7Xn9 rBzNc1b2PW2RrKicFSr9XTAnoesn7vikO/CZUsvOIIG5fOJuEcoZulLttkKD7Nn5prjW TLmGQLxMMytstTyS9LEwo93y9CJYp2qNmikAQFVz2eBA+NfWODpal+bbXX35fabvnzHj A4jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=13pPR5BvnrIgqS2HFTuu+5krQQ7ktHiT+udNfx6do1g=; b=qaJaXaIIniWUkLVwbJqU5hgKzeiynWiB5cDonMOjCXcJB96xERNedlN7ir6xxkyuQq Qzk8rmqx0qlYTtd2yZHgehP7irxS5ukMaX1xnw6n7erRYfVZCZjJt40QqNLfmHFxCjmW sFLxEem2mvUQjF0qDgkahfMX2/ymH0KcKnmt7VYG9ffZCbfcQwyiucxLFyMR25QWihld k+XX8jQouWmjgGFXfhhXEjvFiODjmp0qGwWB0R+rwJrW7161FsQWUj2qMH3szT+ohOuq ekM4ge+BJUEAW8JalE8LbMZR4fwySTdLHPx5I+yLVIuEIxv7ntIMEx7xhDbBh43zKLVK t8uA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10-v6si14556465pla.53.2018.05.31.03.48.00; Thu, 31 May 2018 03:48:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754534AbeEaKqP (ORCPT + 99 others); Thu, 31 May 2018 06:46:15 -0400 Received: from terminus.zytor.com ([198.137.202.136]:55265 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754521AbeEaKqN (ORCPT ); Thu, 31 May 2018 06:46:13 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w4VAjbug3525762 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 31 May 2018 03:45:37 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w4VAjboq3525759; Thu, 31 May 2018 03:45:37 -0700 Date: Thu, 31 May 2018 03:45:37 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Leo Yan Message-ID: Cc: mathieu.poirier@linaro.org, mike.leach@linaro.org, hpa@zytor.com, tglx@linutronix.de, robert.walker@arm.com, tor@ti.com, peterz@infradead.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, jolsa@redhat.com, leo.yan@linaro.org, corbet@lwn.net, alexander.shishkin@linux.intel.com, acme@redhat.com Reply-To: mingo@kernel.org, jolsa@redhat.com, leo.yan@linaro.org, corbet@lwn.net, acme@redhat.com, alexander.shishkin@linux.intel.com, tor@ti.com, robert.walker@arm.com, peterz@infradead.org, linux-kernel@vger.kernel.org, namhyung@kernel.org, hpa@zytor.com, tglx@linutronix.de, mathieu.poirier@linaro.org, mike.leach@linaro.org In-Reply-To: <1527497103-3593-3-git-send-email-leo.yan@linaro.org> References: <1527497103-3593-3-git-send-email-leo.yan@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf script python: Add addr into perf sample dict Git-Commit-ID: 943f32a0e8a4ea513dc68b00720a6c65842135e8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96 autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 943f32a0e8a4ea513dc68b00720a6c65842135e8 Gitweb: https://git.kernel.org/tip/943f32a0e8a4ea513dc68b00720a6c65842135e8 Author: Leo Yan AuthorDate: Mon, 28 May 2018 16:45:01 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 30 May 2018 15:39:31 -0300 perf script python: Add addr into perf sample dict ARM CoreSight auxtrace uses 'sample->addr' to record the target address for branch instructions, so the data of 'sample->addr' is required for tracing data analysis. This commit collects data of 'sample->addr' into perf sample dict, finally can be used for python script for parsing event. Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Jonathan Corbet Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Robert Walker Cc: Tor Jeremiassen Cc: coresight@lists.linaro.org Cc: kim.phillips@arm.co Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1527497103-3593-3-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/scripting-engines/trace-event-python.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 10dd5fce082b..7f8afacd08ee 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c @@ -531,6 +531,8 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, PyLong_FromUnsignedLongLong(sample->period)); pydict_set_item_string_decref(dict_sample, "phys_addr", PyLong_FromUnsignedLongLong(sample->phys_addr)); + pydict_set_item_string_decref(dict_sample, "addr", + PyLong_FromUnsignedLongLong(sample->addr)); set_sample_read_in_dict(dict_sample, sample, evsel); pydict_set_item_string_decref(dict, "sample", dict_sample);