1. Aug 12, 2022
    • Leo Yan's avatar
      perf mem: Print snoop peer flag · f78d6250
      Leo Yan authored
      
      
      Since PERF_MEM_SNOOPX_PEER flag is a new snoop type, print this flag if
      it is set.
      
      Before:
             memstress  3603 [020]   122.463754:          1            l1d-miss:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK  N/A               aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1          l1d-access:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK  N/A               aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1            llc-miss:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK  N/A               aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1          llc-access:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK  N/A               aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1          tlb-access:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK  N/A               aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1              memory:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK  N/A               aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
      
      After:
      
             memstress  3603 [020]   122.463754:          1            l1d-miss:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK  N/A              aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1          l1d-access:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK  N/A              aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1            llc-miss:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK  N/A              aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1          llc-access:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK  N/A              aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1          tlb-access:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK  N/A              aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
             memstress  3603 [020]   122.463754:          1              memory:       8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK  N/A              aaaac17c3e88 [unknown] (/home/ubuntu/memstress)
      
      Reviewed-by: default avatarAli Saidi <alisaidi@amazon.com>
      Reviewed-by: default avatarKajol Jain <kjain@linux.ibm.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Tested-by: default avatarAli Saidi <alisaidi@amazon.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Timothy Hayes <timothy.hayes@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20220811062451.435810-3-leo.yan@linaro.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f78d6250
    • Ali Saidi's avatar
      perf tools: Sync addition of PERF_MEM_SNOOPX_PEER · 2e21bcf0
      Ali Saidi authored
      
      
      Add a flag to the 'perf mem' data struct to signal that a request caused
      a cache-to-cache transfer of a line from a peer of the requestor and
      wasn't sourced from a lower cache level.
      
      The line being moved from one peer cache to another has latency and
      performance implications.
      
      On Arm64 Neoverse systems the data source can indicate a cache-to-cache
      transfer but not if the line is dirty or clean, so instead of
      overloading HITM define a new flag that indicates this type of transfer.
      
      Committer notes:
      
      This really is not syncing with the kernel since the patch to the kernel
      wasn't merged.
      
      But we're going ahead of this as it seems trivial and is just a matter
      of the perf kernel maintainers to give their ack or for us to find
      another way of expressing this in the perf records synthesized in
      userspace from the ARM64 hardware traces.
      
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarAli Saidi <alisaidi@amazon.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Timothy Hayes <timothy.hayes@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20220811062451.435810-2-leo.yan@linaro.org
      
      
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2e21bcf0
    • Leo Yan's avatar
      perf arm64: Add missing -I for tools/arch/arm64/include/ to find asm/sysreg.h... · 4a88c4ec
      Leo Yan authored
      
      perf arm64: Add missing -I for tools/arch/arm64/include/ to find asm/sysreg.h when building arm_spe.h
      
      This cures a current problem where tools/perf/util/arm-spe.c isn't
      finding a ARM64 specific asm header, so lets add it for now to make
      progress.
      
      Adding a .o specific rule seems clunky, lets try and find if this is
      really the right solution.
      
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reported-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: James Morse <james.morse@arm.com>
      Link: https://lore.kernel.org/lkml/20220811124825.GA868014@leoy-huanghe.lan
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4a88c4ec
    • Adrian Hunter's avatar
      perf tools: Tidy guest option documentation · 53e76d35
      Adrian Hunter authored
      
      
      Move common guest options into include files. Use attribute substitution to
      customize an example, using "[verse]" to define the block instead of a
      "literal" block which does not permit substitution.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20220811170411.84154-4-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      53e76d35
    • Adrian Hunter's avatar
      perf inject: Fix missing guestmount option documentation · d9ca43c0
      Adrian Hunter authored
      The 'perf inject' documentation is missing the guestmount option. Add it.
      
      Fixes: 97406a7e
      
       ("perf inject: Add support for injecting guest sideband events")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20220811170411.84154-3-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d9ca43c0
    • Adrian Hunter's avatar
      perf script: Fix missing guest option documentation · 696d0a4c
      Adrian Hunter authored
      The 'perf script' documentation is missing several options relating to
      guests.  Add them.
      
      Fixes: 15a108af
      
       ("perf script: Allow specifying the files to process guest samples")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20220811170411.84154-2-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      696d0a4c
    • Namhyung Kim's avatar
      perf offcpu: Update offcpu test for child process · ade1d030
      Namhyung Kim authored
      
      
      Record off-cpu data with perf bench sched messaging workload and count
      the number of offcpu-time events.  Also update the test script not to
      run next tests if failed already and revise the error messages.
      
        $ sudo ./perf test offcpu -v
         88: perf record offcpu profiling tests                              :
        --- start ---
        test child forked, pid 344780
        Checking off-cpu privilege
        Basic off-cpu test
        Basic off-cpu test [Success]
        Child task off-cpu test
        Child task off-cpu test [Success]
        test child finished with 0
        ---- end ----
        perf record offcpu profiling tests: Ok
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220811185456.194721-5-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ade1d030
    • Namhyung Kim's avatar
      perf offcpu: Track child processes · d2347763
      Namhyung Kim authored
      
      
      When -p option used or a workload is given, it needs to handle child
      processes.  The perf_event can inherit those task events
      automatically.  We can add a new BPF program in task_newtask
      tracepoint to track child processes.
      
      Before:
        $ sudo perf record --off-cpu -- perf bench sched messaging
        $ sudo perf report --stat | grep -A1 offcpu
        offcpu-time stats:
                  SAMPLE events:        1
      
      After:
        $ sudo perf record -a --off-cpu -- perf bench sched messaging
        $ sudo perf report --stat | grep -A1 offcpu
        offcpu-time stats:
                  SAMPLE events:      856
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220811185456.194721-4-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d2347763
    • Namhyung Kim's avatar
      perf offcpu: Parse process id separately · d6f415ca
      Namhyung Kim authored
      
      
      The current target code uses thread id for tracking tasks because
      perf_events need to be opened for each task.  But we can use tgid in
      BPF maps and check it easily.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220811185456.194721-3-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d6f415ca
    • Namhyung Kim's avatar
      perf offcpu: Check process id for the given workload · 07fc958b
      Namhyung Kim authored
      
      
      Current task filter checks task->pid which is different for each
      thread.  But we want to profile all the threads in the process.  So
      let's compare process id (or thread-group id: tgid) instead.
      
      Before:
        $ sudo perf record --off-cpu -- perf bench sched messaging -t
        $ sudo perf report --stat | grep -A1 offcpu
        offcpu-time stats:
                  SAMPLE events:        2
      
      After:
        $ sudo perf record --off-cpu -- perf bench sched messaging -t
        $ sudo perf report --stat | grep -A1 offcpu
        offcpu-time stats:
                  SAMPLE events:      850
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220811185456.194721-2-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      07fc958b
  2. Aug 11, 2022
  3. Aug 10, 2022
    • Adrian Hunter's avatar
      perf machine: Fix missing free of machine->kallsyms_filename · b39c9e1b
      Adrian Hunter authored
      Add missing free of machine->kallsyms_filename to machine__exit().
      
      Fixes: a5367ecb
      
       ("perf tools: Automatically use guest kcore_dir if present")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20220809130758.12800-1-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b39c9e1b
    • Adrian Hunter's avatar
      perf script: Fix reference to perf insert instead of perf inject · 0c39f147
      Adrian Hunter authored
      Amend "perf insert" to "perf inject".
      
      Fixes: e28fb159
      
       ("perf script: Add machine_pid and vcpu")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20220809123258.9086-1-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0c39f147
    • Yang Jihong's avatar
      perf sched latency: Fix subcommand matching error · 628881ee
      Yang Jihong authored
      
      
      perf sched latency use strncmp to match subcommands which matching does not
      meet expectation.
      
      Before:
      
        # perf sched lat1234 >/dev/null
        # echo $?
        0
        #
      
      Solution: Use strstarts to match subcommand.
      
      After:
      
         # perf sched lat1234
      
         Usage: perf sched [<options>] {record|latency|map|replay|script|timehist}
      
            -D, --dump-raw-trace  dump raw trace in ASCII
            -f, --force           don't complain, do it
            -i, --input <file>    input file name
            -v, --verbose         be more verbose (show symbol address, etc)
      
        # echo $?
        129
        #
        # perf sched lat >/dev/null
        # echo $?
        0
        #
      
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.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: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220808092408.107399-3-yangjihong1@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      628881ee
    • Yang Jihong's avatar
      perf kvm: Fix subcommand matching error · d2f30b79
      Yang Jihong authored
      
      
      Currently the 'diff', 'top', 'buildid-list' and 'stat' perf commands use
      strncmp() to match subcommands.  As a result, matching does not meet
      expectation.
      
      For example:
        # perf kvm diff1234
        # Event 'cycles'
        #
        # Baseline  Delta Abs  Shared Object  Symbol
        # ........  .........  .............  ......
        #
      
        # Event 'dummy:HG'
        #
        # Baseline  Delta Abs  Shared Object  Symbol
        # ........  .........  .............  ......
        #
        # echo $?
        0
        #
      
      Invalid information should be returned, but success is actually returned.
      
      Solution: Use strstarts() to match subcommands.
      
      After:
        # perf kvm diff1234
      
         Usage: perf kvm [<options>] {top|record|report|diff|buildid-list|stat}
      
            -i, --input <file>    Input file name
            -o, --output <file>   Output file name
            -v, --verbose         be more verbose (show counter open errors, etc)
                --guest           Collect guest os data
                --guest-code      Guest code can be found in hypervisor process
                --guestkallsyms <file>
                                  file saving guest os /proc/kallsyms
                --guestmodules <file>
                                  file saving guest os /proc/modules
                --guestmount <directory>
                                  guest mount directory under which every guest os instance has a subdir
                --guestvmlinux <file>
                                  file saving guest os vmlinux
                --host            Collect host os data
      
        # echo $?
        129
        #
      
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.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: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220808092408.107399-2-yangjihong1@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d2f30b79
    • Christophe JAILLET's avatar
      perf probe: Fix an error handling path in 'parse_perf_probe_command()' · 4bf6dcaa
      Christophe JAILLET authored
      If a memory allocation fail, we should branch to the error handling path
      in order to free some resources allocated a few lines above.
      
      Fixes: 15354d54
      
       ("perf probe: Generate event name with line number")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: kernel-janitors@vger.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/b71bcb01fa0c7b9778647235c3ab490f699ba278.1659797452.git.christophe.jaillet@wanadoo.fr
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4bf6dcaa
    • Brian Robbins's avatar
      perf inject jit: Ignore memfd and anonymous mmap events if jitdump present · 46f7bd5e
      Brian Robbins authored
      
      
      Some processes store jitted code in memfd mappings to avoid having rwx
      mappings.  These processes map the code with a writeable mapping and a
      read-execute mapping.  They write the code using the writeable mapping
      and then unmap the writeable mapping.  All subsequent execution is
      through the read-execute mapping.
      
      perf inject --jit ignores //anon* mappings for each process where a
      jitdump is present because it expects to inject mmap events for each
      jitted code range, and said jitted code ranges will overlap with the
      //anon* mappings.
      
      Ignore /memfd: and [anon:* mappings so that jitted code contained in
      /memfd: and [anon:* mappings is treated the same way as jitted code
      contained in //anon* mappings.
      
      Signed-off-by: default avatarBrian Robbins <brianrob@linux.microsoft.com>
      Acked-by: default avatarIan Rogers <irogers@google.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/20220805220645.95855-1-brianrob@linux.microsoft.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      46f7bd5e
    • Thomas Richter's avatar
      perf list: Add PMU pai_crypto event description for IBM z16 · e0b23af8
      Thomas Richter authored
      
      
      Add the event description for the IBM z16 pai_crypto PMU released with
      commit 1bf54f32f525 ("s390/pai: Add support for cryptography counters")
      
      The document SA22-7832-13 "z/Architecture Principles of Operation",
      published May, 2022, contains the description of the
      Processor Activity Instrumentation Facility and the cryptography
      counter set., See Pages 5-110 to 5-113.
      
      Patch reworked to fit for the converted jevents processing.
      
      Committer notes:
      
      Couldn't find 1bf54f32f525 ("s390/pai: Add support for cryptography
      counters") in torvalds/master, in what tree is that cset?
      
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220804075221.1132849-1-tmricht@linux.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e0b23af8
    • Ian Rogers's avatar
      perf vendor events: Remove bad jaketown uncore events · b48ddbbb
      Ian Rogers authored
      The event converter scripts at:
      
        https://github.com/intel/event-converter-for-linux-perf
      
      passes Filter values from data on 01.org that is bogus in a perf command
      line and can cause perf to infinitely recurse in parse events. Remove
      such events or filters using the updated patch:
      
        https://github.com/intel/event-converter-for-linux-perf/pull/15/commits/afd779df99ee41aac646eae1ae5ae651cda3394d
      
      Fixes: 376d8b58
      
       ("perf vendor events: Update Intel jaketown")
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220805013856.1842878-4-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b48ddbbb
    • Ian Rogers's avatar
      perf vendor events: Remove bad ivytown uncore events · 22de36ff
      Ian Rogers authored
      The event converter scripts at:
      
        https://github.com/intel/event-converter-for-linux-perf
      
      passes Filter values from data on 01.org that is bogus in a perf command
      line and can cause perf to infinitely recurse in parse events. Remove
      such events or filters using the updated patch:
      
        https://github.com/intel/event-converter-for-linux-perf/pull/15/commits/afd779df99ee41aac646eae1ae5ae651cda3394d
      
      Fixes: 62201368
      
       ("perf vendor events: Update Intel ivytown")
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220805013856.1842878-3-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      22de36ff
    • Ian Rogers's avatar
      perf vendor events: Remove bad broadwellde uncore events · 2c98bacf
      Ian Rogers authored
      The event converter scripts at:
      
        https://github.com/intel/event-converter-for-linux-perf
      
      passes Filter values from data on 01.org that is bogus in a perf command
      line and can cause perf to infinitely recurse in parse events. Remove
      such events or filters using the updated patch:
      
        https://github.com/intel/event-converter-for-linux-perf/pull/15/commits/afd779df99ee41aac646eae1ae5ae651cda3394d
      
      Fixes: ef908a19
      
       ("perf vendor events: Update Intel broadwellde")
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220805013856.1842878-2-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2c98bacf
    • Ian Rogers's avatar
      perf jevents: Add JEVENTS_ARCH make option · b4f04660
      Ian Rogers authored
      
      
      Allow the architecture built into pmu-events.c to be set on the make
      command line with JEVENTS_ARCH.
      
      Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lore.kernel.org/lkml/20220804221816.1802790-4-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b4f04660
    • Ian Rogers's avatar
      perf jevents: Simplify generation of C-string · 46acb311
      Ian Rogers authored
      
      
      Previous implementation wanted variable order and '(null)' string output
      to match the C implementation. The '(null)' string output was a
      quirk/bug and so there is no need to carry it forward.
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lore.kernel.org/lkml/20220804221816.1802790-3-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      46acb311
    • Ian Rogers's avatar
      perf jevents: Clean up pytype warnings · e1e19d05
      Ian Rogers authored
      
      
      Improve type hints to clean up pytype warnings.
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lore.kernel.org/lkml/20220804221816.1802790-2-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e1e19d05
    • Roberto Sassu's avatar
      tools build: Switch to new openssl API for test-libcrypto · 5b245985
      Roberto Sassu authored
      Switch to new EVP API for detecting libcrypto, as Fedora 36 returns an
      error when it encounters the deprecated function MD5_Init() and the others.
      
      The error would be interpreted as missing libcrypto, while in reality it is
      not.
      
      Fixes: 6e8ccb4f
      
       ("tools/bpf: properly account for libbfd variations")
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: bpf@vger.kernel.org
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: llvm@lists.linux.dev
      Cc: Martin KaFai Lau <martin.lau@linux.dev>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Quentin Monnet <quentin@isovalent.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stanislav Fomichev <sdf...
      5b245985
    • Arnaldo Carvalho de Melo's avatar
      Revert "perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test" · 73f8ec59
      Arnaldo Carvalho de Melo authored
      This reverts commit 10fef869
      
      .
      
      Because a proper fix was submitted.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      73f8ec59
    • Roberto Sassu's avatar
      perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting · dd6775f9
      Roberto Sassu authored
      
      
      As the building mechanism is now able to retry detection with different
      combinations of linking flags, setting
      FEATURE_CHECK_LDFLAGS-disassembler-four-args and
      FEATURE_CHECK_LDFLAGS-disassembler-init-styled is not necessary anymore,
      so remove it.
      
      Committer notes:
      
      Use the same technique to find the set of bfd-related libraries to link as in:
      
        3308ffc5016e6136 ("tools, build: Retry detection of bfd-related features")
      
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andres Freund <andres@anarazel.de>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: Martin KaFai Lau <martin.lau@linux.dev>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Quentin Monnet <quentin@isovalent.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stanislav Fomichev <sdf@google.com>
      Cc: bpf@vger.kernel.org
      Cc: llvm@lists.linux.dev
      Link: https://lore.kernel.org/r/20220719170555.2576993-3-roberto.sassu@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dd6775f9
    • Roberto Sassu's avatar
      bpftool: Complete libbfd feature detection · 13e6f53a
      Roberto Sassu authored
      Commit 6e8ccb4f ("tools/bpf: properly account for libbfd variations")
      sets the linking flags depending on which flavor of the libbfd feature was
      detected.
      
      However, the flavors except libbfd cannot be detected, as they are not in
      the feature list.
      
      Complete the list of features to detect by adding libbfd-liberty and
      libbfd-liberty-z.
      
      Committer notes:
      
      Adjust conflict with with:
      
        1e1613f6 ("tools bpftool: Don't display disassembler-four-args feature test")
        600b7b26 ("tools bpftool: Fix compilation error with new binutils")
      
      Fixes: 6e8ccb4f
      
       ("tools/bpf: properly account for libbfd variations")
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andres Freund <andres@anarazel.de>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: bpf@vger.kernel.org
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh...
      13e6f53a
    • Roberto Sassu's avatar
      tools, build: Retry detection of bfd-related features · 629b98e2
      Roberto Sassu authored
      
      
      While separate features have been defined to determine which linking flags
      are required to use libbfd depending on the distribution (libbfd,
      libbfd-liberty and libbfd-liberty-z), the same has not been done for other
      features requiring linking to libbfd.
      
      For example, disassembler-four-args requires linking to libbfd too, but it
      should use the right linking flags. If not all the required ones are
      specified, e.g. -liberty, detection will always fail even if the feature is
      available.
      
      Instead of creating new features, similarly to libbfd, simply retry
      detection with the different set of flags until detection succeeds (or
      fails, if the libraries are missing). In this way, feature detection is
      transparent for the users of this building mechanism (e.g. perf), and those
      users don't have for example to set an appropriate value for the
      FEATURE_CHECK_LDFLAGS-disassembler-four-args variable.
      
      The number of retries and features for which the retry mechanism is
      implemented is low enough to make the increase in the complexity of
      Makefile negligible.
      
      Tested with perf and bpftool on Ubuntu 20.04.4 LTS, Fedora 36 and openSUSE
      Tumbleweed.
      
      Committer notes:
      
      Do the retry for disassembler-init-styled as well.
      
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andres Freund <andres@anarazel.de>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: Martin KaFai Lau <martin.lau@linux.dev>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Quentin Monnet <quentin@isovalent.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stanislav Fomichev <sdf@google.com>
      Cc: bpf@vger.kernel.org
      Cc: llvm@lists.linux.dev
      Link: https://lore.kernel.org/r/20220719170555.2576993-1-roberto.sassu@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      629b98e2
    • Claire Jensen's avatar
      perf test: JSON format checking · 0c343af2
      Claire Jensen authored
      
      
      Add field checking tests for perf stat JSON output.
      
      Sanity checks the expected number of fields are present, that the
      expected keys are present and they have the correct values.
      
      Committer notes:
      
      Had to fix this:
      
        -               $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' \
        +               $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \
      
      Committer testing:
      
        [root@quaco ~]# perf test json
         90: perf stat JSON output linter                                    : Ok
        [root@quaco ~]# set -o vi
        [root@quaco ~]# perf test -v json
         90: perf stat JSON output linter                                    :
        --- start ---
        test child forked, pid 560794
        Checking json output: no args [Success]
        Checking json output: system wide [Success]
        Checking json output: system wide Checking json output: system wide no aggregation [Success]
        Checking json output: interval [Success]
        Checking json output: event [Success]
        Checking json output: per core [Success]
        Checking json output: per thread [Success]
        Checking json output: per die [Success]
        Checking json output: per node [Success]
        Checking json output: per socket [Success]
        test child finished with 0
        ---- end ----
        perf stat JSON output linter: Ok
        [root@quaco ~]#
      
      Signed-off-by: default avatarClaire Jensen <cjense@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alyssa Ross <hi@alyssa.is>
      Cc: Claire Jensen <clairej735@gmail.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220805200105.2020995-3-irogers@google.com
      
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0c343af2
    • Claire Jensen's avatar
      perf stat: Add JSON output option · df936cad
      Claire Jensen authored
      
      
      CSV output is tricky to format and column layout changes are susceptible
      to breaking parsers. New JSON-formatted output has variable names to
      identify fields that are consistent and informative, making the output
      parseable.
      
      CSV output example:
      
        1.20,msec,task-clock:u,1204272,100.00,0.697,CPUs utilized
        0,,context-switches:u,1204272,100.00,0.000,/sec
        0,,cpu-migrations:u,1204272,100.00,0.000,/sec
        70,,page-faults:u,1204272,100.00,58.126,K/sec
      
      JSON output example:
      
        {"counter-value" : "3805.723968", "unit" : "msec", "event" :
        "cpu-clock", "event-runtime" : 3805731510100.00, "pcnt-running"
        : 100.00, "metric-value" : 4.007571, "metric-unit" : "CPUs utilized"}
        {"counter-value" : "6166.000000", "unit" : "", "event" :
        "context-switches", "event-runtime" : 3805723045100.00, "pcnt-running"
        : 100.00, "metric-value" : 1.620191, "metric-unit" : "K/sec"}
        {"counter-value" : "466.000000", "unit" : "", "event" :
        "cpu-migrations", "event-runtime" : 3805727613100.00, "pcnt-running"
        : 100.00, "metric-value" : 122.447136, "metric-unit" : "/sec"}
        {"counter-value" : "208.000000", "unit" : "", "event" :
        "page-faults", "event-runtime" : 3805726799100.00, "pcnt-running"
        : 100.00, "metric-value" : 54.654516, "metric-unit" : "/sec"}
      
      Also added documentation for JSON option.
      
      There is some tidy up of CSV code including a potential memory over run
      in the os.nfields set up. To facilitate this an AGGR_MAX value is added.
      
      Committer notes:
      
      Fixed up using PRIu64 to format u64 values, not %lu.
      
      Committer testing:
      
        ⬢[acme@toolbox perf]$ perf stat -j sleep 1
        {"counter-value" : "0.731750", "unit" : "msec", "event" : "task-clock:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000731, "metric-unit" : "CPUs utilized"}
        {"counter-value" : "0.000000", "unit" : "", "event" : "context-switches:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000000, "metric-unit" : "/sec"}
        {"counter-value" : "0.000000", "unit" : "", "event" : "cpu-migrations:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000000, "metric-unit" : "/sec"}
        {"counter-value" : "75.000000", "unit" : "", "event" : "page-faults:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 102.494021, "metric-unit" : "K/sec"}
        {"counter-value" : "578765.000000", "unit" : "", "event" : "cycles:u", "event-runtime" : 379366, "pcnt-running" : 49.00, "metric-value" : 0.790933, "metric-unit" : "GHz"}
        {"counter-value" : "1298.000000", "unit" : "", "event" : "stalled-cycles-frontend:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 0.224271, "metric-unit" : "frontend cycles idle"}
        {"counter-value" : "21984.000000", "unit" : "", "event" : "stalled-cycles-backend:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 3.798433, "metric-unit" : "backend cycles idle"}
        {"counter-value" : "468197.000000", "unit" : "", "event" : "instructions:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 0.808959, "metric-unit" : "insn per cycle"}
        {"metric-value" : 0.046955, "metric-unit" : "stalled cycles per insn"}
        {"counter-value" : "103335.000000", "unit" : "", "event" : "branches:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 141.216262, "metric-unit" : "M/sec"}
        {"counter-value" : "2381.000000", "unit" : "", "event" : "branch-misses:u", "event-runtime" : 388654, "pcnt-running" : 50.00, "metric-value" : 2.304156, "metric-unit" : "of all branches"}
        ⬢[acme@toolbox perf]$
      
      Signed-off-by: default avatarClaire Jensen <cjense@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alyssa Ross <hi@alyssa.is>
      Cc: Claire Jensen <clairej735@gmail.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220805200105.2020995-2-irogers@google.com
      
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      df936cad
  4. Aug 09, 2022