linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/1] perf: cs_etm: Allow no sink on command line.
@ 2020-05-26 10:53 Mike Leach
  2020-05-26 10:53 ` [PATCH v4 1/1] perf: cs-etm: Allow no CoreSight sink to be specified " Mike Leach
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Leach @ 2020-05-26 10:53 UTC (permalink / raw)
  To: linux-arm-kernel, coresight, linux-kernel, acme
  Cc: mathieu.poirier, suzuki.poulose, peterz, mingo, Mike Leach

Currently starting CoreSight tracing using perf requires a sink selection
on the command line:-

sudo ./perf record -e cs_etm/@tmc_etr0/ --per-thread uname -a

Not providing the @<sink> here results in an error and no trace produced.

After this set (alongside the CoreSight change set [1]) the infrastructure
will be able to select a default sink:-

sudo ./perf record -e cs_etm// --per-thread uname -a

This matches with the default operation provided with perf and intelpt.

This patch removes the check that a sink value is provided on the command
line with a NULL value passed to the CoreSight infrastructure if omitted.

Note: If this set is applied to a system without [1], then the effect is
benign as the existing CoreSight infrastructure will detect the error and
refuse to trace.

Applies to Linux coresight/next branch

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2020-May/734854.html

Changes since v3:
1) Removed RFC designation and distributed to wider audience.
2) Split set into perf user runtime (this set), and CoreSight driver code.


Mike Leach (1):
  perf: cs-etm: Allow no CoreSight sink to be specified on command line

 tools/perf/arch/arm/util/cs-etm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v4 1/1] perf: cs-etm: Allow no CoreSight sink to be specified on command line
  2020-05-26 10:53 [PATCH v4 0/1] perf: cs_etm: Allow no sink on command line Mike Leach
@ 2020-05-26 10:53 ` Mike Leach
  2020-06-04 21:21   ` Mathieu Poirier
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Leach @ 2020-05-26 10:53 UTC (permalink / raw)
  To: linux-arm-kernel, coresight, linux-kernel, acme
  Cc: mathieu.poirier, suzuki.poulose, peterz, mingo, Mike Leach

Adjust the handling of the session sink selection to allow no sink to
be selected on the command line. This then forwards the sink selection to
the CoreSight infrastructure which will attempt to select a sink based
on the default sink select priorities.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
---
 tools/perf/arch/arm/util/cs-etm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
index 941f814820b8..ed9ea2c60f27 100644
--- a/tools/perf/arch/arm/util/cs-etm.c
+++ b/tools/perf/arch/arm/util/cs-etm.c
@@ -242,10 +242,10 @@ static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
 	}
 
 	/*
-	 * No sink was provided on the command line - for _now_ treat
-	 * this as an error.
+	 * No sink was provided on the command line - allow the CoreSight
+	 * system to look for a default
 	 */
-	return ret;
+	return 0;
 }
 
 static int cs_etm_recording_options(struct auxtrace_record *itr,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v4 1/1] perf: cs-etm: Allow no CoreSight sink to be specified on command line
  2020-05-26 10:53 ` [PATCH v4 1/1] perf: cs-etm: Allow no CoreSight sink to be specified " Mike Leach
@ 2020-06-04 21:21   ` Mathieu Poirier
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2020-06-04 21:21 UTC (permalink / raw)
  To: Mike Leach
  Cc: linux-arm-kernel, coresight, linux-kernel, acme, suzuki.poulose,
	peterz, mingo

On Tue, May 26, 2020 at 11:53:10AM +0100, Mike Leach wrote:
> Adjust the handling of the session sink selection to allow no sink to
> be selected on the command line. This then forwards the sink selection to
> the CoreSight infrastructure which will attempt to select a sink based
> on the default sink select priorities.
> 
> Signed-off-by: Mike Leach <mike.leach@linaro.org>
> ---
>  tools/perf/arch/arm/util/cs-etm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
> index 941f814820b8..ed9ea2c60f27 100644
> --- a/tools/perf/arch/arm/util/cs-etm.c
> +++ b/tools/perf/arch/arm/util/cs-etm.c
> @@ -242,10 +242,10 @@ static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
>  	}
>  
>  	/*
> -	 * No sink was provided on the command line - for _now_ treat
> -	 * this as an error.
> +	 * No sink was provided on the command line - allow the CoreSight
> +	 * system to look for a default
>  	 */
> -	return ret;
> +	return 0;

Leo added a tested-by for this patch. As I wrote on a previous patch we are
currently in the middle of the merge window and as such this set needs to be
rebased on v5.8-rc1 (when it comes out) and sent again.

Thanks,
Mathieu

>  }
>  
>  static int cs_etm_recording_options(struct auxtrace_record *itr,
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-04 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 10:53 [PATCH v4 0/1] perf: cs_etm: Allow no sink on command line Mike Leach
2020-05-26 10:53 ` [PATCH v4 1/1] perf: cs-etm: Allow no CoreSight sink to be specified " Mike Leach
2020-06-04 21:21   ` Mathieu Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).