lkml.org 
[lkml]   [2022]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH v3 10/10] perf list: Add json output option
    Em Wed, Nov 16, 2022 at 08:51:29AM -0300, Arnaldo Carvalho de Melo escreveu:
    > Em Wed, Nov 16, 2022 at 08:35:28AM -0300, Arnaldo Carvalho de Melo escreveu:
    > > > Please always run 'perf test' before and after your patches and before
    > > > sending it upstream.
    >
    > > Running as !root on a different machine I get some other interesting
    > > info:
    >
    > > ⬢[acme@toolbox perf]$ perf list syscalls:sys_enter_open*
    > > double free or corruption (fasttop)
    > > Aborted (core dumped)
    > > ⬢[acme@toolbox perf]$
    > >
    > > That is:
    > >
    > > free(ps.pmu_glob);
    > >
    > >
    > > at the end of cmd_list().
    >
    > This plus the change to default_ps in the subsequent patch cures the
    > double free, now working on the segfault.

    The segfault is "cured" with:


    diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
    index 3183c0351cda6cee..5eb9ed4a5cd0ad71 100644
    --- a/tools/perf/builtin-list.c
    +++ b/tools/perf/builtin-list.c
    @@ -104,7 +104,7 @@ static void default_print_event(void *ps, const char *pmu_name, const char *topi
    if (deprecated && !print_state->deprecated)
    return;

    - if (print_state->pmu_glob && !strglobmatch(pmu_name, print_state->pmu_glob))
    + if (print_state->pmu_glob && pmu_name && !strglobmatch(pmu_name, print_state->pmu_glob))
    return;

    if (print_state->event_glob &&

    ----------------------------
    But then:

    [root@five ~]# perf list syscalls:sys_enter_open* |& grep syscalls:
    syscalls:sys_enter_open [Tracepoint event]
    syscalls:sys_enter_open_by_handle_at [Tracepoint event]
    syscalls:sys_enter_open_tree [Tracepoint event]
    syscalls:sys_enter_openat [Tracepoint event]
    syscalls:sys_enter_openat2 [Tracepoint event]
    [root@five ~]#
    This stops working, looking into it.

    - Arnaldo

    \
     
     \ /
      Last update: 2022-11-16 13:43    [W:2.582 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site