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=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 13B08C433E0 for ; Tue, 16 Mar 2021 17:10:12 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E613F6511F for ; Tue, 16 Mar 2021 17:10:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E613F6511F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YY4k1660lT0y4SxtmOW09XA18fMF387UIB/VhCUbjO4=; b=hsnn/dRdQSAUAf/GJEonpYaxG XKB6xAo9JmKljuIkHAwBK7uQ4mB9q6XZQ541HsHRBe/4tggV6hjy/1BCWetUdcgzlnOrDet9kMEyd eZLgE3Lgx5IppH5pwVDswPwy6VMrJI+tIcnkO0SGxEyB0+J6ldJiFhckJDfdC/VrQyocBTzFnUJG9 96qRuYr2dZuH5UXp9B92tQSlPB8HAohuSoRxv6pUcG0Hpm9ifajvUk2oZKo/TNYssitv3wF5MYCcC XcCsO0CXvPDwuqliVp0QpB4/yCF067ewqdLn5yeOLzF2R+MQws7bgSPu+DPm7d1Ysfs3X04I17Ztu aGK8YHseQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMDAz-001LyX-Ql; Tue, 16 Mar 2021 17:08:14 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMD7I-001K5P-UH for linux-arm-kernel@lists.infradead.org; Tue, 16 Mar 2021 17:04:31 +0000 Received: by mail-pf1-x433.google.com with SMTP id y13so9262466pfr.0 for ; Tue, 16 Mar 2021 10:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=15RR40P/U9ibYzUk2HWYEWXH7Ht7qXA+g/hLYCQArIg=; b=Z4UGi5ExsBZfzoq+BFyh2Yq7GC8h2n6NxM4BoNOSL9/xUDpgBWMAv6Z8NBxJns1olg JgkflXEdVjrO+XUiC/CGAej/F4ShUOGWKq0YpxLC84rkJrh7R6a1j9Y41b+JGllqPDUL ACgjiA8O+QUiMmbXqHjMY4TFRKrAqfZikyTjQ4PwDiCOHCh12SAF2uhuWfHRxdQgetlr j5lDm6pHk3tpxfMb8kSrlb9+k1PYSz6jafqZv8Vx5GyCdJ/sH5D0A1rvs2/4eZgwFj1e O0zmXhvRgFKkJB1iCaeTQvaJ3yXRa9F6xWeL6QK+sAfc7n7AtOtL2S+BrfhtqbpH1MFW v8vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=15RR40P/U9ibYzUk2HWYEWXH7Ht7qXA+g/hLYCQArIg=; b=iOBfWtcpUjprU9g2179rnwW3gg+3Wim1ZeRBimbMFIe7anvlrdTLh74mH5y9Eqkxqo CaKKsyrJcOsIzt8kOqwYdd6rwh2iZ+NFc5S0IfrsGhgLb0OhZqccnV96kgh8eJlp870N Zy2HWPihSGzL0ONahRYp4cl3f1YYaXz2+LHj24sCMYFFDaVMzAjv2wlJuhCo0+oo67YU GPoz8aLgOO8cl116qvhgJ7KjNVeM5oQqeBS4Mwph3UjsS3YUicQ29M7haFvLrLu0/pKJ S5qm2y1T2N+dxqpPIre6W0kUI0vdLzj+0vh9G/FfCRNKt6X5805NwGfjz2RIe9no2v0N 7nSQ== X-Gm-Message-State: AOAM5304CMxszzH7U0RI6KJIOxQD/kPh8y8Gw0533TLd/DZSWaC7sE6N xLPxncq9UFtCUTbR2h8XEYD/BQ== X-Google-Smtp-Source: ABdhPJz+k96Zn3WSMaYy9/jNXoLVwhv3EWOqtCM3s2WoJJKlEHexKoHv7rIzauY3QMwMBWZ97pkPyw== X-Received: by 2002:a63:e44a:: with SMTP id i10mr557230pgk.404.1615914263182; Tue, 16 Mar 2021 10:04:23 -0700 (PDT) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id e11sm17230909pfm.24.2021.03.16.10.04.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 10:04:22 -0700 (PDT) Date: Tue, 16 Mar 2021 11:04:20 -0600 From: Mathieu Poirier To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mike.leach@linaro.org, anshuman.khandual@arm.com, leo.yan@linaro.org, Peter Zijlstra Subject: Re: [PATCH v4 02/19] perf: aux: Add CoreSight PMU buffer formats Message-ID: <20210316170420.GA1387186@xps15> References: <20210225193543.2920532-1-suzuki.poulose@arm.com> <20210225193543.2920532-3-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210225193543.2920532-3-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_170427_649429_09CBC484 X-CRM114-Status: GOOD ( 34.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 25, 2021 at 07:35:26PM +0000, Suzuki K Poulose wrote: > CoreSight PMU supports aux-buffer for the ETM tracing. The trace > generated by the ETM (associated with individual CPUs, like Intel PT) > is captured by a separate IP (CoreSight TMC-ETR/ETF until now). > > The TMC-ETR applies formatting of the raw ETM trace data, as it > can collect traces from multiple ETMs, with the TraceID to indicate > the source of a given trace packet. > > Arm Trace Buffer Extension is new "sink" IP, attached to individual > CPUs and thus do not provide additional formatting, like TMC-ETR. > > Additionally, a system could have both TRBE *and* TMC-ETR for > the trace collection. e.g, TMC-ETR could be used as a single > trace buffer to collect data from multiple ETMs to correlate > the traces from different CPUs. It is possible to have a > perf session where some events end up collecting the trace > in TMC-ETR while the others in TRBE. Thus we need a way > to identify the type of the trace for each AUX record. > The gist of this patch is to introduce formatted and raw trace format. To me the above paragraph brings confusion to the changelog, especially since we don't allow events belonging to the same session to use different types of sinks. I would simply remove it. > Define the trace formats exported by the CoreSight PMU. > We don't define the flags following the "ETM" as this > information is available to the user when issuing > the session. What is missing is the additional > formatting applied by the "sink" which is decided > at the runtime and the user may not have a control on. > > So we define : > - CORESIGHT format (indicates the Frame format) > - RAW format (indicates the format of the source) > > The default value is CORESIGHT format for all the records > (i,e == 0). Add the RAW format for others that use > raw format. > > Cc: Peter Zijlstra > Cc: Mike Leach > Cc: Mathieu Poirier > Cc: Leo Yan > Cc: Anshuman Khandual > Reviewed-by: Mike Leach > Signed-off-by: Suzuki K Poulose > --- > Changes from previous: > - Split from the coresight driver specific code > for ease of merging > --- > include/uapi/linux/perf_event.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h > index f006eeab6f0e..63971eaef127 100644 > --- a/include/uapi/linux/perf_event.h > +++ b/include/uapi/linux/perf_event.h > @@ -1162,6 +1162,10 @@ enum perf_callchain_context { > #define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */ > #define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 /* PMU specific trace format type */ > > +/* CoreSight PMU AUX buffer formats */ > +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */ > +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 /* Raw format of the source */ > + Is "CORESIGHT" really a format? We are playing with words and the end result is the same but I think PERF_AUX_FLAG_CORESIGHT_FORMAT_FORMATTED would be best, or event: #define PERF_AUX_FLAG_CORESIGHT_TRACE_FORMATTED 0x0000 /* Default for backward compatibility */ #define PERF_AUX_FLAG_CORESIGHT_TRACE_RAW 0x0100 /* Raw format of the source */ Regardless, for patches 01 and 02: Reviewed-by: Mathieu Poirier > #define PERF_FLAG_FD_NO_GROUP (1UL << 0) > #define PERF_FLAG_FD_OUTPUT (1UL << 1) > #define PERF_FLAG_PID_CGROUP (1UL << 2) /* pid=cgroup id, per-cpu mode only */ > -- > 2.24.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel