All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf arm-spe: Use advertised caps/min_interval as default sample_period
@ 2022-02-21 17:10 ` German Gomez
  0 siblings, 0 replies; 6+ messages in thread
From: German Gomez @ 2022-02-21 17:10 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme
  Cc: German Gomez, John Garry, Will Deacon, Mathieu Poirier, Leo Yan,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel

When recording SPE traces, the default sample_period is currently being
set to 1 in the perf_event_attr fields, instead of the value advertised
in '/sys/devices/arm_spe_0/caps/min_interval':

Before:

$ perf record -e arm_spe// -vv -- sleep 1
[...]
  { sample_period, sample_freq }   1
[...]

Use the value from the above sysfs location as a more sensible default
(it was already being read, but the value not being used)

After:

$ perf record -e arm_spe// -vv -- sleep 1
[...]
  { sample_period, sample_freq }   1024
[...]

Signed-off-by: German Gomez <german.gomez@arm.com>
---
 tools/perf/arch/arm64/util/arm-spe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 2100d46cc..5860bbaea 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -158,7 +158,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
 				return -EINVAL;
 			}
 			evsel->core.attr.freq = 0;
-			evsel->core.attr.sample_period = 1;
+			evsel->core.attr.sample_period = arm_spe_pmu->default_config->sample_period;
 			arm_spe_evsel = evsel;
 			opts->full_auxtrace = true;
 		}
-- 
2.25.1


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

* [PATCH] perf arm-spe: Use advertised caps/min_interval as default sample_period
@ 2022-02-21 17:10 ` German Gomez
  0 siblings, 0 replies; 6+ messages in thread
From: German Gomez @ 2022-02-21 17:10 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme
  Cc: German Gomez, John Garry, Will Deacon, Mathieu Poirier, Leo Yan,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel

When recording SPE traces, the default sample_period is currently being
set to 1 in the perf_event_attr fields, instead of the value advertised
in '/sys/devices/arm_spe_0/caps/min_interval':

Before:

$ perf record -e arm_spe// -vv -- sleep 1
[...]
  { sample_period, sample_freq }   1
[...]

Use the value from the above sysfs location as a more sensible default
(it was already being read, but the value not being used)

After:

$ perf record -e arm_spe// -vv -- sleep 1
[...]
  { sample_period, sample_freq }   1024
[...]

Signed-off-by: German Gomez <german.gomez@arm.com>
---
 tools/perf/arch/arm64/util/arm-spe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 2100d46cc..5860bbaea 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -158,7 +158,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
 				return -EINVAL;
 			}
 			evsel->core.attr.freq = 0;
-			evsel->core.attr.sample_period = 1;
+			evsel->core.attr.sample_period = arm_spe_pmu->default_config->sample_period;
 			arm_spe_evsel = evsel;
 			opts->full_auxtrace = true;
 		}
-- 
2.25.1


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

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

* Re: [PATCH] perf arm-spe: Use advertised caps/min_interval as default sample_period
  2022-02-21 17:10 ` German Gomez
@ 2022-02-23  1:14   ` Leo Yan
  -1 siblings, 0 replies; 6+ messages in thread
From: Leo Yan @ 2022-02-23  1:14 UTC (permalink / raw)
  To: German Gomez
  Cc: linux-kernel, linux-perf-users, acme, John Garry, Will Deacon,
	Mathieu Poirier, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, linux-arm-kernel

On Mon, Feb 21, 2022 at 05:10:42PM +0000, German Gomez wrote:
> When recording SPE traces, the default sample_period is currently being
> set to 1 in the perf_event_attr fields, instead of the value advertised
> in '/sys/devices/arm_spe_0/caps/min_interval':
> 
> Before:
> 
> $ perf record -e arm_spe// -vv -- sleep 1
> [...]
>   { sample_period, sample_freq }   1
> [...]
> 
> Use the value from the above sysfs location as a more sensible default
> (it was already being read, but the value not being used)
> 
> After:
> 
> $ perf record -e arm_spe// -vv -- sleep 1
> [...]
>   { sample_period, sample_freq }   1024
> [...]
> 
> Signed-off-by: German Gomez <german.gomez@arm.com>

The change looks good to me:

Reviewed-by: Leo Yan <leo.yan@linaro.org>

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

* Re: [PATCH] perf arm-spe: Use advertised caps/min_interval as default sample_period
@ 2022-02-23  1:14   ` Leo Yan
  0 siblings, 0 replies; 6+ messages in thread
From: Leo Yan @ 2022-02-23  1:14 UTC (permalink / raw)
  To: German Gomez
  Cc: linux-kernel, linux-perf-users, acme, John Garry, Will Deacon,
	Mathieu Poirier, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, linux-arm-kernel

On Mon, Feb 21, 2022 at 05:10:42PM +0000, German Gomez wrote:
> When recording SPE traces, the default sample_period is currently being
> set to 1 in the perf_event_attr fields, instead of the value advertised
> in '/sys/devices/arm_spe_0/caps/min_interval':
> 
> Before:
> 
> $ perf record -e arm_spe// -vv -- sleep 1
> [...]
>   { sample_period, sample_freq }   1
> [...]
> 
> Use the value from the above sysfs location as a more sensible default
> (it was already being read, but the value not being used)
> 
> After:
> 
> $ perf record -e arm_spe// -vv -- sleep 1
> [...]
>   { sample_period, sample_freq }   1024
> [...]
> 
> Signed-off-by: German Gomez <german.gomez@arm.com>

The change looks good to me:

Reviewed-by: Leo Yan <leo.yan@linaro.org>

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

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

* Re: [PATCH] perf arm-spe: Use advertised caps/min_interval as default sample_period
  2022-02-23  1:14   ` Leo Yan
@ 2022-02-23 10:02     ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-02-23 10:02 UTC (permalink / raw)
  To: Leo Yan
  Cc: German Gomez, linux-kernel, linux-perf-users, John Garry,
	Will Deacon, Mathieu Poirier, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, linux-arm-kernel

Em Wed, Feb 23, 2022 at 09:14:36AM +0800, Leo Yan escreveu:
> On Mon, Feb 21, 2022 at 05:10:42PM +0000, German Gomez wrote:
> > When recording SPE traces, the default sample_period is currently being
> > set to 1 in the perf_event_attr fields, instead of the value advertised
> > in '/sys/devices/arm_spe_0/caps/min_interval':
> > 
> > Before:
> > 
> > $ perf record -e arm_spe// -vv -- sleep 1
> > [...]
> >   { sample_period, sample_freq }   1
> > [...]
> > 
> > Use the value from the above sysfs location as a more sensible default
> > (it was already being read, but the value not being used)
> > 
> > After:
> > 
> > $ perf record -e arm_spe// -vv -- sleep 1
> > [...]
> >   { sample_period, sample_freq }   1024
> > [...]
> > 
> > Signed-off-by: German Gomez <german.gomez@arm.com>
> 
> The change looks good to me:
> 
> Reviewed-by: Leo Yan <leo.yan@linaro.org>

Thanks, applied.

- Arnaldo


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

* Re: [PATCH] perf arm-spe: Use advertised caps/min_interval as default sample_period
@ 2022-02-23 10:02     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-02-23 10:02 UTC (permalink / raw)
  To: Leo Yan
  Cc: German Gomez, linux-kernel, linux-perf-users, John Garry,
	Will Deacon, Mathieu Poirier, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, linux-arm-kernel

Em Wed, Feb 23, 2022 at 09:14:36AM +0800, Leo Yan escreveu:
> On Mon, Feb 21, 2022 at 05:10:42PM +0000, German Gomez wrote:
> > When recording SPE traces, the default sample_period is currently being
> > set to 1 in the perf_event_attr fields, instead of the value advertised
> > in '/sys/devices/arm_spe_0/caps/min_interval':
> > 
> > Before:
> > 
> > $ perf record -e arm_spe// -vv -- sleep 1
> > [...]
> >   { sample_period, sample_freq }   1
> > [...]
> > 
> > Use the value from the above sysfs location as a more sensible default
> > (it was already being read, but the value not being used)
> > 
> > After:
> > 
> > $ perf record -e arm_spe// -vv -- sleep 1
> > [...]
> >   { sample_period, sample_freq }   1024
> > [...]
> > 
> > Signed-off-by: German Gomez <german.gomez@arm.com>
> 
> The change looks good to me:
> 
> Reviewed-by: Leo Yan <leo.yan@linaro.org>

Thanks, applied.

- Arnaldo


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

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

end of thread, other threads:[~2022-02-23 10:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-21 17:10 [PATCH] perf arm-spe: Use advertised caps/min_interval as default sample_period German Gomez
2022-02-21 17:10 ` German Gomez
2022-02-23  1:14 ` Leo Yan
2022-02-23  1:14   ` Leo Yan
2022-02-23 10:02   ` Arnaldo Carvalho de Melo
2022-02-23 10:02     ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.