From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DC8AC55179 for ; Wed, 28 Oct 2020 22:50:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC74820731 for ; Wed, 28 Oct 2020 22:50:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hzMACXHJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389631AbgJ1Wut (ORCPT ); Wed, 28 Oct 2020 18:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389620AbgJ1Wup (ORCPT ); Wed, 28 Oct 2020 18:50:45 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02CFFC0613D1 for ; Wed, 28 Oct 2020 15:50:42 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id j7so1255033oie.12 for ; Wed, 28 Oct 2020 15:50:42 -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=5jeJiRaAbKWuyob37GOTyfw/86/Frh0gugFaBK7OFIs=; b=hzMACXHJ+NwXdqkR3VVPOC7bnaMcYm3xikDHOfRCzPV9GnJlQeLX8KaMniZD0GSBLU Zh19U1m+DhCgqqGIf1H6wvaJdur/uKnZ6AVseodvfX7PzKGaZr289BCRZxsOV2xjcHEj R4vpzWP+QJETtzUjqcx2JJzgB6nzmicmMsWTYPKGQSkGjd1r+3XTSRMekQLt3K4Ajcs/ rJG4SnXh3c4PsLJDz1/pKGTgrhmDTleUkeV4UMuOssmLLbdWKqMu7cj5jksL5LIjP9oN 2IBT+8iDGCwsUQvAhvcCuG7kz2kDq8Nh0HX+AaYUJ9WmHB/eeLD74BqSHXovJM7Jw2H5 IxSA== 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=5jeJiRaAbKWuyob37GOTyfw/86/Frh0gugFaBK7OFIs=; b=PeWki3uSQ3aJyF/dO8hkIJWP6h7at49utQ6vs5Ips66rg0pjwR1xAkmQakVOcCvus2 MWwKPhjKZjqAxLhwVnlImMwBZ0JO5W9gFCxfpxJoYWlZQdX5TCmw23kDSatib04/I7MG HMjjVyHXmrl428xKTOJRGdVmVSidwTKW2zXMhKDkQZWehFFiJpivEIGamdD+tJspXyGo IubGVpIW53utmh5OjC4P+dAPgDHf6Xd2IIzQKmsWs7iBftWLFRIptxcOqOSNiTX7Cq+g efBir19nIoaM0nE1DERBqU+aqQFOGkujaIfTXoMqgjIz+IynkHo14gwS964YhnMGp+tu wmfw== X-Gm-Message-State: AOAM533xm0GUK9spjNp7zmQRxPywMn8WSVHMoWhsHFmxPi1uqO5Dy4n0 q3OJLjKAK9MCtN2Xy0uftEvgasNqULZm2Cxh X-Google-Smtp-Source: ABdhPJxsPGjoz9Nf8PR1b73ATvv2YKlLUPNIXREg4qMJSV6zUSKNXAfZTYTWxOhh6cbO+s5rkjuhBQ== X-Received: by 2002:a17:90a:7303:: with SMTP id m3mr5825028pjk.190.1603867129442; Tue, 27 Oct 2020 23:38:49 -0700 (PDT) Received: from localhost ([2600:3c01::f03c:91ff:fe8a:bb03]) by smtp.gmail.com with ESMTPSA id r6sm4610030pfg.85.2020.10.27.23.38.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Oct 2020 23:38:48 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Mathieu Poirier , Kemeng Shi , "Naveen N. Rao" , Ian Rogers , Al Grant , James Clark , Wei Li , =?UTF-8?q?Andr=C3=A9=20Przywara?= , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v3 5/9] perf mem: Support AUX trace Date: Wed, 28 Oct 2020 14:38:09 +0800 Message-Id: <20201028063813.8562-6-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028063813.8562-1-leo.yan@linaro.org> References: <20201028063813.8562-1-leo.yan@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Perf memory tool doesn't support AUX trace data so it cannot receive the hardware tracing data. On Arm64, although it doesn't support PMU events for memory load and store, but Arm SPE is a good candidate for memory profiling, the hardware tracer can record memory accessing operations with affiliated information (e.g. physical address and virtual address for accessing, cache levels, TLB walking, latency, etc). To allow "perf mem" tool to support AUX trace, this patches adds the AUX callbacks for session structure. Signed-off-by: Leo Yan --- tools/perf/builtin-mem.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index f3dc2d2b879c..87c6074e405e 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c @@ -7,6 +7,7 @@ #include "perf.h" #include +#include "util/auxtrace.h" #include "util/trace-event.h" #include "util/tool.h" #include "util/session.h" @@ -405,8 +406,12 @@ int cmd_mem(int argc, const char **argv) .comm = perf_event__process_comm, .lost = perf_event__process_lost, .fork = perf_event__process_fork, + .attr = perf_event__process_attr, .build_id = perf_event__process_build_id, .namespaces = perf_event__process_namespaces, + .auxtrace_info = perf_event__process_auxtrace_info, + .auxtrace = perf_event__process_auxtrace, + .auxtrace_error = perf_event__process_auxtrace_error, .ordered_events = true, }, .input_name = "perf.data", -- 2.17.1