<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/linux.git/tools/perf, branch rt-linux-release</title>
<subtitle>StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/linux.git/atom?h=rt-linux-release</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/linux.git/atom?h=rt-linux-release'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/'/>
<updated>2023-01-03T06:26:18+00:00</updated>
<entry>
<title>RISC-V: Added HiFive Unmatched PMU events</title>
<updated>2023-01-03T06:26:18+00:00</updated>
<author>
<name>João Mário Domingos</name>
<email>joao.mario@tecnico.ulisboa.pt</email>
</author>
<published>2021-11-16T15:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=6761a110d9aa196e117a298690c97886cb6c4bfd'/>
<id>urn:sha1:6761a110d9aa196e117a298690c97886cb6c4bfd</id>
<content type='text'>
This patch contains all the available events for the HiFive Unmatched performance monitoring unit.

Depends on patch [3], for the base mapfile.csv file.

Signed-off-by: João Mário Domingos &lt;joao.mario@tecnico.ulisboa.pt&gt;
</content>
</entry>
<entry>
<title>RISC-V: Added generic pmu-events mapfile</title>
<updated>2023-01-03T06:26:18+00:00</updated>
<author>
<name>João Mário Domingos</name>
<email>joao.mario@tecnico.ulisboa.pt</email>
</author>
<published>2021-11-16T15:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=1f42a2c93d4ca157ba064c467b13f21283307d26'/>
<id>urn:sha1:1f42a2c93d4ca157ba064c467b13f21283307d26</id>
<content type='text'>
The pmu-events now supports custom events for RISC-V, plus the cycle,
time and instret events were defined.

Signed-off-by: João Mário Domingos &lt;joao.mario@tecnico.ulisboa.pt&gt;
</content>
</entry>
<entry>
<title>RISC-V: Support CPUID for risc-v in perf</title>
<updated>2023-01-03T06:26:18+00:00</updated>
<author>
<name>João Mário Domingos</name>
<email>joao.mario@tecnico.ulisboa.pt</email>
</author>
<published>2021-11-16T15:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=8839ee9806418d60797407ddcfc0404514283827'/>
<id>urn:sha1:8839ee9806418d60797407ddcfc0404514283827</id>
<content type='text'>
This patch creates the header.c file for the risc-v architecture and introduces support for
PMU identification through sysfs.
It is now possible to configure pmu-events in risc-v.

Depends on patch [1], that introduces the id sysfs file.

Signed-off-by: João Mário Domingos &lt;joao.mario@tecnico.ulisboa.pt&gt;
Signed-off-by: minda.chen &lt;minda.chen@starfivetech.com&gt;
</content>
</entry>
<entry>
<title>perf script: Fix PERF_SAMPLE_WEIGHT_STRUCT support</title>
<updated>2021-10-31T15:51:41+00:00</updated>
<author>
<name>Kan Liang</name>
<email>kan.liang@linux.intel.com</email>
</author>
<published>2021-09-29T15:38:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=27730c8cd60d1574d8337276e7a9d7d2ca92e0d1'/>
<id>urn:sha1:27730c8cd60d1574d8337276e7a9d7d2ca92e0d1</id>
<content type='text'>
-F weight in perf script is broken.

  # ./perf mem record
  # ./perf script -F weight
  Samples for 'dummy:HG' event do not have WEIGHT attribute set. Cannot
print 'weight' field.

The sample type, PERF_SAMPLE_WEIGHT_STRUCT, is an alternative of the
PERF_SAMPLE_WEIGHT sample type. They share the same space, weight. The
lower 32 bits are exactly the same for both sample type. The higher 32
bits may be different for different architecture. For a new kernel on
x86, the PERF_SAMPLE_WEIGHT_STRUCT is used. For an old kernel or other
ARCHs, the PERF_SAMPLE_WEIGHT is used.

With -F weight, current perf script will only check the input string
"weight" with the PERF_SAMPLE_WEIGHT sample type. Because the commit
ea8d0ed6eae3 ("perf tools: Support PERF_SAMPLE_WEIGHT_STRUCT") didn't
update the PERF_SAMPLE_WEIGHT_STRUCT sample type for perf script. For a
new kernel on x86, the check fails.

Use PERF_SAMPLE_WEIGHT_TYPE, which supports both sample types, to
replace PERF_SAMPLE_WEIGHT

Fixes: ea8d0ed6eae37b01 ("perf tools: Support PERF_SAMPLE_WEIGHT_STRUCT")
Reported-by: Joe Mario &lt;jmario@redhat.com&gt;
Reviewed-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Tested-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Tested-by: Joe Mario &lt;jmario@redhat.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Acked-by: Joe Mario &lt;jmario@redhat.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Link: https://lore.kernel.org/r/1632929894-102778-1-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf callchain: Fix compilation on powerpc with gcc11+</title>
<updated>2021-10-31T15:51:41+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2021-09-28T19:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=89ac61ff05a5c79545aa93f7b1da7e4dbc60fc9a'/>
<id>urn:sha1:89ac61ff05a5c79545aa93f7b1da7e4dbc60fc9a</id>
<content type='text'>
Got following build fail on powerpc:

    CC      arch/powerpc/util/skip-callchain-idx.o
  In function ‘check_return_reg’,
      inlined from ‘check_return_addr’ at arch/powerpc/util/skip-callchain-idx.c:213:7,
      inlined from ‘arch_skip_callchain_idx’ at arch/powerpc/util/skip-callchain-idx.c:265:7:
  arch/powerpc/util/skip-callchain-idx.c:54:18: error: ‘dwarf_frame_register’ accessing 96 bytes \
  in a region of size 64 [-Werror=stringop-overflow=]
     54 |         result = dwarf_frame_register(frame, ra_regno, ops_mem, &amp;ops, &amp;nops);
        |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  arch/powerpc/util/skip-callchain-idx.c: In function ‘arch_skip_callchain_idx’:
  arch/powerpc/util/skip-callchain-idx.c:54:18: note: referencing argument 3 of type ‘Dwarf_Op *’
  In file included from /usr/include/elfutils/libdwfl.h:32,
                   from arch/powerpc/util/skip-callchain-idx.c:10:
  /usr/include/elfutils/libdw.h:1069:12: note: in a call to function ‘dwarf_frame_register’
   1069 | extern int dwarf_frame_register (Dwarf_Frame *frame, int regno,
        |            ^~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

The dwarf_frame_register args changed with [1],
Updating ops_mem accordingly.

[1] https://sourceware.org/git/?p=elfutils.git;a=commit;h=5621fe5443da23112170235dd5cac161e5c75e65

Reviewed-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Acked-by: Mark Wieelard &lt;mjw@redhat.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Michael Petlan &lt;mpetlan@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Sukadev Bhattiprolu &lt;sukadev@linux.vnet.ibm.com&gt;
Link: https://lore.kernel.org/r/20210928195253.1267023-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Check session-&gt;header.env.arch before using it</title>
<updated>2021-10-31T15:51:41+00:00</updated>
<author>
<name>Song Liu</name>
<email>songliubraving@fb.com</email>
</author>
<published>2021-10-04T05:32:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=29c77550eef31b0d72a45b49eeab03b8963264e8'/>
<id>urn:sha1:29c77550eef31b0d72a45b49eeab03b8963264e8</id>
<content type='text'>
When perf.data is not written cleanly, we would like to process existing
data as much as possible (please see f_header.data.size == 0 condition
in perf_session__read_header). However, perf.data with partial data may
crash perf. Specifically, we see crash in 'perf script' for NULL
session-&gt;header.env.arch.

Fix this by checking session-&gt;header.env.arch before using it to determine
native_arch. Also split the if condition so it is easier to read.

Committer notes:

If it is a pipe, we already assume is a native arch, so no need to check
session-&gt;header.env.arch.

Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: kernel-team@fb.com
Cc: stable@vger.kernel.org
Link: http://lore.kernel.org/lkml/20211004053238.514936-1-songliubraving@fb.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf build: Suppress 'rm dlfilter' build message</title>
<updated>2021-10-31T15:51:41+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-09-30T06:28:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=095729484efc4aa4604c474792b059bd940addce'/>
<id>urn:sha1:095729484efc4aa4604c474792b059bd940addce</id>
<content type='text'>
The following build message:

	rm dlfilters/dlfilter-test-api-v0.o

is unwanted.

The object file is being treated as an intermediate file and being
automatically removed. Mark the object file as .SECONDARY to prevent
removal and hence the message.

Requested-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lore.kernel.org/lkml/20210930062849.110416-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf report: Output non-zero offset for decompressed records</title>
<updated>2021-10-14T18:41:35+00:00</updated>
<author>
<name>Alexey Bayduraev</name>
<email>alexey.v.bayduraev@linux.intel.com</email>
</author>
<published>2021-09-29T09:14:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=8e820f962345e6ce6f4677044209f23dde39d76d'/>
<id>urn:sha1:8e820f962345e6ce6f4677044209f23dde39d76d</id>
<content type='text'>
Print offset of PERF_RECORD_COMPRESSED record instead of zero for
decompressed records in raw trace dump (-D option of perf-report):

  0x17cf08 [0x28]: event: 9

instead of:

  0 [0x28]: event: 9

The fix is not critical, because currently file_pos for compressed
events is used in perf_session__process_event only to show offsets
in the raw dump.

This patch was separated from patchset:

https://lore.kernel.org/lkml/cover.1629186429.git.alexey.v.bayduraev@linux.intel.com/

and was already rewieved.

Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20210929091445.18274-1-alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests attr: Add missing topdown metrics events</title>
<updated>2021-10-05T17:55:38+00:00</updated>
<author>
<name>Kan Liang</name>
<email>kan.liang@linux.intel.com</email>
</author>
<published>2021-09-30T19:52:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=0b6c5371c03c2b17963e1abd7ed0e3f1f950cba9'/>
<id>urn:sha1:0b6c5371c03c2b17963e1abd7ed0e3f1f950cba9</id>
<content type='text'>
The Topdown metrics events were added as 'perf stat' default events
since commit 42641d6f4d15e6db ("perf stat: Add Topdown metrics events as
default events").

However, the perf attr tests were not updated
accordingly.

The perf attr test fails on the platform which supports Topdown metrics.

  # perf test 17

    17: Setup struct perf_event_attr        :FAILED!

Add Topdown metrics events into perf attr test cases. Make them optional
since they are only available on newer platforms.

Fixes: 42641d6f4d15e6db ("perf stat: Add Topdown metrics events as default events")
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Signed-off-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lore.kernel.org/lkml/1633031566-176517-1-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf build: Fix plugin static linking with libopencsd on ARM and ARM64</title>
<updated>2021-10-05T17:48:10+00:00</updated>
<author>
<name>Branislav Rankov</name>
<email>branislav.rankov@arm.com</email>
</author>
<published>2021-07-21T10:32:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=35c46bf545b31c961f216dd228bf9cba5499e5f0'/>
<id>urn:sha1:35c46bf545b31c961f216dd228bf9cba5499e5f0</id>
<content type='text'>
Filter out -static flag when building plugins as they are always built
as dynamic libraries and -static and -dynamic don't work well together
on arm and arm64.

Signed-off-by: Branislav Rankov &lt;branislav.rankov@arm.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Mark Brown &lt;Mark.Brown@arm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: coresight@lists.linaro.org
Cc: nd@arm.com
Link: https://lore.kernel.org/r/e88952b3-2470-da96-dee9-e247a1759cd0@arm.com
Signed-off-by: Tamas Zsoldos &lt;tamas.zsoldos@arm.com&gt;
[ Split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
