Re: [PATCH v2] perf stat: Introduce skippable evsels
From: Liang, Kan
Date: Thu Apr 20 2023 - 08:23:41 EST
On 2023-04-20 7:33 a.m., Arnaldo Carvalho de Melo wrote:
> Em Wed, Apr 19, 2023 at 09:51:20AM -0700, Ian Rogers escreveu:
>> On Wed, Apr 19, 2023 at 7:16 AM Liang, Kan <kan.liang@xxxxxxxxxxxxxxx> wrote:
>>> For ADL/RPL platforms
>>> - Segmentation fault which I just found this morning.
>>> # ./perf stat true
>>> Segmentation fault (core dumped)
>
>> This may also stem from the reference count checking work that Arnaldo
>> is currently merging. It is hard to test hybrid because it uses
>> non-generic code paths.
>
> Hey, could you please try this under gdb and provide a backtrace?
Here is the backtrace.
#0 get_group_fd (thread=0, cpu_map_idx=<optimized out>,
evsel=0x555556015af0) at util/evsel.c:1722
#1 evsel__open_cpu (evsel=<optimized out>, cpus=<optimized out>,
threads=<optimized out>,
start_cpu_map_idx=<optimized out>, end_cpu_map_idx=<optimized out>)
at util/evsel.c:2105
#2 0x000055555561dd9e in __run_perf_stat (run_idx=<optimized out>,
argv=0x7fffffffe1d0, argc=1)
at builtin-stat.c:734
#3 run_perf_stat (run_idx=<optimized out>, argv=0x7fffffffe1d0, argc=1)
at builtin-stat.c:949
#4 cmd_stat (argc=1, argv=0x7fffffffe1d0) at builtin-stat.c:2537
#5 0x00005555556b56a0 in run_builtin (p=p@entry=0x555555f84450
<commands+336>, argc=argc@entry=2,
argv=argv@entry=0x7fffffffe1d0) at perf.c:323
#6 0x00005555555fe2d9 in handle_internal_command (argv=0x7fffffffe1d0,
argc=2) at perf.c:377
#7 run_argv (argv=<synthetic pointer>, argcp=<synthetic pointer>) at
perf.c:421
#8 main (argc=2, argv=0x7fffffffe1d0) at perf.c:537
Thanks,
Kan
> It may
> indeed be related to this refcount checking work, there was a bug fixed
> by the ARM guys for cs-etm and I combed thru and fixed some other use
> before check for NULL cases, maybe one more slipped up.
>
> Here I couldn't reproduce, but I don't have a Intel hybrid system, will
> check with an ARM, but unsure if it will exercise the same code paths...
>
> - Arnaldo