Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2293013pxb; Mon, 19 Apr 2021 02:04:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFyP30vFSckijzXqm2Yp85G101+kQ3CSAAEy9TLihW6+j2QbzdvslrI3F8+YT+x+DxpUI1 X-Received: by 2002:a05:6402:3079:: with SMTP id bs25mr24267630edb.369.1618823072788; Mon, 19 Apr 2021 02:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618823072; cv=none; d=google.com; s=arc-20160816; b=TlTP/HyuSohRE3LqLiOwnZ+We+tA3q2Zo46ae2wLA5f4ptHdQbAMgUMcqAyyVIVyST lVpMwJdPLCGZIKZ4ZSwYSCpF/to1tlViN0SeLImvFrLNfxziqzChwpCMuL2WmFPpFL91 ZD9eKIXJ0FeVtyF4KHm4MxBJiA7nfrBBX+Hm2XtLQqxsAofVROXkDNKgnY1Vg8G4/Rca 45OeOT+t+LEvK8zEN973rZCWT3PFF4cb/OmR1YEJZUsXHpe++cpmSlJShYA9D+NBJ/C0 /mlVTYSlEwWHTacCyN5hBiXyvuVlE17wSEG9BRvHpyB6TtGW8x4f01eM8EwJkir9LOiK X/fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DQhX108NsKeV1eOXrzXiXRCX0IiGM56TaA+JcQ0sbkg=; b=C/nw3Ql5JL67rcKtyrpYZlr4tHrlLeBwXXSY4iUNI6PkeeDA3JPmoY4bpig/pYg6Mk mxBgfXMX3trjJUXkw7NK/uCFHdYsTPxs+/IK96svwi55OfyqQxORtqZNyVnqGn63aZhX TF/kYfeAc4oQkMzWxX5Pa/OdzuVhOyqjIn8TT+e88uq/nOPdfNNy+G+s0wbTHtXKYSyP uTwIm+F3GKzej+hM82fO2U7d63bmo4P2tq3e5hJeNhhmyKS+slWfwErcCVFwLtMzFxqL MLxMECrDanKkSHkM97kGZCZsy6EgbGhQN71R4xD1aYGRgCFztBbJKDAbDUoERGe6HW7y EORw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FFu6oC8B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn4si13717560ejc.235.2021.04.19.02.04.09; Mon, 19 Apr 2021 02:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FFu6oC8B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237951AbhDSHry (ORCPT + 99 others); Mon, 19 Apr 2021 03:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237850AbhDSHrx (ORCPT ); Mon, 19 Apr 2021 03:47:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70437C06174A for ; Mon, 19 Apr 2021 00:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DQhX108NsKeV1eOXrzXiXRCX0IiGM56TaA+JcQ0sbkg=; b=FFu6oC8B0O4j8mGugVc0cl7/4J OaabLBkiwfRjKRecGvYIiEsR2HvFUWH0NvM7dX2ajhpGnLBa95tvyCxXXi+q5zLPeUwv3icrPwKWw QAFSdpLwJGe/alM92/huVBPMr6JqWQfDAsbfpqQwBfW9NUufpZFucIL7er87ugphoX401J26NQRjm 6okaUtVtpnIcLoLxXvUDWaGOxZenIsO21S584GkXs4TSQnpFUfwkS9Og42BMbdKjGM5qvokDs1wbf NDR1wr9KuoiTzsXZWpkQPGHw5uSd/LfUX8NTHon2vQDvMdm+UFpciyLACG4ma1kA05ySitQGHJfEl e8XXTIUA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lYOcP-00DPVs-Ik; Mon, 19 Apr 2021 07:46:58 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 15103300212; Mon, 19 Apr 2021 09:46:53 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0480A2BFB77FB; Mon, 19 Apr 2021 09:46:53 +0200 (CEST) Date: Mon, 19 Apr 2021 09:46:52 +0200 From: Peter Zijlstra To: Mathieu Poirier Cc: Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, mike.leach@linaro.org, leo.yan@linaro.org, anshuman.khandual@arm.com, maz@kernel.org, catalin.marinas@arm.com Subject: Re: [PATCH v5 04/19] perf: aux: Add CoreSight PMU buffer formats Message-ID: References: <20210323120647.454211-1-suzuki.poulose@arm.com> <20210323120647.454211-5-suzuki.poulose@arm.com> <20210329165625.GC2236953@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210329165625.GC2236953@xps15> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 10:56:25AM -0600, Mathieu Poirier wrote: > Hi Peter, > > On Tue, Mar 23, 2021 at 12:06:32PM +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. > > > > 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 > > Reviewed-by: Mathieu Poirier > > Signed-off-by: Suzuki K Poulose > > --- > > 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 */ > > + > > Have you had time to review this patch? Anything you'd like to see modified? Ok I suppose.. Acked-by: Peter Zijlstra (Intel)