[v6,11/14] kernel: events: Export perf_report_aux_output_id()

Message ID 20221123195010.6859-12-mike.leach@linaro.org
State New
Headers
Series coresight: Add new API to allocate trace source ID values |

Commit Message

Mike Leach Nov. 23, 2022, 7:50 p.m. UTC
  CoreSight trace being updated to use the perf_report_aux_output_id()
in a similar way to intel-pt.

This function in needs export visibility to allow it to be called from
kernel loadable modules, which CoreSight may configured to be built as.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 kernel/events/core.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Suzuki K Poulose Nov. 24, 2022, 11:04 a.m. UTC | #1
Peter


On 23/11/2022 19:50, Mike Leach wrote:
> CoreSight trace being updated to use the perf_report_aux_output_id()
> in a similar way to intel-pt.
> 
> This function in needs export visibility to allow it to be called from
> kernel loadable modules, which CoreSight may configured to be built as.
> 
> Signed-off-by: Mike Leach <mike.leach@linaro.org>
> Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>   kernel/events/core.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 4ec3717003d5..ad388552f1d5 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -9231,6 +9231,7 @@ void perf_report_aux_output_id(struct perf_event *event, u64 hw_id)
>   
>   	perf_output_end(&handle);
>   }
> +EXPORT_SYMBOL_GPL(perf_report_aux_output_id);
>   

Are you happy with me picking up this change through the coresight  tree ?

Suzuki

>   static int
>   __perf_event_account_interrupt(struct perf_event *event, int throttle)
  
Suzuki K Poulose Dec. 13, 2022, 10:08 a.m. UTC | #2
Peter,

On 24/11/2022 11:04, Suzuki Kuruppassery Poulose wrote:
> Peter
> 
> 
> On 23/11/2022 19:50, Mike Leach wrote:
>> CoreSight trace being updated to use the perf_report_aux_output_id()
>> in a similar way to intel-pt.
>>
>> This function in needs export visibility to allow it to be called from
>> kernel loadable modules, which CoreSight may configured to be built as.
>>
>> Signed-off-by: Mike Leach <mike.leach@linaro.org>
>> Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> ---
>>   kernel/events/core.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>> index 4ec3717003d5..ad388552f1d5 100644
>> --- a/kernel/events/core.c
>> +++ b/kernel/events/core.c
>> @@ -9231,6 +9231,7 @@ void perf_report_aux_output_id(struct perf_event 
>> *event, u64 hw_id)
>>       perf_output_end(&handle);
>>   }
>> +EXPORT_SYMBOL_GPL(perf_report_aux_output_id);
> 
> Are you happy with me picking up this change through the coresight  tree ?
> 
> Suzuki
> 

Please could you let me know your thoughts on this ? Coresight PMU would
use this to inform the dynamically allocated trace id for a CPU to the
perf via this HWID packet.

If you are happy with the above change, I could pick it up via the
coresight tree with your Ack. Otherwise, please could you pick it
up ?

Suzuki
  
Suzuki K Poulose Jan. 6, 2023, 9:54 a.m. UTC | #3
Peter, Ingo, Arnaldo

On 13/12/2022 10:08, Suzuki K Poulose wrote:
> Peter,
> 
> On 24/11/2022 11:04, Suzuki Kuruppassery Poulose wrote:
>> Peter
>>
>>
>> On 23/11/2022 19:50, Mike Leach wrote:
>>> CoreSight trace being updated to use the perf_report_aux_output_id()
>>> in a similar way to intel-pt.
>>>
>>> This function in needs export visibility to allow it to be called from
>>> kernel loadable modules, which CoreSight may configured to be built as.
>>>
>>> Signed-off-by: Mike Leach <mike.leach@linaro.org>
>>> Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>>> ---
>>>   kernel/events/core.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>>> index 4ec3717003d5..ad388552f1d5 100644
>>> --- a/kernel/events/core.c
>>> +++ b/kernel/events/core.c
>>> @@ -9231,6 +9231,7 @@ void perf_report_aux_output_id(struct 
>>> perf_event *event, u64 hw_id)
>>>       perf_output_end(&handle);
>>>   }
>>> +EXPORT_SYMBOL_GPL(perf_report_aux_output_id);
>>
>> Are you happy with me picking up this change through the coresight  
>> tree ?
>>
>> Suzuki
>>
> 
> Please could you let me know your thoughts on this ? Coresight PMU would
> use this to inform the dynamically allocated trace id for a CPU to the
> perf via this HWID packet.
> 
> If you are happy with the above change, I could pick it up via the
> coresight tree with your Ack. Otherwise, please could you pick it
> up ?
>

Please could you let us know if this is acceptable and if so, how can
this be pushed ? CoreSight PMU (which can be built as a module) is using
these packets to advertise the traceID allocated for a given CPU bound
ETM (which is made dynamic due to the limited number of ids available).
The perf tool can use these packets to then decode and separate the
trace data from shared buffer.

As of now, the series to enable the dynamic trace id allocation is
blocked on this change.


Kind regards
Suzuki

> Suzuki
>
  
Peter Zijlstra Jan. 12, 2023, 3:06 p.m. UTC | #4
On Wed, Nov 23, 2022 at 07:50:07PM +0000, Mike Leach wrote:
> CoreSight trace being updated to use the perf_report_aux_output_id()
> in a similar way to intel-pt.
> 
> This function in needs export visibility to allow it to be called from
> kernel loadable modules, which CoreSight may configured to be built as.
> 
> Signed-off-by: Mike Leach <mike.leach@linaro.org>
> Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

> ---
>  kernel/events/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 4ec3717003d5..ad388552f1d5 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -9231,6 +9231,7 @@ void perf_report_aux_output_id(struct perf_event *event, u64 hw_id)
>  
>  	perf_output_end(&handle);
>  }
> +EXPORT_SYMBOL_GPL(perf_report_aux_output_id);
>  
>  static int
>  __perf_event_account_interrupt(struct perf_event *event, int throttle)
> -- 
> 2.17.1
>
  

Patch

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 4ec3717003d5..ad388552f1d5 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9231,6 +9231,7 @@  void perf_report_aux_output_id(struct perf_event *event, u64 hw_id)
 
 	perf_output_end(&handle);
 }
+EXPORT_SYMBOL_GPL(perf_report_aux_output_id);
 
 static int
 __perf_event_account_interrupt(struct perf_event *event, int throttle)