• Namhyung Kim's avatar
    perf tools: Print lost samples due to BPF filter · 1a5474a7
    Namhyung Kim authored
    Print the actual dropped sample count in the event stat.
    
      $ sudo perf record -o- -e cycles --filter 'period < 10000' \
          -e instructions --filter 'ip > 0x8000000000000000' perf test -w noploop | \
          perf report --stat -i-
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.058 MB - ]
    
      Aggregated stats:
                     TOTAL events:        469
                      MMAP events:        268  (57.1%)
                      COMM events:          2  ( 0.4%)
                      EXIT events:          1  ( 0.2%)
                    SAMPLE events:         16  ( 3.4%)
                     MMAP2 events:         22  ( 4.7%)
              LOST_SAMPLES events:          2  ( 0.4%)
                   KSYMBOL events:         89  (19.0%)
                 BPF_EVENT events:         39  ( 8.3%)
                      ATTR events:          2  ( 0.4%)
            FINISHED_ROUND events:          1  ( 0.2%)
                  ID_INDEX events:          1  ( 0.2%)
                THREAD_MAP events:          1  ( 0.2%)
                   CPU_MAP events:          1  ( 0.2%)
              EVENT_UPDATE events:          2  ( 0.4%)
                 TIME_CONV events:          1  ( 0.2%)
                   FEATURE events:         20  ( 4.3%)
             FINISHED_INIT events:          1  ( 0.2%)
      cycles stats:
                    SAMPLE events:          2
        LOST_SAMPLES (BPF) events:       4010
      instructions stats:
                    SAMPLE events:         14
        LOST_SAMPLES (BPF) events:       3990
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: KP Singh <kpsingh@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Song Liu <song@kernel.org>
    Link: https://lore.kernel.org/r/20240820154504.128923-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    1a5474a7
hist.h 21.2 KB