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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4F64C71153 for ; Tue, 5 Sep 2023 01:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=v+GEyXnyK8yJjr91KCEymM+tPWBuwpuk2TH+v/cj/yI=; b=MavOue0l01GfjP rijYsQ3TBvO//WY5DC/mRHrdQ3Ka4uZQ7siTZxvcK4kflB2cYKNwmsWeNA7v+w13+T3Qig4vku10k /xGgp1khF+6AE3sAwnJMwK3ZDrS5yh/c8ULRfKmoEZjYv179ucBMLioQJVaWDy+Di7QjQN8+57rvQ cIqs4ZjMJPdeJhCp8tGfWBenTtydHKBqi7GLoa1oYSn6bL6X2lcbKMcTxlOPQieLsEW7U7mKDd8VS lgGGOJzw6aSAestouLp9q4YCfHEe91Jz02coXBILfymTabguUU/h/0dqA4fNWjDDX16jJDpGgPbkn UKfPlGNpLJpmUqD6KuqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdKxD-005453-2m; Tue, 05 Sep 2023 01:34:07 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdKx9-005443-1c for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2023 01:34:05 +0000 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-271914b8aa4so932921a91.1 for ; Mon, 04 Sep 2023 18:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693877633; x=1694482433; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6S8Zr6qvg1Ao4DxVpdQ4RADfHwn46fbVmt8Nq/6N2T8=; b=ZoJJhpVGZNvpAqXKdPKkAT55JTRaNqsE/gGLtg47QRPpXAuE9ds0NJYUgXp8dudngc 4nMVeNPjulhpiFicX7zVsgWtto9oGwzFTB5D8apMfrZnHUSEhhILwK8sxEObQEpN7NLn mAlnYYv6p7DzAATD+fIM3GGvUa+dmAiIE1CnrJ1F/IDegOhEcRBY1LRGB2MUqO6i36y2 pTkKKqKe6TyPtcvJxn89lO1MWMsgAzxcRgQ0at15ILqPTbmsylgq8Zr6Aup3XuoYn/97 a6QA8D3ExSKryY4Q3R1wX4o1eSFtzrp6JSVP53CX2ZS7HR1xQI9yqT1iy/lbfWrS55K/ CfXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693877633; x=1694482433; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6S8Zr6qvg1Ao4DxVpdQ4RADfHwn46fbVmt8Nq/6N2T8=; b=gd7pPWs1kvklu+kbqXKZLJp7gACNru7ebMP3a0E5QJ0IePRNNG1cygrDQShsJ+5IrM pe9q0HtMdBHwFHG++h3AMlGPUNp7wDmBlCBEqZIwJaQea0JX8mxXEfvo9YNJYtzn2Rk1 LjmEj13qGxI5h4AZymEXhaTUMpqgxrHvFXB+GcJNWXIV6+U8Iuf7/t41K51I26H3kxlv 7iee2k5cjugcE01tiLYPHG/COfyW4q/JtsnMR1M80Dv9tq0WVL+TiijzIbA+ITe3EY3/ XxhdbdllmyYQQYU2+irXiDuitifQXtLxpEQxdyARtAx2qB8rornbPxuctf+KEF6dQupW WkQg== X-Gm-Message-State: AOJu0YzloD8NY7TN/f24DM5Shr5HPFZL8yPorIG1GqF+3WA3wp+9ZPsk Mw/NcZIvdoGwCUVNgV29DIie1g== X-Google-Smtp-Source: AGHT+IHXumvH4mpK+FtuZ8UBv3wR5yIPoKGnroc4pvxo61RJr3QNYTKh8hRpX35n/csahdAepThgNw== X-Received: by 2002:a17:902:f689:b0:1bf:205f:c02c with SMTP id l9-20020a170902f68900b001bf205fc02cmr11406801plg.58.1693877632918; Mon, 04 Sep 2023 18:33:52 -0700 (PDT) Received: from leoy-huanghe ([223.104.5.47]) by smtp.gmail.com with ESMTPSA id l11-20020a170902f68b00b001b8af7f632asm8116268plg.176.2023.09.04.18.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Sep 2023 18:33:52 -0700 (PDT) Date: Tue, 5 Sep 2023 09:33:38 +0800 From: Leo Yan To: James Clark Cc: Arnaldo Carvalho de Melo , Suzuki K Poulose , Mike Leach , John Garry , Will Deacon , Mark Rutland , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] perf cs-etm: Validate timestamp tracing in per-thread mode Message-ID: <20230905013214.GE114383@leoy-huanghe> References: <20230827133557.112494-1-leo.yan@linaro.org> <20230827133557.112494-2-leo.yan@linaro.org> <8eb9b2c0-1dbb-8a93-fc4e-463a6daadb9c@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8eb9b2c0-1dbb-8a93-fc4e-463a6daadb9c@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230904_183403_566487_742305DB X-CRM114-Status: GOOD ( 23.88 ) 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, Sep 04, 2023 at 04:23:43PM +0100, James Clark wrote: > > On 27/08/2023 14:35, Leo Yan wrote: > > So far, it's impossible to validate timestamp trace in Arm CoreSight when > > the perf is in the per-thread mode. E.g. for the command: > > > > perf record -e cs_etm/timestamp/ --per-thread -- ls > > > > The command enables config 'timestamp' for 'cs_etm' event in the > > per-thread mode. In this case, the function cs_etm_validate_config() > > directly bails out and skips validation. > > > > Given profiled process can be scheduled on any CPUs in the per-thread > > mode, this patch validates timestamp tracing for all CPUs when detect > > the CPU map is empty. > > There is an edge case where the profiled process is known by the user to > be pinned to a specific CPU, rather than possibly running on all CPUs, > so this isn't always true. Good point. However, when a process is pinned to specific CPUs, we still can dynamically change the scheduling affinity to any other CPUs by using taskset command or calling sched_setaffinity(). From a perf session's pespective, it is sane to validate timestamp tracing for all online CPUs for per-thread mode. > But I think that can be worked around by changing it to a per-cpu > session to get around the new error. Given that this validation was only > supposed to be best effort information and not get in the way you could > say to not make it more restrictive. > > But it's quite a small edge case so either way: > > Reviewed-by: James Clark Thanks for review! Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel