Re: [PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-12-01 Thread Jin, Yao
Hi Adrian, On 11/26/2020 10:47 PM, Jin, Yao wrote: Hi Adrian, On 11/26/2020 4:36 PM, Adrian Hunter wrote: On 26/11/20 9:06 am, Jin, Yao wrote: Hi Adrian, On 11/26/2020 2:51 PM, Adrian Hunter wrote: On 26/11/20 5:24 am, Jin Yao wrote: When unpacking the event which is from dynamic pmu, the

Re: [PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-11-26 Thread Jin, Yao
Hi Adrian, On 11/26/2020 4:36 PM, Adrian Hunter wrote: On 26/11/20 9:06 am, Jin, Yao wrote: Hi Adrian, On 11/26/2020 2:51 PM, Adrian Hunter wrote: On 26/11/20 5:24 am, Jin Yao wrote: When unpacking the event which is from dynamic pmu, the array output[OUTPUT_TYPE_MAX] may be overrun. For

Re: [PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-11-26 Thread Adrian Hunter
On 26/11/20 9:06 am, Jin, Yao wrote: > Hi Adrian, > > On 11/26/2020 2:51 PM, Adrian Hunter wrote: >> On 26/11/20 5:24 am, Jin Yao wrote: >>> When unpacking the event which is from dynamic pmu, the array >>> output[OUTPUT_TYPE_MAX] may be overrun. For example, type number of >>> SKL uncore_imc is

Re: [PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-11-25 Thread Jin, Yao
Hi Adrian, On 11/26/2020 2:51 PM, Adrian Hunter wrote: On 26/11/20 5:24 am, Jin Yao wrote: When unpacking the event which is from dynamic pmu, the array output[OUTPUT_TYPE_MAX] may be overrun. For example, type number of SKL uncore_imc is 10, but OUTPUT_TYPE_MAX is 7 now (OUTPUT_TYPE_MAX =

Re: [PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-11-25 Thread Adrian Hunter
On 26/11/20 5:24 am, Jin Yao wrote: > When unpacking the event which is from dynamic pmu, the array > output[OUTPUT_TYPE_MAX] may be overrun. For example, type number of > SKL uncore_imc is 10, but OUTPUT_TYPE_MAX is 7 now (OUTPUT_TYPE_MAX = > PERF_TYPE_MAX + 1). > > /* In builtin-script.c */ >

[PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-11-25 Thread Jin Yao
When unpacking the event which is from dynamic pmu, the array output[OUTPUT_TYPE_MAX] may be overrun. For example, type number of SKL uncore_imc is 10, but OUTPUT_TYPE_MAX is 7 now (OUTPUT_TYPE_MAX = PERF_TYPE_MAX + 1). /* In builtin-script.c */ process_event() { unsigned int type =