1. 14 Aug, 2024 9 commits
    • Kan Liang's avatar
      perf annotate: Display the branch counter histogram · e6952dce
      Kan Liang authored
      Display the branch counter histogram in the annotation view.
      
      Press 'B' to display the branch counter's abbreviation list as well.
      
        Samples: 1M of events 'anon group { branch-instructions:ppp, branch-misses }',
        4000 Hz, Event count (approx.):
        f3  /home/sdp/test/tchain_edit [Percent: local period]
        Percent       │ IPC Cycle       Branch Counter (Average IPC: 1.39, IPC Coverage: 29.4%)
                      │                                     0000000000401755 <f3>:
          0.00   0.00 │                                       endbr64
                      │                                       push    %rbp
                      │                                       mov     %rsp,%rbp
                      │                                       movl    $0x0,-0x4(%rbp)
          0.00   0.00 │1.33     3          |A   |-   |      ↓ jmp     25
         11.03  11.03 │                                 11:   mov     -0x4(%rbp),%eax
                      │                                       and     $0x1,%eax
                      │                                       test    %eax,%eax
         17.13  17.13 │2.41     1          |A   |-   |      ↓ je      21
                      │                                       addl    $0x1,-0x4(%rbp)
         21.84  21.84 │2.22     2          |AA  |-   |      ↓ jmp     25
         17.13  17.13 │                                 21:   addl    $0x1,-0x4(%rbp)
         21.84  21.84 │                                 25:   cmpl    $0x270f,-0x4(%rbp)
         11.03  11.03 │0.61     3          |A   |-   |      ↑ jle     11
                      │                                       nop
                      │                                       pop     %rbp
          0.00   0.00 │0.24    20          |AA  |B   |      ← ret
      Originally-by: default avatarTinghao Zhang <tinghao.zhang@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20240813160208.2493643-8-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e6952dce
    • Kan Liang's avatar
      perf report: Display the branch counter histogram · 20d6f555
      Kan Liang authored
      Reusing the existing --total-cycles option to display the branch
      counters. Add a new PERF_HPP_REPORT__BLOCK_BRANCH_COUNTER to display
      the logged branch counter events. They are shown right after all the
      cycle-related annotations.
      
      Extend the 'struct block_info' to store and pass the branch counter
      related information.
      
      The annotation_br_cntr_entry() is to print the histogram of each branch
      counter event. If the number of logged events is less than 4, the exact
      number of the abbr name is printed. Otherwise, using '+' to stands for
      more than 3 events.
      
      Assume the number of logged events is less than 4.
      
      The annotation_br_cntr_abbr_list() prints the branch counter's
      abbreviation list. Press 'B' to display the list in the TUI mode.
      
        $ perf record -e "{branch-instructions:ppp,branch-misses}:S" -j any,counter
        $ perf report  --total-cycles --stdio
      
        # To display the perf.data header info, please use --header/--header-only options.
        #
        #
        # Total Lost Samples: 0
        #
        # Samples: 1M of events 'anon group { branch-instructions:ppp, branch-misses }'
        # Event count (approx.): 1610046
        #
        # Branch counter abbr list:
        # branch-instructions:ppp = A
        # branch-misses = B
        # '-' No event occurs
        # '+' Event occurrences may be lost due to branch counter saturated
        #
        # Sampled Cycles%  Sampled Cycles  Avg Cycles%  Avg Cycles  Branch Counter [Program Block Range]
        # ...............  ..............  ...........  ..........  ..............  ..................
        #
                  57.55%            2.5M        0.00%           3     |A   |-   |                 ...
                  25.27%            1.1M        0.00%           2     |AA  |-   |                 ...
                  15.61%          667.2K        0.00%           1     |A   |-   |                 ...
                   0.16%            6.9K        0.81%         575     |A   |-   |                 ...
                   0.16%            6.8K        1.38%         977     |AA  |-   |                 ...
                   0.16%            6.8K        0.04%          28     |AA  |B   |                 ...
                   0.15%            6.6K        1.33%         946     |A   |-   |                 ...
                   0.11%            4.5K        0.06%          46     |AAA+|-   |                 ...
                   0.10%            4.4K        0.88%         624     |A   |-   |                 ...
                   0.09%            3.7K        0.74%         524     |AAA+|B   |                 ...
      
      With -v applied,
      
        # Sampled Cycles%  Sampled Cycles  Avg Cycles%  Avg Cycles  Branch Counter [Program Block Range]
        # ...............  ..............  ...........  ..........  ..............  ..................
        #
                  57.55%            2.5M        0.00%           3       A=1 ,B=-                  ...
                  25.27%            1.1M        0.00%           2       A=2 ,B=-                  ...
                  15.61%          667.2K        0.00%           1       A=1 ,B=-                  ...
                   0.16%            6.9K        0.81%         575       A=1 ,B=-                  ...
                   0.16%            6.8K        1.38%         977       A=2 ,B=-                  ...
                   0.16%            6.8K        0.04%          28       A=2 ,B=1                  ...
                   0.15%            6.6K        1.33%         946       A=1 ,B=-                  ...
                   0.11%            4.5K        0.06%          46       A=3+,B=-                  ...
                   0.10%            4.4K        0.88%         624       A=1 ,B=-                  ...
                   0.09%            3.7K        0.74%         524       A=3+,B=1                  ...
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20240813160208.2493643-7-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      20d6f555
    • Kan Liang's avatar
      perf evsel: Assign abbr name for the branch counter events · 7398bf18
      Kan Liang authored
      There could be several branch counter events. If perf tool output the
      result via the format "event name + a number", the line could be very
      long and hard to read.
      
      An abbreviation is introduced to replace the full event name in the
      display. The abbreviation starts from 'A' to 'Z9', which can support
      up to 286 events. The same abbreviation will be assigned if the same
      events are found in the evlist. The next patch will utilize the
      abbreviation name to show the branch counter events in the output.
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20240813160208.2493643-6-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7398bf18
    • Kan Liang's avatar
      perf annotate: Save branch counters for each block · 1f2b7fbb
      Kan Liang authored
      When annotating a basic block, it's useful to display the occurrences
      of other events in the block.
      
      The branch counter feature is only available for newer Intel platforms.
      
      So a dedicated option to display the branch counters is not introduced.
      
      Reuse the existing --total-cycles option, which triggers the annotation
      of a basic block and displays the cycle-related annotation.
      
      When the branch counters information is available, the branch counters
      are automatically appended after all the cycle-related annotation.
      
      Accounting the branch counters as well when accounting the cycles in
      hist__account_cycles().
      
      In 'struct annotated_branch', introduce a br_cntr array to save the
      accumulation of each branch counter.
      
      In a sample, all the branch counters for a branch are saved in a u64
      space.
      
      Because the saturation of a branch counter is small, e.g., for Intel
      Sierra Forest, the saturation is only 3.
      
      Add ANNOTATION__BR_CNTR_SATURATED_FLAG to indicate if a branch counter
      once saturated. That can be used to indicate a potential event lost
      because of the saturation.
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20240813160208.2493643-5-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1f2b7fbb
    • Kan Liang's avatar
      perf evlist: Save branch counters information · 3a867a6d
      Kan Liang authored
      The branch counters logging (A.K.A LBR event logging) introduces a
      per-counter indication of precise event occurrences in LBRs. The kernel
      only dumps the number of occurrences into a record. The perf tool has
      to map the number to the corresponding event.
      
      Add evlist__update_br_cntr() to go through the evlist to pick the
      events that are configured to be logged. Assign a logical idx to track
      them, and add the total number of the events in the leader event.
      
      The total number will be used to allocate the space to save the branch
      counters for a block. The logical idx will be used to locate the
      corresponding event quickly in the following patches.
      
      It only needs to iterate the evlist once. The
      evsel__has_branch_counters() is also optimized.
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20240813160208.2493643-4-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3a867a6d
    • Kan Liang's avatar
      perf report: Remove the first overflow check for branch counters · 183212a4
      Kan Liang authored
      A false overflow warning is triggered if a sample doesn't have any LBRs
      recorded and the branch counters feature is enabled.
      
      The current code does OVERFLOW_CHECK_u64() at the very beginning when
      reading the information of branch counters. It assumes that there is at
      least one LBR in the PEBS record. But it is a valid case that 0 LBR is
      recorded especially in a high context switch.
      
      Remove the OVERFLOW_CHECK_u64(). The later OVERFLOW_CHECK() should be
      good enough to check the overflow when reading the information of the
      branch counters.
      
      Fixes: 9fbb4b02 ("perf tools: Add branch counter knob")
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-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: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20240813160208.2493643-3-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      183212a4
    • Kan Liang's avatar
      perf report: Fix --total-cycles --stdio output error · 3ef44458
      Kan Liang authored
      The --total-cycles may output wrong information with the --stdio.
      
      For example:
      
        # perf record -e "{cycles,instructions}",cache-misses -b sleep 1
        # perf report --total-cycles --stdio
      
      The total cycles output of {cycles,instructions} and cache-misses are
      almost the same.
      
        # Samples: 938  of events 'anon group { cycles, instructions }'
        # Event count (approx.): 938
        #
        # Sampled Cycles%  Sampled Cycles  Avg Cycles%  Avg Cycles  [Program Block Range]
        # ...............  ..............  ...........  ..........  ..................................................>
        #
                  11.19%            2.6K        0.10%           21  [perf_iterate_ctx+48 -> >
                   5.79%            1.4K        0.45%           97  [__intel_pmu_enable_all.constprop.0+80 -> __intel_>
                   5.11%            1.2K        0.33%           71  [native_write_msr+0 ->>
      
        # Samples: 293  of event 'cache-misses'
        # Event count (approx.): 293
        #
        # Sampled Cycles%  Sampled Cycles  Avg Cycles%  Avg Cycles  [Program Block Range]
        # ...............  ..............  ...........  ..........  ..................................................>
        #
                  11.19%            2.6K        0.13%           21  [perf_iterate_ctx+48 -> >
                   5.79%            1.4K        0.59%           97  [__intel_pmu_enable_all.constprop.0+80 -> __intel_>
                   5.11%            1.2K        0.43%           71  [native_write_msr+0 ->>
      
      With the symbol_conf.event_group, the 'perf report' should only report the
      block information of the leader event in a group.
      
      However, the current implementation retrieves the next event's block
      information, rather than the next group leader's block information.
      
      Make sure the index is updated even if the event is skipped.
      
      With the patch,
      
        # Samples: 293  of event 'cache-misses'
        # Event count (approx.): 293
        #
        # Sampled Cycles%  Sampled Cycles  Avg Cycles%  Avg Cycles  [Program Block Range]
        # ...............  ..............  ...........  ..........  ..................................................>
        #
                 37.98%            9.0K        4.05%           299  [perf_event_addr_filters_exec+0 -> perf_event_a>
                 11.19%            2.6K        0.28%            21  [perf_iterate_ctx+48 -> >
                  5.79%            1.4K        1.32%            97  [__intel_pmu_enable_all.constprop.0+80 -> __intel_>
      
      Fixes: 6f7164fa ("perf report: Sort by sampled cycles percent per block for stdio")
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-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: Jin Yao <yao.jin@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20240813160208.2493643-2-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3ef44458
    • Ian Rogers's avatar
      perf test annotate: Dump trapping test in trap handler · 653ac51f
      Ian Rogers authored
      Help to better identify the location of test failures but dumping the
      failing test in the trap handler.
      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: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Link: https://lore.kernel.org/r/20240813040613.882075-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      653ac51f
    • Ian Rogers's avatar
      perf disasm: Fix memory leak for locked operations · a0503171
      Ian Rogers authored
      lock__parse() calls disasm_line__parse() passing
      &ops->locked.ins.name that will use strdup() to populate it.
      
      Ensure ops->locked.ins.name is freed in lock__delete().
      
      Found with address/leak sanitizer.
      Signed-off-by: default avatarIan Rogers <irogers@google.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: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Link: https://lore.kernel.org/r/20240813040613.882075-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a0503171
  2. 13 Aug, 2024 7 commits
    • Ian Rogers's avatar
      perf inject: Inject build ids for entire call chain · 3d557dd3
      Ian Rogers authored
      The DSO build id is injected when the dso is first encountered but the
      checking for first encountered only looks at the sample->ip not the
      entire callchain.
      
      Use the callchain logic to ensure all build ids are inserted.
      
      Fixes: 454c407e ("perf: add perf-inject builtin")
      Signed-off-by: default avatarIan Rogers <irogers@google.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: Casey Chen <cachen@purestorage.com>
      Cc: Colin Ian King <colin.i.king@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: https://lore.kernel.org/r/20240812224119.744968-1-irogers@google.com
      [ Split from a larger patch that introduced the API and use it ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3d557dd3
    • Ian Rogers's avatar
      perf callchain: Add a for_each callback style API · 1a9d080d
      Ian Rogers authored
      Add a for_each callback style API to callchain with
      sample__for_each_callchain_node().
      
      Possibly in the future such an API can avoid the overhead of
      constructing the call chain list.
      Signed-off-by: default avatarIan Rogers <irogers@google.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: Casey Chen <cachen@purestorage.com>
      Cc: Colin Ian King <colin.i.king@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: https://lore.kernel.org/r/20240812224119.744968-1-irogers@google.com
      [ Split from a larger patch that introduced the API and use it ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1a9d080d
    • Weilin Wang's avatar
      perf test: Add test for Intel TPEBS counting mode · b2738fda
      Weilin Wang authored
      Intel TPEBS sampling mode is supported through perf record. The counting mode
      code uses perf record to capture retire_latency value and use it in metric
      calculation. This test checks the counting mode code on Intel platforms.
      
      Committer testing:
      
        root@x1:~# perf test tpebs
        123: test Intel TPEBS counting mode                                  : Ok
        root@x1:~# set -o vi
        root@x1:~# perf test tpebs
        123: test Intel TPEBS counting mode                                  : Ok
        root@x1:~# perf test -v tpebs
        123: test Intel TPEBS counting mode                                  : Ok
        root@x1:~# perf test -vvv tpebs
        123: test Intel TPEBS counting mode:
        --- start ---
        test child forked, pid 16603
        Testing without --record-tpebs
        Testing with --record-tpebs
        ---- end(0) ----
        123: test Intel TPEBS counting mode                                  : Ok
        root@x1:~#
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWeilin Wang <weilin.wang@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Link: https://lore.kernel.org/r/20240720062102.444578-9-weilin.wang@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b2738fda
    • Weilin Wang's avatar
      perf Document: Add TPEBS (Timed PEBS(Precise Event-Based Sampling)) to Documents · 169f18fd
      Weilin Wang authored
      TPEBS (Timed PEBS(Precise Event-Based Sampling)) is a new feature Intel
      PMU from Granite Rapids microarchitecture.
      
      It will be used in new TMA (Top-Down Microarchitecture Analysis)
      releases.
      
      Add related introduction to documents while adding new code to support
      it in 'perf stat'.
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWeilin Wang <weilin.wang@intel.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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Link: https://lore.kernel.org/r/20240720062102.444578-8-weilin.wang@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      169f18fd
    • Weilin Wang's avatar
      perf stat: Add command line option for enabling TPEBS recording · d546e3ac
      Weilin Wang authored
      With this command line option, TPEBS recording is turned off in 'perf
      stat' on default. It will only be turned on when this option is given in
      'perf stat' command.
      
      Example with --record-tpebs:
      
        perf stat -M tma_split_loads -C1-4 --record-tpebs sleep 1
      
        [ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 0.044 MB - ]
      
         Performance counter stats for 'CPU(s) 1-4':
      
            53,259,156,071      cpu_core/TOPDOWN.SLOTS/          #      1.6 %  tma_split_loads   (50.00%)
            15,867,565,250      cpu_core/topdown-retiring/                                       (50.00%)
            15,655,580,731      cpu_core/topdown-mem-bound/                                      (50.00%)
            11,738,022,218      cpu_core/topdown-bad-spec/                                       (50.00%)
             6,151,265,424      cpu_core/topdown-fe-bound/                                       (50.00%)
            20,445,917,581      cpu_core/topdown-be-bound/                                       (50.00%)
             6,925,098,013      cpu_core/L1D_PEND_MISS.PENDING/                                  (50.00%)
             3,838,653,421      cpu_core/MEMORY_ACTIVITY.STALLS_L1D_MISS/                        (50.00%)
             4,797,059,783      cpu_core/EXE_ACTIVITY.BOUND_ON_LOADS/                            (50.00%)
            11,931,916,714      cpu_core/CPU_CLK_UNHALTED.THREAD/                                (50.00%)
               102,576,164      cpu_core/MEM_LOAD_COMPLETED.L1_MISS_ANY/                         (50.00%)
                64,071,854      cpu_core/MEM_INST_RETIRED.SPLIT_LOADS/                           (50.00%)
                         3      cpu_core/MEM_INST_RETIRED.SPLIT_LOADS/R
      
               1.003049679 seconds time elapsed
      
      Example without --record-tpebs:
      
        perf stat -M tma_contested_accesses -C1 sleep 1
      
         Performance counter stats for 'CPU(s) 1':
      
                50,203,891      cpu_core/TOPDOWN.SLOTS/          #      0.0 %  tma_contested_accesses   (63.60%)
                10,040,777      cpu_core/topdown-retiring/                                              (63.60%)
                 6,890,729      cpu_core/topdown-mem-bound/                                             (63.60%)
                 2,756,463      cpu_core/topdown-bad-spec/                                              (63.60%)
                10,828,288      cpu_core/topdown-fe-bound/                                              (63.60%)
                28,350,432      cpu_core/topdown-be-bound/                                              (63.60%)
                        98      cpu_core/OCR.DEMAND_DATA_RD.L3_HIT.SNOOP_HITM/                          (63.70%)
                   577,520      cpu_core/MEMORY_ACTIVITY.STALLS_L2_MISS/                                (54.62%)
                   313,339      cpu_core/MEMORY_ACTIVITY.STALLS_L3_MISS/                                (54.62%)
                    14,155      cpu_core/MEM_LOAD_RETIRED.L1_MISS/                                      (45.54%)
                         0      cpu_core/OCR.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD/                  (36.30%)
                 8,468,077      cpu_core/CPU_CLK_UNHALTED.THREAD/                                       (45.38%)
                       198      cpu_core/MEM_LOAD_L3_HIT_RETIRED.XSNP_MISS/                             (45.38%)
                     8,324      cpu_core/MEM_LOAD_RETIRED.FB_HIT/                                       (45.38%)
             3,388,031,520      TSC
                23,226,785      cpu_core/CPU_CLK_UNHALTED.REF_TSC/                                      (54.46%)
                        80      cpu_core/MEM_LOAD_L3_HIT_RETIRED.XSNP_FWD/                              (54.46%)
                         0      cpu_core/MEM_LOAD_L3_HIT_RETIRED.XSNP_FWD/R
                         0      cpu_core/MEM_LOAD_L3_HIT_RETIRED.XSNP_MISS/R
             1,006,816,667 ns   duration_time
      
               1.002537737 seconds time elapsed
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWeilin Wang <weilin.wang@intel.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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Link: https://lore.kernel.org/r/20240720062102.444578-7-weilin.wang@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d546e3ac
    • Weilin Wang's avatar
      perf vendor events intel: Add MTL metric JSON files · 0a738160
      Weilin Wang authored
      Add MTL metric JSON file for TMA4.8. Some of the metrics' formulas use TPEBS
      retire_latency in MTL.
      
      This also includes lated E-Core TMA3.6 changes.
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWeilin Wang <weilin.wang@intel.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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Link: https://lore.kernel.org/r/20240720062102.444578-6-weilin.wang@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0a738160
    • Weilin Wang's avatar
      perf stat: Fork and launch 'perf record' when 'perf stat' needs to get retire... · 8db5cabc
      Weilin Wang authored
      perf stat: Fork and launch 'perf record' when 'perf stat' needs to get retire latency value for a metric.
      
      When retire_latency value is used in a metric formula, evsel would fork
      a 'perf record' process with "-e" and "-W" options. 'perf record' will
      collect required retire_latency values in parallel while 'perf stat' is
      collecting counting values.
      
      At the point of time that 'perf stat' stops counting, evsel would stop
      'perf record' by sending sigterm signal to 'perf record' process.
      Sampled data will be processed to get retire latency value. Another
      thread is required to synchronize between 'perf stat' and 'perf record'
      when we pass data through pipe.
      
      Retire_latency evsel is not opened for 'perf stat' so that there is no
      counter wasted on it. This commit includes code suggested by Namhyung to
      adjust reading size for groups that include retire_latency evsels.
      
      In current :R parsing implementation, the parser would recognize events
      with retire_latency modifier and insert them into the evlist like a
      normal event.  Ideally, we need to avoid counting these events.
      
      In this commit, at the time when a retire_latency evsel is read, set the
      retire latency value processed from the sampled data to count value.
      This sampled retire latency value will be used for metric calculation
      and final event count print out. No special metric calculation and event
      print out code required for retire_latency events.
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWeilin Wang <weilin.wang@intel.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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Link: https://lore.kernel.org/r/20240720062102.444578-4-weilin.wang@intel.com
      [ Squashed the 3rd and 4th commit in the series to keep it building patch by patch ]
      [ Constified the 'struct perf_tool' pointer in process_sample_event() ]
      [ Use perf_tool__init(&tool, false) to address a segfault I reported and Ian/Weilin diagnosed ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8db5cabc
  3. 12 Aug, 2024 24 commits
    • Weilin Wang's avatar
      perf data: Allow to use given fd in data->file.fd · a9a4ca57
      Weilin Wang authored
      When in PIPE mode, allow to use fd dynamically opened and asigned to
      data->file.fd instead of STDIN_FILENO or STDOUT_FILENO.
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWeilin Wang <weilin.wang@intel.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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Link: https://lore.kernel.org/r/20240720062102.444578-3-weilin.wang@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a9a4ca57
    • Ian Rogers's avatar
      perf parse-events: Add a retirement latency modifier · 807746b9
      Ian Rogers authored
      Retirement latency is a separate sampled count used on newer Intel
      CPUs.
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      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: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Link: https://lore.kernel.org/r/20240720062102.444578-2-weilin.wang@intel.comSigned-off-by: default avatarWeilin Wang <weilin.wang@intel.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      807746b9
    • Ian Rogers's avatar
      perf session: Constify tool · 8f29be32
      Ian Rogers authored
      Make tool const now that all uses are const and
      perf_tool__fill_defaults() won't be used. The aim is to better capture
      that sessions don't mutate tools.
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-28-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8f29be32
    • Ian Rogers's avatar
      perf tool: Remove perf_tool__fill_defaults() · 15d4a6f4
      Ian Rogers authored
      Now all tools are fully initialized prior to use it has no use so
      remove.
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-27-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      15d4a6f4
    • Ian Rogers's avatar
      perf kwork: Use perf_tool__init() · fcd00f3e
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-26-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fcd00f3e
    • Ian Rogers's avatar
      perf test event_update: Ensure tools is initialized · 332b897f
      Ian Rogers authored
      Ensure tool is initialized to avoid lazy initialization pattern so
      that more uses of struct perf_tool can be made const.
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-25-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      332b897f
    • Ian Rogers's avatar
      perf data convert ctf: Use perf_tool__init() · 2721c6cc
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-24-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2721c6cc
    • Ian Rogers's avatar
      perf data convert json: Use perf_tool__init() · b9d276d1
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-23-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b9d276d1
    • Ian Rogers's avatar
      perf diff: Use perf_tool__init() · 1e1ec8f2
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-22-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1e1ec8f2
    • Ian Rogers's avatar
      perf timechart: Use perf_tool__init() · 60b5fd3f
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-21-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      60b5fd3f
    • Ian Rogers's avatar
      perf mem: Use perf_tool__init() · 4a20562b
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-20-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4a20562b
    • Ian Rogers's avatar
      perf sched: Use perf_tool__init() · 41860d49
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-19-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      41860d49
    • Ian Rogers's avatar
      perf annotate: Use perf_tool__init() · d48940ca
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-18-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d48940ca
    • Ian Rogers's avatar
      perf stat: Use perf_tool__init() · 071b117e
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-17-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      071b117e
    • Ian Rogers's avatar
      perf report: Use perf_tool__init() · 113f614c
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-16-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      113f614c
    • Ian Rogers's avatar
      perf inject: Use perf_tool__init() · a37c0436
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-15-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a37c0436
    • Ian Rogers's avatar
      perf script: Use perf_tool__init() · 2fa28ccb
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-14-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2fa28ccb
    • Ian Rogers's avatar
      perf c2c: Use perf_tool__init() · 6bfb6df8
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-13-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6bfb6df8
    • Ian Rogers's avatar
      perf record: Use perf_tool__init() · cecb1cf1
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-12-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cecb1cf1
    • Ian Rogers's avatar
      perf evlist: Use perf_tool__init() · 419cbc44
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-11-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      419cbc44
    • Ian Rogers's avatar
      perf lock: Use perf_tool__init() · b4fd4d00
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-10-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b4fd4d00
    • Ian Rogers's avatar
      perf kvm: Use perf_tool__init() · a01a5ef9
      Ian Rogers authored
      Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
      and not relying on perf_tool__fill_defaults().
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-9-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a01a5ef9
    • Ian Rogers's avatar
      perf buildid-list: Use perf_tool__init · 584a268f
      Ian Rogers authored
      Reduce scope of build_id__mark_dso_hit_ops() to the scope of function
      perf_session__list_build_ids, its only use, and use perf_tool__init()
      for the default values. Move perf_event__exit_del_thread() to event.[ch]
      so it can be used in builtin-buildid-list.c.
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-8-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      584a268f
    • Ian Rogers's avatar
      perf kmem: Use perf_tool__init · f32b37cc
      Ian Rogers authored
      Reduce the scope of the tool from global/static to just that of the
      cmd_kmem function where the session is scoped. Use the perf_tool__init()
      to initialize default values.
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ilkka Koskinen <ilkka@os.amperecomputing.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: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20240812204720.631678-7-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f32b37cc