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=-13.8 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 24554C433B4 for ; Mon, 19 Apr 2021 07:48:42 +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 B89D86102A for ; Mon, 19 Apr 2021 07:48:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B89D86102A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.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=MQw6p3cdHxF+Jqe6V7VlFle9ngw5Pi4YC5AWwhCY4FA=; b=FSBMtxQrS3IqB+Mag0YZOO5ml wLNJfsdkQ7oBbfm1l37hdOD0nDq3HCIMSK9IB0cXSYvFar0ynVxn+UTb/yKsa9ERJOutDawLWxqEn InnvXaCPPSqlEps8p8cZ7r7opvtY6fJpUI7ycY3U/wMzjuvNTpF1zGQMcsDZ1ESFrDNeVQl0X4ovD 1wvPLmvf1TfKeML0LCsSOYcWE8VhbNSXnLeS0lTIFUELyZ9b+9geJYuPeWzXnzlU0sV3oTmkX+qKI BhkMQgIMfaZT//6HSXJNnFR/jSQws1lJpzNTRpMJFUTyU81SVawZBi9nOMc/02BctrBxEM9Tkz4vf 4tuTSqaKg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYOcj-009O2M-3H; Mon, 19 Apr 2021 07:47:13 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYOcf-009O1s-DH for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 07:47:09 +0000 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-Disposition: inline In-Reply-To: <20210329165625.GC2236953@xps15> 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 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) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel