diff mbox series

[v1,2/6] perf auxtrace arm: Set the 'auxtrace' flag for AUX events

Message ID 20240721202113.380750-3-leo.yan@arm.com (mailing list archive)
State New, archived
Headers show
Series perf auxtrace: Support multiple AUX events | expand

Commit Message

Leo Yan July 21, 2024, 8:21 p.m. UTC
Originally, the 'auxtrace' flag in the PMU event is used for AUX area
sampling. It indicates a PMU event is for AUX tracing.

Set this flag for AUX trace events on Arm.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
 tools/perf/arch/arm/util/pmu.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Adrian Hunter July 22, 2024, 10:49 a.m. UTC | #1
On 21/07/24 23:21, Leo Yan wrote:
> Originally, the 'auxtrace' flag in the PMU event is used for AUX area
> sampling. It indicates a PMU event is for AUX tracing.
> 
> Set this flag for AUX trace events on Arm.
> 
> Signed-off-by: Leo Yan <leo.yan@arm.com>

Note same as:

https://lore.kernel.org/all/20240715160712.127117-6-adrian.hunter@intel.com/

Either should be fine:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  tools/perf/arch/arm/util/pmu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
> index 1c9541d01722..b7fa1245e242 100644
> --- a/tools/perf/arch/arm/util/pmu.c
> +++ b/tools/perf/arch/arm/util/pmu.c
> @@ -25,6 +25,7 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
>  		/* add ETM default config here */
>  		pmu->selectable = true;
>  		pmu->perf_event_attr_init_default = cs_etm_get_default_config;
> +		pmu->auxtrace = true;
>  #if defined(__aarch64__)
>  	} else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) {
>  		pmu->selectable = true;
> @@ -32,8 +33,10 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
>  		pmu->perf_event_attr_init_default = arm_spe_pmu_default_config;
>  		if (strstarts(pmu->name, "arm_spe_"))
>  			pmu->mem_events = perf_mem_events_arm;
> +		pmu->auxtrace = true;
>  	} else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) {
>  		pmu->selectable = true;
> +		pmu->auxtrace = true;
>  #endif
>  	}
>  #endif
Leo Yan July 22, 2024, 2:36 p.m. UTC | #2
On 7/22/24 11:49, Adrian Hunter wrote:
> On 21/07/24 23:21, Leo Yan wrote:
>> Originally, the 'auxtrace' flag in the PMU event is used for AUX area
>> sampling. It indicates a PMU event is for AUX tracing.
>>
>> Set this flag for AUX trace events on Arm.
>>
>> Signed-off-by: Leo Yan <leo.yan@arm.com>
> 
> Note same as:
> 
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20240715160712.127117-6-adrian.hunter%40intel.com%2F&data=05%7C02%7Cleo.yan%40arm.com%7C909e738ccfd84b1ad1dc08dcaa3bf922%7Cf34e597957d94aaaad4db122a662184d%7C0%7C0%7C638572421778104310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=rJq9SLjbFOrZRkWIGLj8Xj682h%2BW%2FD8O0IL3ac0UcO4%3D&reserved=0
> 
> Either should be fine:
> 
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Thank you for the patch, I will drop my one.

Leo
>> ---
>>   tools/perf/arch/arm/util/pmu.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
>> index 1c9541d01722..b7fa1245e242 100644
>> --- a/tools/perf/arch/arm/util/pmu.c
>> +++ b/tools/perf/arch/arm/util/pmu.c
>> @@ -25,6 +25,7 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
>>                /* add ETM default config here */
>>                pmu->selectable = true;
>>                pmu->perf_event_attr_init_default = cs_etm_get_default_config;
>> +             pmu->auxtrace = true;
>>   #if defined(__aarch64__)
>>        } else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) {
>>                pmu->selectable = true;
>> @@ -32,8 +33,10 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
>>                pmu->perf_event_attr_init_default = arm_spe_pmu_default_config;
>>                if (strstarts(pmu->name, "arm_spe_"))
>>                        pmu->mem_events = perf_mem_events_arm;
>> +             pmu->auxtrace = true;
>>        } else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) {
>>                pmu->selectable = true;
>> +             pmu->auxtrace = true;
>>   #endif
>>        }
>>   #endif
>
diff mbox series

Patch

diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
index 1c9541d01722..b7fa1245e242 100644
--- a/tools/perf/arch/arm/util/pmu.c
+++ b/tools/perf/arch/arm/util/pmu.c
@@ -25,6 +25,7 @@  void perf_pmu__arch_init(struct perf_pmu *pmu)
 		/* add ETM default config here */
 		pmu->selectable = true;
 		pmu->perf_event_attr_init_default = cs_etm_get_default_config;
+		pmu->auxtrace = true;
 #if defined(__aarch64__)
 	} else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) {
 		pmu->selectable = true;
@@ -32,8 +33,10 @@  void perf_pmu__arch_init(struct perf_pmu *pmu)
 		pmu->perf_event_attr_init_default = arm_spe_pmu_default_config;
 		if (strstarts(pmu->name, "arm_spe_"))
 			pmu->mem_events = perf_mem_events_arm;
+		pmu->auxtrace = true;
 	} else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) {
 		pmu->selectable = true;
+		pmu->auxtrace = true;
 #endif
 	}
 #endif