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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 86F46C433DB for ; Fri, 5 Feb 2021 05:44:06 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 358AE64F3B for ; Fri, 5 Feb 2021 05:44:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 358AE64F3B 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=9ZBXhNow5IWFH3T+rej+uFTNJnJFjxXiq6DJjnyyEnI=; b=XFcnVTXxQmO84jX6IvRQWZPBA 9wfgPthjLKqSekpdweayRgZuIDIykSB+Ldcg9klMUo3WH/86pd23jqDi9XKynoSXD3WqKbCmZOCR8 6WRXtb6dzTXwkISmepRJ8GRYaCh7fzttedNed8pAofSg4EGRqgeVizEDhYMjfFJ2pRjvAKLDcBfM4 VKNriMu5bFAv7ELgxOFw/ik+ZrZRcFbrqMqRHxsemvFK3GuWkMUUejG+Xx7iPqAisSZ5Gopv1mANi mW5m/2Hz73JFqNWCW0ULCFDYkDSpVKoMBgnogrB5ux92I+0lmknSlI8anq0I7sAeL8PVda3ecU64e nIGSBy/gA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7tt1-0001dF-Ae; Fri, 05 Feb 2021 05:42:31 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7tsx-0001cQ-MB for linux-arm-kernel@lists.infradead.org; Fri, 05 Feb 2021 05:42:29 +0000 Received: by mail-pj1-x102f.google.com with SMTP id my11so6146424pjb.1 for ; Thu, 04 Feb 2021 21:42:26 -0800 (PST) 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=FvgdxNInb0oVeGhL4PW/aE3z9p2JTGo1itzqu/MywdU=; b=IVavZq/Gz1USEIInGrPz5TOyKYbE7Ob0IDyu79VNFqRAXQ22ugPOPN46o+Ih/VEElJ CNgSWlsrmttQ/emnDT7r3DbntylSHCDXTOoEs6NgtTLCONEi1eY0ARVAQzM4x4cvJv8i SLDcqIEmh/U3NlxLI11F+4wTjU84tHh40hAC0xZYFxeBaDAmRGnYXy3fFFMHk9Ki34vm I5FyNT0gVVW6oDa0sDbqGY3rLV+EpnVQdSPlQffa5RQI/8yLJzc8e1tRKN/j2t2zL9Vv Zv/qy++/SMo7tLo8elxjwL3yYgSY/hOjtqJArootYSi4DIGA/IKPTZrk0RyFwAqzH4cJ +whQ== 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=FvgdxNInb0oVeGhL4PW/aE3z9p2JTGo1itzqu/MywdU=; b=X0uz2YhfPlNcEEYF4Qq8VvgKmChPXGibsx7ETJIc8LTvfxhE/7qotzUBNqnYwmCHUB qEv7Xg9SvyWeP4VhD8+bvwJy9v+Y7Tr/Hm0yuzk6C4tK0xbf5U2QFPmyPt+wHqZEYxe0 k0HtWK+TQTB2JskbrJErHSeIsaDU4qVWdnc4xEN+RYe73pJAt1VaoQas+m9j4nEN7Tzx he3BC+uBqAjxzgjTsP309vLS3b3ai7Wy0wR4GyrO2gUHE8IknveQV6mZ3SXm2RSCnGEy Xz6OVR8fbuaqOievUUhcRZzpNhHoqNAaVwBgnUyvstsmMnMCf8jof43QfSD0EvMe4sAR rXPQ== X-Gm-Message-State: AOAM533zyBG5br2LV6khvQJkb6wNeHTdy7pWBdFJQ+6lAItRNL5VLyaO X5Q5QOxOPWlVrTw2u0hhoqQrog== X-Google-Smtp-Source: ABdhPJxme1S5+Tw77DQWAZHvdF86EsOcfYUldc3Zua8T3zS6vzsVRpOxUUme8ALWJLXRulAc6k6fCw== X-Received: by 2002:a17:902:a614:b029:e1:5b43:956a with SMTP id u20-20020a170902a614b02900e15b43956amr2909593plq.38.1612503744336; Thu, 04 Feb 2021 21:42:24 -0800 (PST) Received: from leoy-ThinkPad-X240s ([202.131.71.236]) by smtp.gmail.com with ESMTPSA id j9sm8572756pgb.47.2021.02.04.21.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 21:42:23 -0800 (PST) Date: Fri, 5 Feb 2021 13:42:16 +0800 From: Leo Yan To: Mike Leach Subject: Re: [PATCH v2 7/7] Documentation: coresight: Add PID tracing description Message-ID: <20210205054216.GB5797@leoy-ThinkPad-X240s> References: <20210202163842.134734-1-leo.yan@linaro.org> <20210202163842.134734-8-leo.yan@linaro.org> <20210204040909.GH11059@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210205_004228_062892_0CB9D905 X-CRM114-Status: GOOD ( 33.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Denis Nikitin , Mathieu Poirier , Jonathan Corbet , Alexander Shishkin , Jiri Olsa , Coresight ML , John Garry , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , linux-arm-kernel , Namhyung Kim , Will Deacon , Suzuki K Poulose , Daniel Kiss 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 04, 2021 at 12:14:12PM +0000, Mike Leach wrote: [...] > > >>> +To support tracing PID for the kernel runs at different exception levels, > > >>> +the PMU formats are defined as follow: > > >>> + > > >>> + "contextid1": Available on both EL1 kernel and EL2 kernel. When the > > >>> + kernel is running at EL1, "contextid1" enables the PID > > >>> + tracing; when the kernel is running at EL2, this enables > > >>> + tracing the PID of guest applications. > > >>> + > > >>> + "contextid2": Only usable when the kernel is running at EL2. When > > >>> + selected, enables PID tracing on EL2 kernel. > > >>> + > > >>> + "contextid": Will be an alias for the option that enables PID > > >>> + tracing. I.e, > > >>> + contextid == contextid1, on EL1 kernel. > > >>> + contextid == contextid2, on EL2 kernel. > > >>> + > > >>> +The perf tool automatically sets corresponding bit for the "contextid" config, > > >>> +therefore, the user doesn't have to bother which EL the kernel is running. > > >>> + > > >>> + i.e, perf record -e cs_etm/contextid/u -- uname > > >>> + or perf record -e cs_etm//u -- uname > > >>> + > > >>> +will always do the "PID" tracing, independent of the kernel EL. > > >>> + > > >> > > >> This is telling me that both cs_etm// and cs_etm/contextid/ have the > > >> same effect - trace PID. Is this correct? > > > > > > > Just to make this clear, this is not a side effect of the patch. > > Which is fine - but the documentation should accurately reflect what > is happening on the system. > This is a new paragraph about the PID tracing or otherwise, Even if > some of the effects pre-date this patch, they have to be accurately > communicated. > I am also reading the new paragraph in the context of the rest of the > coresight.rst document - which is a user level document explaining the > basic operation of the coresight system and tools. > This document mentions no other perf command line parameters relevant > to coresight other than the @sink option.It actually calls out to the > OpenCSD docs to provide further information. > > > The perf > > tool driver automatically adds the "contextid" tracing and timestamp for > > "system wide" and process bound events, as they traces get mixed into > > the single sink. So these options are added implicitly by the perf tool > > to make the decoding easier. > > > > That's fine - I have no problem with contextID trace enabled by > default. Context ID is relatively low overhead - and only emitted at > start of trace / context changes. > But the explanation of the parameters currently reads as though they > always have an effect - and not putting them in there will omit the > effect - unless you spot the very subtle line at the end. > > The user does not need to know about parameters that have no effect! Thanks for the suggestion, Mike. > Perhaps a better approach would be to explain the above - an explicit > statement that "perf will always enable PID/ contextID tracing at the > relevant EL - but for EL2 it is possible to make specific adjustments > using parameters......." Usually users assume the PMU format has no effect if without set it; but this is not the case for the config "contextid", this config has been automatically enabled by perf tool. Based on your suggesiton, will refine the descrption for two things: clarify what's the common usage for EL1/EL2, and what's specific for EL2. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel