1. 04 Apr, 2023 21 commits
    • Kajol Jain's avatar
      perf vendor events power9: Remove UTF-8 characters from JSON files · 5d9df873
      Kajol Jain authored
      Commit 3c22ba52 ("perf vendor events powerpc: Update POWER9
      events") added and updated power9 PMU JSON events. However some of the
      JSON events which are part of other.json and pipeline.json files,
      contains UTF-8 characters in their brief description.  Having UTF-8
      character could breaks the perf build on some distros.
      
      Fix this issue by removing the UTF-8 characters from other.json and
      pipeline.json files.
      
      Result without the fix:
      
        [command]# file -i pmu-events/arch/powerpc/power9/*
        pmu-events/arch/powerpc/power9/cache.json:          application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/floating-point.json: application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/frontend.json:       application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/marked.json:         application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/memory.json:         application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/metrics.json:        application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/nest_metrics.json:   application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/other.json:          application/json; charset=utf-8
        pmu-events/arch/powerpc/power9/pipeline.json:       application/json; charset=utf-8
        pmu-events/arch/powerpc/power9/pmc.json:            application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/translation.json:    application/json; charset=us-ascii
        [command]#
      
      Result with the fix:
      
        [command]# file -i pmu-events/arch/powerpc/power9/*
        pmu-events/arch/powerpc/power9/cache.json:          application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/floating-point.json: application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/frontend.json:       application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/marked.json:         application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/memory.json:         application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/metrics.json:        application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/nest_metrics.json:   application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/other.json:          application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/pipeline.json:       application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/pmc.json:            application/json; charset=us-ascii
        pmu-events/arch/powerpc/power9/translation.json:    application/json; charset=us-ascii
        [command]#
      
      Fixes: 3c22ba52 ("perf vendor events powerpc: Update POWER9 events")
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@kernel.com>
      Signed-off-by: default avatarKajol Jain <kjain@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Disha Goel <disgoel@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: https://lore.kernel.org/lkml/ZBxP77deq7ikTxwG@kernel.org/
      Link: https://lore.kernel.org/r/20230328112908.113158-1-kjain@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5d9df873
    • Yang Jihong's avatar
      perf ftrace: Make system wide the default target for latency subcommand · ecd4960d
      Yang Jihong authored
      If no target is specified for 'latency' subcommand, the execution fails
      because - 1 (invalid value) is written to set_ftrace_pid tracefs file.
      Make system wide the default target, which is the same as the default
      behavior of 'trace' subcommand.
      
      Before the fix:
      
        # perf ftrace latency -T schedule
        failed to set ftrace pid
      
      After the fix:
      
        # perf ftrace latency -T schedule
        ^C#   DURATION     |      COUNT | GRAPH                                          |
             0 - 1    us |          0 |                                                |
             1 - 2    us |          0 |                                                |
             2 - 4    us |          0 |                                                |
             4 - 8    us |       2828 | ####                                           |
             8 - 16   us |      23953 | ########################################       |
            16 - 32   us |        408 |                                                |
            32 - 64   us |        318 |                                                |
            64 - 128  us |          4 |                                                |
           128 - 256  us |          3 |                                                |
           256 - 512  us |          0 |                                                |
           512 - 1024 us |          1 |                                                |
             1 - 2    ms |          4 |                                                |
             2 - 4    ms |          0 |                                                |
             4 - 8    ms |          0 |                                                |
             8 - 16   ms |          0 |                                                |
            16 - 32   ms |          0 |                                                |
            32 - 64   ms |          0 |                                                |
            64 - 128  ms |          0 |                                                |
           128 - 256  ms |          4 |                                                |
           256 - 512  ms |          2 |                                                |
           512 - 1024 ms |          0 |                                                |
             1 - ...   s |          0 |                                                |
      
      Fixes: 53be5028 ("perf ftrace: Add 'latency' subcommand")
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.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/20230324032702.109964-1-yangjihong1@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ecd4960d
    • Tiezhu Yang's avatar
      perf bench syscall: Add fork syscall benchmark · ece7f7c0
      Tiezhu Yang authored
      This is a follow up patch for the execve bench which is actually
      fork + execve, it makes sense to add the fork syscall benchmark
      to compare the execve part precisely.
      
      Some archs have no __NR_fork definition which is used only as a
      check condition to call test_fork(), let us just define it as -1
      to avoid build error.
      Suggested-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.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>
      Cc: loongson-kernel@lists.loongnix.cn
      Link: https://lore.kernel.org/r/1679381821-22736-1-git-send-email-yangtiezhu@loongson.cnSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ece7f7c0
    • Thomas Richter's avatar
      perf stat: Suppress warning when using cpum_cf events on s390 · 51ea4cb9
      Thomas Richter authored
      Running command perf stat -vv -e cpu_cycles -C0 -- true
      displays this warning:
      
       Attempting to add event pmu 'cpum_cf' with 'cpu_cycles,'
       that may result in non-fatal errors
      
      Make the PMU cpum_cf selectable and avoid this warning.
      While at it also fix this warning for PMUs pai_crypto and pai_ext.
      
      Output before:
      
       #  ./perf stat -vv -e cpu_cycles -C0 -- true
       Using CPUID IBM,3931,704,A01,3.7,002f
       Attempting to add event pmu 'cpum_cf' with 'cpu_cycles,'
         that may result in non-fatal errors
       After aliases, add event pmu 'cpum_cf' with 'event,'
         that may result in non-fatal errors
         cpu_cycles -> cpum_cf/event=0/
       Control descriptor is not initialized
       ------------------------------------------------------------
       perf_event_attr:
        type                             10
        size                             128
        config                           0x1001
        sample_type                      IDENTIFIER
        read_format                      TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
        disabled                         1
        inherit                          1
        exclude_guest                    1
       ------------------------------------------------------------
       sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 3
       cpu_cycles: 0: 290434 2479172 2479172:
       cpu_cycles: 290434 2479172 2479172
      
       Performance counter stats for 'CPU(s) 0':
      
                 290,434      cpu_cycles
      
             0.002465617 seconds time elapsed
       #
      
      Now the warning "Attempting to add event pmu 'cpum_cf' ..."
      does not show up anymore.
      
      Output after:
       # ./perf stat -vv -e cpu_cycles -C0 -- true
       Using CPUID IBM,3931,704,A01,3.7,002f
       After aliases, add event pmu 'cpum_cf' with 'event,'
         that may result in non-fatal errors
         cpu_cycles -> cpum_cf/event=0/
       Control descriptor is not initialized
       ....
      
       Performance counter stats for 'CPU(s) 0':
      
                 357,023      cpu_cycles
      
             0.002454995 seconds time elapsed
       #
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230316074946.41110-1-tmricht@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      51ea4cb9
    • Patrice Duroux's avatar
      7f8d3fbe
    • Patrice Duroux's avatar
      perf tests record_offcpu.sh: Fix redirection of stderr to stdin · 9835b742
      Patrice Duroux authored
      It's not 2&>1, the correct is 2>&1
      
      Fixes: ade1d030 ("perf offcpu: Update offcpu test for child process")
      Signed-off-by: default avatarPatrice Duroux <patrice.duroux@gmail.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20230303193058.21274-1-patrice.duroux@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9835b742
    • Ian Rogers's avatar
      perf vendor events intel: Update metrics to detect pmem at runtime · 31c5ba6c
      Ian Rogers authored
      By detecting whether nvdimms are installed at runtime the number of
      events can be reduced if it isn't. These changes come from this PR:
      https://github.com/intel/perfmon/pull/63Reviewed-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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      31c5ba6c
    • Ian Rogers's avatar
      perf metrics: Add has_pmem literal · c3bf86f1
      Ian Rogers authored
      Add literal so that if nvdimms aren't installed we can record fewer
      events.  The file detection mechanism was suggested by Dan Williams
      <dan.j.williams@intel.com> in:
      
        https://lore.kernel.org/linux-perf-users/641bbe1eced26_1b98bb29440@dwillia2-xfh.jf.intel.com.notmuch/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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c3bf86f1
    • Ian Rogers's avatar
      perf vendor events intel: Sandybridge v19 events · e559b6f5
      Ian Rogers authored
      Adds BR_MISP_EXEC.INDIRECT event.
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e559b6f5
    • Ian Rogers's avatar
      perf vendor events intel: Jaketown v23 events · 101a25b5
      Ian Rogers authored
      Adds BR_MISP_EXEC.INDIRECT event.
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      101a25b5
    • Ian Rogers's avatar
      perf vendor events intel: Haswellx v27 events · 6e884dad
      Ian Rogers authored
      Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events.
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6e884dad
    • Ian Rogers's avatar
      perf vendor events intel: Haswell v33 events · 67245a7e
      Ian Rogers authored
      Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events.
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      67245a7e
    • Ian Rogers's avatar
      perf vendor events intel: Broadwellx v20 events · 74a87b6a
      Ian Rogers authored
      Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events.
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      74a87b6a
    • Ian Rogers's avatar
      perf vendor events intel: Broadwellde v9 events · 8aae803f
      Ian Rogers authored
      Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events.
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8aae803f
    • Ian Rogers's avatar
      perf vendor events intel: Broadwell v27 events · 78036545
      Ian Rogers authored
      Description updates and formatting changes.
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Edward Baker <edward.baker@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: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      78036545
    • Namhyung Kim's avatar
      perf lock contention: Fix msan issue in lock_contention_read() · 5d8c0f0e
      Namhyung Kim authored
      I got a report of a msan failure like below:
      
        $ sudo perf lock con -ab -- sleep 1
        ...
        ==224416==WARNING: MemorySanitizer: use-of-uninitialized-value
            #0 0x5651160d6c96 in lock_contention_read  util/bpf_lock_contention.c:290:8
            #1 0x565115f90870 in __cmd_contention  builtin-lock.c:1919:3
            #2 0x565115f90870 in cmd_lock  builtin-lock.c:2385:8
            #3 0x565115f03a83 in run_builtin  perf.c:330:11
            #4 0x565115f03756 in handle_internal_command  perf.c:384:8
            #5 0x565115f02d53 in run_argv  perf.c:428:2
            #6 0x565115f02d53 in main  perf.c:562:3
            #7 0x7f43553bc632 in __libc_start_main
            #8 0x565115e865a9 in _start
      
      It was because the 'key' variable is not initialized.  Actually it'd be set
      by bpf_map_get_next_key() but msan didn't seem to understand it.  Let's make
      msan happy by initializing the variable.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20230324001922.937634-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5d8c0f0e
    • Thomas Richter's avatar
      perf vendor events s390: Remove UTF-8 characters from JSON file · eb2feb68
      Thomas Richter authored
      Commit 7f76b311 ("perf list: Add IBM z16 event description for
      s390") contains the verbal description for z16 extended counter set.
      
      However some entries of the public description contain UTF-8 characters
      which breaks the build on some distros.
      
      Fix this and remove the UTF-8 characters.
      
      Fixes: 7f76b311 ("perf list: Add IBM z16 event description for s390")
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Suggested-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: https://lore.kernel.org/r/ZBwkl77/I31AQk12@osirisSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eb2feb68
    • Namhyung Kim's avatar
      perf hist: Improve srcfile sort key performance (really) · 6094c774
      Namhyung Kim authored
      The earlier commit f0cdde28 ("perf hist: Improve srcfile sort
      key performance") updated the srcfile logic but missed to change the
      ->cmp() callback which is called for every sample.
      
      It should use the same logic like in the srcline to speed up the
      processing because it'd return the same information repeatedly for the
      same address.  The real processing will be done in
      sort__srcfile_collapse().
      
      Fixes: f0cdde28 ("perf hist: Improve srcfile sort key performance")
      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: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20230323025005.191239-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6094c774
    • Thomas Richter's avatar
      perf test: Fix wrong size expectation for 'Setup struct perf_event_attr' · 30df88a8
      Thomas Richter authored
      The test case "perf test 'Setup struct perf_event_attr'" is failing.
      
      On s390 this output is observed:
      
       # ./perf test -Fvvvv 17
       17: Setup struct perf_event_attr                                    :
       --- start ---
       running './tests/attr/test-stat-C0'
       Using CPUID IBM,8561,703,T01,3.6,002f
       .....
       Event event:base-stat
            fd = 1
            group_fd = -1
            flags = 0|8
            cpu = *
            type = 0
            size = 128     <<<--- wrong, specified in file base-stat
            config = 0
            sample_period = 0
            sample_type = 65536
            ...
       'PERF_TEST_ATTR=/tmp/tmpgw574wvg ./perf stat -o \
      	/tmp/tmpgw574wvg/perf.data -e cycles -C 0 kill >/dev/null \
      	2>&1 ret '1', expected '1'
        loading result events
          Event event-0-0-4
            fd = 4
            group_fd = -1
            cpu = 0
            pid = -1
            flags = 8
            type = 0
            size = 136     <<<--- actual size used in system call
            .....
        compare
          matching [event-0-0-4]
            to [event:base-stat]
            [cpu] 0 *
            [flags] 8 0|8
            [type] 0 0
            [size] 136 128
          ->FAIL
          match: [event-0-0-4] matches []
        expected size=136, got 128
        FAILED './tests/attr/test-stat-C0' - match failure
      
      This mismatch is caused by
      commit 09519ec3 ("perf: Add perf_event_attr::config3")
      which enlarges the structure perf_event_attr by 8 bytes.
      
      Fix this by adjusting the expected value of size.
      
      Output after:
       # ./perf test -Fvvvv 17
       17: Setup struct perf_event_attr                                    :
       --- start ---
       running './tests/attr/test-stat-C0'
       Using CPUID IBM,8561,703,T01,3.6,002f
       ...
        matched
        compare
          matching [event-0-0-4]
            to [event:base-stat]
            [cpu] 0 *
            [flags] 8 0|8
            [type] 0 0
            [size] 136 136
            ....
         ->OK
         match: [event-0-0-4] matches ['event:base-stat']
       matched
      
      Fixes: 09519ec3 ("perf: Add perf_event_attr::config3")
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20230322094731.1768281-1-tmricht@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      30df88a8
    • Ian Rogers's avatar
      perf build: Add warning for when vmlinux.h generation fails · 1d796654
      Ian Rogers authored
      The warning advises on the NO_BPF_SKEL=1 option.
      Suggested-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      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: 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/20230322183108.1380882-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1d796654
    • Artem Savkov's avatar
      perf report: Append inlines to non-DWARF callchains · 46d21ec0
      Artem Savkov authored
      Append information about inlined functions to FP and LBR callchains from
      DWARF debuginfo when available. Do so by calling append_inlines() from
      add_callchain_ip().
      
      Testing it:
      
      Frame-pointer mode recorded with 'perf record --call-graph=fp --freq=max -- ./a.out'
      
        #include <stdio.h>
        #include <stdint.h>
      
        static __attribute__((noinline)) uint32_t func5(uint32_t i)
        {
                return i + 10;
        }
      
        static uint32_t func4(uint32_t i)
        {
                return func5(i + 5);
        }
      
        static inline uint32_t func3(uint32_t i)
        {
                return func4(i + 4);
        }
      
        static __attribute__((noinline)) uint32_t func2(uint32_t i)
        {
                return func3(i + 3);
        }
      
        static uint32_t func1(uint32_t i)
        {
                return func2(i + 2);
        }
      
        __attribute__((noinline)) uint64_t entry(void)
        {
                uint64_t ret = 0;
                uint32_t i = 0;
                for (i = 0; i < 1000000; i++) {
                        ret += func1(i);
                        ret -= func2(i);
                        ret += func3(i);
                        ret += func4(i);
                        ret -= func5(i);
                }
                return ret;
        }
      
        int main(int argc, char **argv)
        {
                printf("%s\n", __func__);
                return entry();
        }
        ======
      
      Here is the output I get with '--call-graph callee --no-children'
      
        ======
        # To display the perf.data header info, please use --header/--header-only options.
        #
        #
        # Total Lost Samples: 0
        #
        # Samples: 250  of event 'cycles:u'
        # Event count (approx.): 26819859
        #
        # Overhead  Command  Shared Object         Symbol
        # ........  .......  ....................  .....................................
        #
            43.58%  a.out    a.out                 [.] func5
                    |
                    |--28.93%--entry
                    |          main
                    |          __libc_start_call_main
                    |
                     --14.65%--func4 (inlined)
                               |
                               |--10.45%--entry
                               |          main
                               |          __libc_start_call_main
                               |
                                --4.20%--func3 (inlined)
                                          entry
                                          main
                                          __libc_start_call_main
      
            38.80%  a.out    a.out                 [.] entry
                    |
                    |--23.27%--func4 (inlined)
                    |          |
                    |          |--20.28%--func3 (inlined)
                    |          |          func2
                    |          |          main
                    |          |          __libc_start_call_main
                    |          |
                    |           --2.99%--entry
                    |                     main
                    |                     __libc_start_call_main
                    |
                    |--8.17%--func5
                    |          main
                    |          __libc_start_call_main
                    |
                    |--3.89%--func1 (inlined)
                    |          entry
                    |          main
                    |          __libc_start_call_main
                    |
                     --3.48%--entry
                               main
                               __libc_start_call_main
      
            13.07%  a.out    a.out                 [.] func2
                    |
                    ---func5
                       main
                       __libc_start_call_main
      
             1.54%  a.out    [unknown]             [k] 0xffffffff81e011b7
             1.16%  a.out    [unknown]             [k] 0xffffffff81e00193
                    |
                     --0.57%--__mmap64 (inlined)
                               __mmap64 (inlined)
      
             0.34%  a.out    ld-linux-x86-64.so.2  [.] __tunable_get_val
             0.34%  a.out    ld-linux-x86-64.so.2  [.] strcmp
             0.32%  a.out    libc.so.6             [.] strchr
             0.31%  a.out    ld-linux-x86-64.so.2  [.] _dl_relocate_object
             0.22%  a.out    ld-linux-x86-64.so.2  [.] _dl_init_paths
             0.18%  a.out    ld-linux-x86-64.so.2  [.] get_common_cache_info.constprop.0
             0.14%  a.out    ld-linux-x86-64.so.2  [.] __GI___tunables_init
      
        #
        # (Tip: Show individual samples with: perf script)
        #
        ======
      
        It does not seem to be out of order, or at least it is consistent with
        what I get with dwarf unwinders.
      
      Committer notes:
      
      Adrian Hunter pointed out that this breaks --branch-history, so don't do
      it for branches, see the second Link below.
      Suggested-by: default avatarAndrii Nakryiko <andrii.nakryiko@gmail.com>
      Signed-off-by: <asavkov@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20230316133557.868731-2-asavkov@redhat.com
      Link: https://lore.kernel.org/r/54129783-2960-84e1-05e9-97ac70ffb432@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      46d21ec0
  2. 21 Mar, 2023 5 commits
  3. 20 Mar, 2023 11 commits
    • German Gomez's avatar
      perf report: Add 'simd' sort field · ea15483e
      German Gomez authored
      Add 'simd' sort field to visualize SIMD ops in 'perf report'.
      
      Rows are labeled with the SIMD ISA, and the type of predicate (if any):
      
        - [p] partial predicate
        - [e] empty predicate (no elements in the vector being used)
      
      Example with Arm SPE and SVE (Scalable Vector Extension):
      
        #include <arm_sve.h>
      
        double src[1025], dst[1025];
      
        int main(void) {
          svfloat64_t vc = svdup_f64(1);
          for(;;)
            for(int i = 0; i < 1025; i += svcntd())
            {
              svbool_t pg = svwhilelt_b64(i, 1025);
              svfloat64_t vsrc = svld1(pg, &src[i]);
              svfloat64_t vdst = svadd_x(pg, vsrc, vc);
              svst1(pg, &dst[i], vdst);
            }
          return 0;
        }
      
        ... compiled using "gcc-11 -march=armv8-a+sve -O3"
      
      Profiling on a platform that implements FEAT_SVE and FEAT_SPEv1p1:
      
        $ perf record -e arm_spe_0// -- ./a.out
        $ perf report --itrace=i1i -s overhead,pid,simd,sym
      
        Overhead      Pid:Command   Simd     Symbol
        ........  ................  .......  ......................
      
          53.76%    10758:program            [.] main
          46.14%    10758:program   [.] SVE  [.] main
           0.09%    10758:program   [p] SVE  [.] main
      
      The report shows 0.09% of the sampled SVE operations use partial
      predicates due to src and dst arrays not being multiples of the vector
      register lengths.
      Signed-off-by: default avatarGerman Gomez <german.gomez@arm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman.Khandual@arm.com
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.g.garry@oracle.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: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.comSigned-off-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ea15483e
    • German Gomez's avatar
      perf arm-spe: Add SVE flags to the SPE samples · 03a6c16e
      German Gomez authored
      Add flags from the Scalable Vector Extension (SVE) to the SPE samples
      which are available from Armv8.3 (FEAT_SPEv1p1).
      
      These will be displayed in a new SIMD sort field in a later commit.
      Signed-off-by: default avatarGerman Gomez <german.gomez@arm.com>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.com
      Cc: Anshuman.Khandual@arm.com
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      03a6c16e
    • German Gomez's avatar
      perf arm-spe: Refactor arm-spe to support operation packet type · 0066015a
      German Gomez authored
      Extend the decoder of Arm SPE records to support more fields from the
      operation packet type.
      
      Not all fields are being decoded by this commit. Only those needed to
      support the use-case SVE load/store/other operations.
      Suggested-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarGerman Gomez <german.gomez@arm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman.Khandual@arm.com
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.g.garry@oracle.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: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.comSigned-off-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0066015a
    • German Gomez's avatar
      perf event: Add 'simd_flags' field to 'struct perf_sample' · f43cc1a9
      German Gomez authored
      Add new field to 'struct perf_sample' to store flags related to SIMD
      ops.
      
      It will be used to store SIMD information from SVE and NEON when
      profiling using ARM SPE.
      Signed-off-by: default avatarGerman Gomez <german.gomez@arm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman.Khandual@arm.com
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.g.garry@oracle.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: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.comSigned-off-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f43cc1a9
    • Adrian Hunter's avatar
      perf intel-pt: Add support for new branch instructions ERETS and ERETU · 052072f6
      Adrian Hunter authored
      Intel Flexible Return and Event Delivery (FRED) adds instructions ERETS
      (return to supervisor) and ERETU (return to user). Intel PT instruction
      decoder needs to know about these instructions because they are
      branch instructions. Similar to IRET instructions, when the decoder
      encounters one of these instructions it will match it to a TIP (target
      instruction pointer) packet that informs what the branch destination is.
      
      The existing "x86 instruction decoder - new instructions" test can be
      used to test the result e.g.
      
        $ perf test -v ins |& grep eret
        Decoded ok: f2 0f 01 ca         erets
        Decoded ok: f3 0f 01 ca         eretu
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20230320183517.15099-2-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      052072f6
    • Adrian Hunter's avatar
      perf intel-pt: Add event type names UINTR and UIRET · 34f576c9
      Adrian Hunter authored
      UINTR and UIRET are listed in table 32-50 "CFE Packet Type and Vector
      Fields Details" in the Intel Processor Trace chapter of The Intel SDM
      Volume 3 version 078.
      
      The codes are for "User interrupt delivered" and "Exiting from user
      interrupt routine" respectively.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20230320183517.15099-2-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      34f576c9
    • Ian Rogers's avatar
      perf symbol: Sort names under write lock · ec9640f7
      Ian Rogers authored
      If finding a name doesn't find the sorted names then they are
      allocated and sorted. This shouldn't be done under a read lock as
      another reader may access it. Release the read lock and acquire the
      write lock, then release the write lock and reacquire the read lock.
      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: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: André Almeida <andrealmeid@collabora.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Hao Luo <haoluo@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.g.garry@oracle.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ec9640f7
    • Ian Rogers's avatar
      perf test: Fix memory leak in symbols · 82c6d83b
      Ian Rogers authored
      machine__delete() doesn't delete threads. Add call to delete threads
      ahead of deleting the machine.
      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: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: André Almeida <andrealmeid@collabora.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Hao Luo <haoluo@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.g.garry@oracle.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      82c6d83b
    • Ian Rogers's avatar
      perf tests: Add common error route for code-reading · 9bb5e1f6
      Ian Rogers authored
      A later change will enforce that the map is put on this path
      regardless of success or error.
      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: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: André Almeida <andrealmeid@collabora.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Hao Luo <haoluo@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.g.garry@oracle.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9bb5e1f6
    • Ian Rogers's avatar
      perf bpf_counter: Use public cpumap accessors · 39b5e434
      Ian Rogers authored
      Avoid the use of internal apis via the cpumap accessor functions.
      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: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: André Almeida <andrealmeid@collabora.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Hao Luo <haoluo@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.g.garry@oracle.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      39b5e434
    • Ian Rogers's avatar
      perf symbol: Avoid memory leak from abi::__cxa_demangle · c9602aa0
      Ian Rogers authored
      Rather than allocate memory, allow abi::__cxa_demangle to do
      that. This avoids a problem where on error NULL was returned
      triggering a memory leak.
      
      Fixes: 3b4e4efe ("perf symbol: Add abi::__cxa_demangle C++ demangling support")
      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: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: André Almeida <andrealmeid@collabora.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Hao Luo <haoluo@google.com>
      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.g.garry@oracle.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c9602aa0
  4. 15 Mar, 2023 3 commits