1. 07 12月, 2021 1 次提交
  2. 03 9月, 2021 1 次提交
  3. 07 7月, 2021 1 次提交
    • K
      perf script python: Fix buffer size to report iregs in perf script · dea8cfcc
      Kajol Jain 提交于
      Commit 48a1f565 ("perf script python: Add more PMU fields to
      event handler dict") added functionality to report fields like weight,
      iregs, uregs etc via perf report.  That commit predefined buffer size to
      512 bytes to print those fields.
      
      But in PowerPC, since we added extended regs support in:
      
        068aeea3 ("perf powerpc: Support exposing Performance Monitor Counter SPRs as part of extended regs")
        d735599a ("powerpc/perf: Add extended regs support for power10 platform")
      
      Now iregs can carry more bytes of data and this predefined buffer size
      can result to data loss in perf script output.
      
      This patch resolves this issue by making the buffer size dynamic, based
      on the number of registers needed to print. It also changes the
      regs_map() return type from int to void, as it is not being used by the
      set_regs_in_dict(), its only caller.
      
      Fixes: 068aeea3 ("perf powerpc: Support exposing Performance Monitor Counter SPRs as part of extended regs")
      Signed-off-by: NKajol Jain <kjain@linux.ibm.com>
      Tested-by: NNageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lore.kernel.org/lkml/20210628062341.155839-1-kjain@linux.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      dea8cfcc
  4. 01 6月, 2021 3 次提交
  5. 25 5月, 2021 9 次提交
  6. 24 3月, 2021 1 次提交
  7. 03 11月, 2020 1 次提交
    • A
      perf scripting python: Avoid declaring function pointers with a visibility attribute · d0e7b0c7
      Arnaldo Carvalho de Melo 提交于
      To avoid this:
      
        util/scripting-engines/trace-event-python.c: In function 'python_start_script':
        util/scripting-engines/trace-event-python.c:1595:2: error: 'visibility' attribute ignored [-Werror=attributes]
         1595 |  PyMODINIT_FUNC (*initfunc)(void);
              |  ^~~~~~~~~~~~~~
      
      That started breaking when building with PYTHON=python3 and these gcc
      versions (I haven't checked with the clang ones, maybe it breaks there
      as well):
      
        # export PERF_TARBALL=http://192.168.86.5/perf/perf-5.9.0.tar.xz
        # dm  fedora:33 fedora:rawhide
           1   107.80 fedora:33         : Ok   gcc (GCC) 10.2.1 20201005 (Red Hat 10.2.1-5), clang version 11.0.0 (Fedora 11.0.0-1.fc33)
           2    92.47 fedora:rawhide    : Ok   gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6), clang version 11.0.0 (Fedora 11.0.0-1.fc34)
        #
      
      Avoid that by ditching that 'initfunc' function pointer with its:
      
          #define Py_EXPORTED_SYMBOL _attribute_ ((visibility ("default")))
          #define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject*
      
      And just call PyImport_AppendInittab() at the end of the ifdef python3
      block with the functions that were being attributed to that initfunc.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d0e7b0c7
  8. 14 10月, 2020 2 次提交
  9. 06 5月, 2020 1 次提交
  10. 03 4月, 2020 1 次提交
  11. 10 3月, 2020 1 次提交
    • K
      perf tools: Add hw_idx in struct branch_stack · 42bbabed
      Kan Liang 提交于
      The low level index of raw branch records for the most recent branch can
      be recorded in a sample with PERF_SAMPLE_BRANCH_HW_INDEX
      branch_sample_type. Extend struct branch_stack to support it.
      
      However, if the PERF_SAMPLE_BRANCH_HW_INDEX is not applied, only nr and
      entries[] will be output by kernel. The pointer of entries[] could be
      wrong, since the output format is different with new struct
      branch_stack.  Add a variable no_hw_idx in struct perf_sample to
      indicate whether the hw_idx is output.  Add get_branch_entry() to return
      corresponding pointer of entries[0].
      
      To make dummy branch sample consistent as new branch sample, add hw_idx
      in struct dummy_branch_stack for cs-etm and intel-pt.
      
      Apply the new struct branch_stack for synthetic events as well.
      
      Extend test case sample-parsing to support new struct branch_stack.
      
      Committer notes:
      
      Renamed get_branch_entries() to perf_sample__branch_entries() to have
      proper namespacing and pave the way for this to be moved to libperf,
      eventually.
      
      Add 'static' to that inline as it is in a header.
      
      Add 'hw_idx' to 'struct dummy_branch_stack' in cs-etm.c to fix the build
      on arm64.
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pavel Gerasimov <pavel.gerasimov@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Vitaly Slobodskoy <vitaly.slobodskoy@intel.com>
      Link: http://lore.kernel.org/lkml/20200228163011.19358-2-kan.liang@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      42bbabed
  12. 26 11月, 2019 1 次提交
  13. 12 11月, 2019 2 次提交
  14. 05 11月, 2019 1 次提交
  15. 18 10月, 2019 1 次提交
  16. 20 9月, 2019 2 次提交
  17. 01 9月, 2019 1 次提交
  18. 30 8月, 2019 1 次提交
  19. 23 8月, 2019 2 次提交
  20. 30 7月, 2019 6 次提交
  21. 10 7月, 2019 1 次提交