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 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 F16BEC433DB for ; Mon, 29 Mar 2021 23:36:54 +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 7B0B961996 for ; Mon, 29 Mar 2021 23:36:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B0B961996 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=qFdKolvpovemOzJEYy5MNPShEuriw7Ae367O8gg6nHQ=; b=H2GCrLbpk6K4AaNfelzhXnol4 nzQhTgbqPs+dVySzIHEGRpHw1mDoL8QtuADKzW+8IC9yLBwuo7VrgMrRz2TOB3z136iOsbx3cQVRf r+mQPfpxIfCU0dmggkjr7KDOHgOHTccE34g6CRd/3xVFS2G9iE1l5FJSzScMQo4G4k0P1+taEc6MA ycAQerNCxJGgqLTFpcDwjBwcsxFNJzIUaQCIu5bMJX7XSnb/cHoY03xfq87lAfFnj92egobirXRZO T7+lhi/cfZA6su1v9DhM0lJOpYYFLCQ+o7WmnZ/0WelM2n9eitFEF/dZzBA7Bbaw6GuKfaCSxegd1 og8U0CgVA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR1Ol-001xsx-DS; Mon, 29 Mar 2021 23:34:19 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQvBl-000oPV-VT for linux-arm-kernel@lists.infradead.org; Mon, 29 Mar 2021 16:56:53 +0000 Received: by mail-pj1-x1036.google.com with SMTP id f2-20020a17090a4a82b02900c67bf8dc69so8008484pjh.1 for ; Mon, 29 Mar 2021 09:56:29 -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=41gsrhQeTp6iRdsdb+HSRGikGLjU4hdDe4OQqkyN7Qk=; b=LnrkPfWPiMY+YoSb4/gORGVIa+wQfgD3GORzXUL4+w+m2w1LdZMM25aNWwHVP1Pe4D 7SNSphcAaPHrVJaqIw8ZJ9I4qLeISnRJD0JBpl+4K+50AX9RJB2c8pbXCab7vWB83wpZ xx18ySZ2dL91F8VtMgQiRZt86T+zQAaG++bR2OcZpNCHZIU7akctyUgxs6jzznvEKMPx NIa++j6wHE4nawRyiMF/UsUpg9SffBIlFgKKsVlxvGy02Cg1zw8jDELuv5c3N5gy8wkh kVDd4xPmg4AR/HgQ+ISiSAqe7TZC5t/R1oahGAKHJCVKIVnuOKdHoCDQU8BYLqgA6ODz AwPw== 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=41gsrhQeTp6iRdsdb+HSRGikGLjU4hdDe4OQqkyN7Qk=; b=OhNBIzGeyZNhl8OdrLudGn7M4sHJVnB2GI8c1ar8yWAmrbq+ckQj9jNnYil9+6k+sH N4KpgMGLd6OcUkFUXE8mFC93L6pOpbjXe1u8bROOhN9RmCAgFcChtCibIntzC5n5Bkq6 +RWepkglQ9N1zvSyz9dwLrr9rxFmaBUBnFR4SVstuEuZ2/wSSYKsSmL8CwUq7t+qs8cq //CoS3msEHhl3ObSEf9OWhelGE+eOt0O98G2L92ffJ5lQeduan9LNfgpJS4E6rVsyCKZ /a/jhj4Vp17C7V20qscgH10kVzhS0+Hp8CO63SiJEKP/Fiv7tgS7LZd6qNXj5FOkF5pj lWGA== X-Gm-Message-State: AOAM530dRJb59EDTSg9nPD7gEa42aCo5t8i82iuTvitzxZCljNO73D7l 0XAkoL8dsPvjc1idDnxNdsWtWw== X-Google-Smtp-Source: ABdhPJyKmgxu98ePKQ1/ZuR9DsdDaHExb0sus5f3hmK2rRS/btm/O94L5GMF7gxOryyOPYXxX07rCw== X-Received: by 2002:a17:902:c204:b029:e7:32fd:bc8f with SMTP id 4-20020a170902c204b02900e732fdbc8fmr16366279pll.43.1617036988444; Mon, 29 Mar 2021 09:56:28 -0700 (PDT) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id y7sm18118497pfq.70.2021.03.29.09.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 09:56:27 -0700 (PDT) Date: Mon, 29 Mar 2021 10:56:25 -0600 From: Mathieu Poirier To: Suzuki K Poulose Cc: 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, Peter Zijlstra Subject: Re: [PATCH v5 04/19] perf: aux: Add CoreSight PMU buffer formats Message-ID: <20210329165625.GC2236953@xps15> References: <20210323120647.454211-1-suzuki.poulose@arm.com> <20210323120647.454211-5-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210323120647.454211-5-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210329_175651_294564_65741D37 X-CRM114-Status: GOOD ( 30.44 ) 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 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? Thanks, Mathieu > #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