linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] perf arm_spe: Add a macro definition to handle offset value
@ 2025-10-16  8:30 tanze
  2025-10-16  9:09 ` Leo Yan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: tanze @ 2025-10-16  8:30 UTC (permalink / raw)
  To: james.clark
  Cc: linux-arm-kernel, linux-perf-users, linux-kernel, graham.woodward,
	tanze

Add a macro definition SPE_SYNTH_ID_OFFSET to handle the offset value
and improve readability.

Signed-off-by: tanze <tanze@kylinos.cn>
---
 tools/perf/util/arm-spe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 71be979f5077..645048ac7708 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -36,6 +36,7 @@
 
 #include "../../arch/arm64/include/asm/cputype.h"
 #define MAX_TIMESTAMP (~0ULL)
+#define SPE_SYNTH_ID_OFFSET (1000000000ULL)
 
 #define is_ldst_op(op)		(!!((op) & ARM_SPE_OP_LDST))
 
@@ -1732,7 +1733,7 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session)
 	attr.sample_period = spe->synth_opts.period;
 
 	/* create new id val to be a fixed offset from evsel id */
-	id = evsel->core.id[0] + 1000000000;
+	id = evsel->core.id[0] + SPE_SYNTH_ID_OFFSET;
 
 	if (!id)
 		id = 1;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH v1] perf arm_spe: Add a macro definition to handle offset value
@ 2025-10-16  8:41 tanze
  0 siblings, 0 replies; 9+ messages in thread
From: tanze @ 2025-10-16  8:41 UTC (permalink / raw)
  To: james.clark, leo.yan, irogers, john.g.garry
  Cc: linux-arm-kernel, linux-perf-users, linux-kernel, graham.woodward,
	mike.leach, tanze

Add a macro definition SPE_SYNTH_ID_OFFSET to handle the offset value
and improve readability.

Signed-off-by: tanze <tanze@kylinos.cn>
---
 tools/perf/util/arm-spe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 71be979f5077..645048ac7708 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -36,6 +36,7 @@
 
 #include "../../arch/arm64/include/asm/cputype.h"
 #define MAX_TIMESTAMP (~0ULL)
+#define SPE_SYNTH_ID_OFFSET (1000000000ULL)
 
 #define is_ldst_op(op)		(!!((op) & ARM_SPE_OP_LDST))
 
@@ -1732,7 +1733,7 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session)
 	attr.sample_period = spe->synth_opts.period;
 
 	/* create new id val to be a fixed offset from evsel id */
-	id = evsel->core.id[0] + 1000000000;
+	id = evsel->core.id[0] + SPE_SYNTH_ID_OFFSET;
 
 	if (!id)
 		id = 1;
-- 
2.25.1


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

end of thread, other threads:[~2025-10-24  8:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16  8:30 [PATCH v1] perf arm_spe: Add a macro definition to handle offset value tanze
2025-10-16  9:09 ` Leo Yan
     [not found] ` <1760620322251982.15.seg@mailgw.kylinos.cn>
2025-10-17  1:07   ` tanze
2025-10-17  2:15 ` [PATCH v2] " tanze
2025-10-17 10:09   ` Leo Yan
2025-10-19  3:05   ` Namhyung Kim
2025-10-24  6:27   ` Adrian Hunter
2025-10-24  8:10     ` Leo Yan
  -- strict thread matches above, loose matches on Subject: below --
2025-10-16  8:41 [PATCH v1] " tanze

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).