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

2021-01-21 Thread Arnaldo Carvalho de Melo
Em Wed, Jan 20, 2021 at 10:50:04PM +0100, Jiri Olsa escreveu: > On Wed, Dec 09, 2020 at 08:58:28AM +0800, Jin Yao wrote: > > After: > > swapper 0 [000] 1397040.402011: 272384 > > cpu-clock: 9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) > > s

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

2021-01-20 Thread Jiri Olsa
On Wed, Dec 09, 2020 at 08:58:28AM +0800, 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 bui

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

2021-01-18 Thread Jin, Yao
Hi Arnaldo, Jiri, On 12/25/2020 9:10 AM, Jin, Yao wrote: Hi Arnaldo, Jiri, On 12/11/2020 2:10 PM, Adrian Hunter wrote: On 9/12/20 2:58 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 uncor

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

2020-12-24 Thread Jin, Yao
Hi Arnaldo, Jiri, On 12/11/2020 2:10 PM, Adrian Hunter wrote: On 9/12/20 2:58 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 v2] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-12-10 Thread Adrian Hunter
On 9/12/20 2:58 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 */ > pro

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

2020-12-08 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 = output