Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp46365imm; Mon, 21 May 2018 01:55:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9hjqstl4DLg/lk1eHij8S4S6hW2WsiihAwannQA5ogPScrYoDBPh3FNVHWDsZ9/3zPVr3 X-Received: by 2002:a65:4789:: with SMTP id e9-v6mr15218602pgs.235.1526892946076; Mon, 21 May 2018 01:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526892946; cv=none; d=google.com; s=arc-20160816; b=S1/JOTW91PpWiAgNYuVVQtbHhn1pF3K8Bu0mu2ZuLch9IBJ+CM+vkVjl90yy4i6TZm OQ34/NKrm8WNpqsvf7xmQdX+Ils/j+J6LsPozclCZPd6gUh8jGlF1vraQSEkac/JTe0D 7aiifXDJ/0nWwhIGWzHTi4LLg8+QvXN6MUW/069ae2ZCZllAmV0VkbTOljUyn9H8FTuJ IzNgWUzWUm7SXetUoZupOLBqVUNQmGjAJFby41oqArCXOGZhzwjj79z8L/j2l9s+37qf +WQmZPBYsm3L+DuRiBEvq6nVHumJZxRI+XzgPFa9ah1EEKMGvgFi4knddL2uoQ4Fzg87 qAKA== 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=g2s0qKAeszFhKKHrQ+56mjV/yVHzAXmicKjIaEfOtZk=; b=GYOv+POXcJAdBeuI1yPR8dRqsb27jNUSjlpk9j426tn1B5MhCAgmIjeLUkWgLp5bht ZezeN/6xhb479BInCorv3/CeVajpnwf0C+6DXU2a5028g+xwu0evaKhRyEmQ+w4PMonI O4Ab02/9/g+3FPeF+6FK1+W8r+/WpWOBHov/DS7e2b1PKn8KV8yma/ADLGf6VO9k/bO7 9Eg7hsmuTEWVmGWkJZp9FYNdwLyOQS3VUVUKMn1R9qnLMRlll9pO+f4WqDA4sSYAZaIG VABr+I0dot1dqFl8mXbNOLdebfHM07sYngPIL2+quvgMgQU19kisEWsnas8Bg7SKLS0q gCtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GE279JS2; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si15452394pli.324.2018.05.21.01.55.31; Mon, 21 May 2018 01:55:46 -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=@linaro.org header.s=google header.b=GE279JS2; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751271AbeEUIxy (ORCPT + 99 others); Mon, 21 May 2018 04:53:54 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33087 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbeEUIxs (ORCPT ); Mon, 21 May 2018 04:53:48 -0400 Received: by mail-pf0-f195.google.com with SMTP id a20-v6so6769167pfo.0 for ; Mon, 21 May 2018 01:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g2s0qKAeszFhKKHrQ+56mjV/yVHzAXmicKjIaEfOtZk=; b=GE279JS20lqPnyDT/EctkUZE9fTNwX7lTGyFFiii8DuW9FqzqUwbuB36MhTqT8qREB kr0ikmOfxnmdi9bjoTt8ivGLdPJDv8p7S9diaJUWxNJixSLt7APFpFf5Kn0axt0Grff3 1YswPReSsmyAlRfroZ5unoR4PHFmkPYbtmnKs= 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=g2s0qKAeszFhKKHrQ+56mjV/yVHzAXmicKjIaEfOtZk=; b=M9Kju6f7YzxlUL0uZ3tGnNC3EP/fsDNbaIapDjZtRRzrLOJOCTOoh1k3ZKfetAqj/n /nDXphxiYIV2s2g7YB+PpGqS7ELO5GuCV9hjbV50KG7negOeSe2WL9mo+KE090Vax1fg 52lGerlW22MkG2+xnwOSN9dZSLifAkWAKpmDetKlsc3oy5ad79JGN0NLIoR5f1dH3+8c gLqimS1lnrDjJO9qB6AdXQHjyCjOsK/gk8qyLuO1myo1a7F1nZL8fyxIT/3uGO6ygPMM UJut4HYWF17GO6A2VpwS4xxixKixvnsXxq4+fJBuVPOydqFSngBkm7v7MbfYRJoIpARE IgIw== X-Gm-Message-State: ALKqPwdBYw3fKmHm47oZ8FG+bbtEQAgyeiPgDiIeGQk9Gqay5I7CVazB t8EUw4zAtjtmXZuzeskm7dv+xA== X-Received: by 2002:a62:3ec2:: with SMTP id y63-v6mr19235088pfj.102.1526892827728; Mon, 21 May 2018 01:53:47 -0700 (PDT) Received: from localhost.localdomain (li1209-69.members.linode.com. [45.79.110.69]) by smtp.gmail.com with ESMTPSA id 16-v6sm28553918pfq.115.2018.05.21.01.53.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 May 2018 01:53:46 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Tor Jeremiassen , mike.leach@linaro.org, kim.phillips@arm.com, Robert Walker , coresight@lists.linaro.org Cc: Leo Yan Subject: [RFT v2 2/4] perf script python: Add addr into perf sample dict Date: Mon, 21 May 2018 16:52:26 +0800 Message-Id: <1526892748-326-3-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526892748-326-1-git-send-email-leo.yan@linaro.org> References: <1526892748-326-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 10dd5fc..7f8afac 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); -- 2.7.4