• Gang Li's avatar
    perf stat: Enable ignore_missing_thread · 448ce0e6
    Gang Li authored
    perf already support ignore_missing_thread for -p, but not yet
    applied to `perf stat -p <pid>`. This patch enables ignore_missing_thread
    for `perf stat -p <pid>`.
    
    Committer notes:
    
    And here is a refresher about the 'ignore_missing_thread' knob, from a
    previous patch using it:
    
      ca800068 ("perf evsel: Enable ignore_missing_thread for pid option")
    
      ---
        While monitoring a multithread process with pid option, perf sometimes
        may return sys_perf_event_open failure with 3(No such process) if any of
        the process's threads die before we open the event. However, we want
        perf continue monitoring the remaining threads and do not exit with
        error.
      ---
    Signed-off-by: default avatarGang Li <ligang.bdlg@bytedance.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20220622030037.15005-1-ligang.bdlg@bytedance.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    448ce0e6
builtin-stat.c 71.2 KB