• J
    perf evsel: Add verbose output for sys_perf_event_open fallback · 2b04e0f8
    Jiri Olsa 提交于
    Adding info about what is being switched off in the sys_perf_event_open
    fallback.
    
    New output (notice the 'switching off' lines):
    
      $ perf stat -e '{cycles,instructions}' -vvv ls
      Using CPUID GenuineIntel-6-3D
      intel_pt default config: tsc
      ------------------------------------------------------------
      perf_event_attr:
        size                             112
        sample_type                      IDENTIFIER
        read_format                      TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
        disabled                         1
        inherit                          1
        enable_on_exec                   1
        exclude_guest                    1
      ------------------------------------------------------------
      sys_perf_event_open: pid 3591  cpu -1  group_fd -1  flags 0x8
      sys_perf_event_open failed, error -22
      switching off cloexec flag
      ------------------------------------------------------------
      perf_event_attr:
        size                             112
        sample_type                      IDENTIFIER
        read_format                      TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
        disabled                         1
        inherit                          1
        enable_on_exec                   1
        exclude_guest                    1
      ------------------------------------------------------------
      sys_perf_event_open: pid 3591  cpu -1  group_fd -1  flags 0
      sys_perf_event_open failed, error -22
      switching off exclude_guest, exclude_host
      ------------------------------------------------------------
      perf_event_attr:
        size                             112
        sample_type                      IDENTIFIER
        read_format                      TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
        disabled                         1
        inherit                          1
        enable_on_exec                   1
      ------------------------------------------------------------
      sys_perf_event_open: pid 3591  cpu -1  group_fd -1  flags 0
      sys_perf_event_open failed, error -22
      switching off sample_id_all
      ------------------------------------------------------------
      perf_event_attr:
        size                             112
        sample_type                      IDENTIFIER
        read_format                      TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
        disabled                         1
        inherit                          1
        enable_on_exec                   1
      ...
    Signed-off-by: NJiri Olsa <jolsa@kernel.org>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andi Kleen <andi@firstfloor.org>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20170721121212.21414-2-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    2b04e0f8
evsel.c 64.7 KB