Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: James Clark <james.clark@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	John Garry <john.g.garry@oracle.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	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
Date: Tue, 5 Sep 2023 09:33:38 +0800	[thread overview]
Message-ID: <20230905013214.GE114383@leoy-huanghe> (raw)
In-Reply-To: <8eb9b2c0-1dbb-8a93-fc4e-463a6daadb9c@arm.com>

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 <james.clark@arm.com>

Thanks for review!

Leo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-09-05  1:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-27 13:35 [PATCH v1 0/2] perf cs-etm: Improve timestamp tracing Leo Yan
2023-08-27 13:35 ` [PATCH v1 1/2] perf cs-etm: Validate timestamp tracing in per-thread mode Leo Yan
2023-09-04 15:23   ` James Clark
2023-09-05  1:33     ` Leo Yan [this message]
2023-08-27 13:35 ` [PATCH v1 2/2] perf cs-etm: Respect timestamp option Leo Yan
2023-09-04 15:25   ` James Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230905013214.GE114383@leoy-huanghe \
    --to=leo.yan@linaro.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox