From: leo.yan@linaro.org (Leo Yan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/10] perf tools: Add support for CoreSight trace decoding
Date: Sat, 30 Dec 2017 08:51:37 +0800 [thread overview]
Message-ID: <20171230005137.GE600@leoy-linaro> (raw)
In-Reply-To: <1513356299-26274-1-git-send-email-mathieu.poirier@linaro.org>
Hi Mathieu,
On Fri, Dec 15, 2017 at 09:44:49AM -0700, Mathieu Poirier wrote:
> This patchset adds support for per-thread CoreSight trace decoding from the
> "perf report" interface. It is largely modelled on what has been done for
> intelPT traces and currently targets the ETMv4 architecture. Support for
> cpu-wide scenarios and ETMv3/PTMv1.1 will follow shortly.
>
> The trace decoding support is done using the Open CoreSight Decoding
> Library (openCSD), a stand alone open source project available here [1].
> Integration of the openCSD library with the perf tools follow what has
> been done for other support libraries. If the library has been installed
> on a system the build scripts will include support for CoreSight trace
> decoding:
>
> ... zlib: [ on ]
> ... lzma: [ OFF ]
> ... get_cpuid: [ on ]
> ... bpf: [ on ]
> ... libopencsd: [ on ] <------
>
> Instructions on how to build and install the openCSD library are provided
> in the HOWTO.md of the project repository. We elected to keep the decoder
> library independent of the kernel tree as it is also used outside of the
> perf toolset and various non-linux projects.
>
> The work applies cleanly to [2] and proper functionning of the feature
> depends on this patch [3].
With latest perf code, it reports another error when analyse perf
data: "0x3e0 [0x50]: failed to process type: 1".
After roughly analysis, I found this is caused by one dummy event (in
the binary from offset 0xf8 to offset 0x178). Because this event type
is not set for 'PERF_SAMPLE_TIME', so the function
perf_evsel__parse_sample_timestamp() checks the event has not set
'PERF_SAMPLE_TIME' then directly bail out with error.
000000f0: 0800 0000 0000 0000 0100 0000 7000 0000 ............p...
00000100: 0900 0000 0000 0000 0100 0000 0000 0000 ................
00000110: 0300 0100 0000 0000 0400 0000 0000 0000 ................
00000120: 6133 8401 0000 0000 0000 0000 0000 0000 a3..............
00000130: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000140: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000160: 0000 0000 0000 0000 7000 0000 0000 0000 ........p.......
00000170: 0800 0000 0000 0000 4600 0000 0000 6802 ........F.....h.
You could check the perf binary from [1]. Please note, this perf data
I capatured from kernel 4.14-rc6, so is it might be compatible issue
between 4.14-rc6 and 4.15?
[1] http://people.linaro.org/~leo.yan/binaries/perf_4.15_r4/perf.data
Thanks,
Leo Yan
> Review and comments would be greatly appreciated.
>
> Regards,
> Mathieu
>
> [1]. https://github.com/Linaro/OpenCSD
> [2]. git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
> [3]. https://lkml.org/lkml/2017/12/14/612
>
> Mathieu Poirier (8):
> perf tools: Integrating the CoreSight decoding library
> perf tools: Add initial entry point for decoder CoreSight traces
> perf tools: Add decoder mechanic to support dumping trace data
> perf tools: Add support for decoding CoreSight trace data
> perf tools: Add functionality to communicate with the openCSD decoder
> pert tools: Add queue management functionality
> perf tools: Add full support for CoreSight trace decoding
> perf tools: Add mechanic to synthesise CoreSight trace packets
>
> Tor Jeremiassen (2):
> perf tools: Add processing of coresight metadata
> MAINTAINERS: Adding entry for CoreSight trace decoding
>
> MAINTAINERS | 3 +-
> tools/build/Makefile.feature | 6 +-
> tools/build/feature/Makefile | 6 +-
> tools/build/feature/test-all.c | 5 +
> tools/build/feature/test-libopencsd.c | 8 +
> tools/perf/Makefile.config | 13 +
> tools/perf/util/Build | 6 +
> tools/perf/util/auxtrace.c | 2 +
> tools/perf/util/cs-etm-decoder/Build | 1 +
> tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 513 ++++++++++++
> tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 105 +++
> tools/perf/util/cs-etm.c | 1023 +++++++++++++++++++++++
> tools/perf/util/cs-etm.h | 18 +
> 13 files changed, 1705 insertions(+), 4 deletions(-)
> create mode 100644 tools/build/feature/test-libopencsd.c
> create mode 100644 tools/perf/util/cs-etm-decoder/Build
> create mode 100644 tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> create mode 100644 tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
> create mode 100644 tools/perf/util/cs-etm.c
>
> --
> 2.7.4
>
next prev parent reply other threads:[~2017-12-30 0:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 16:44 [PATCH 00/10] perf tools: Add support for CoreSight trace decoding Mathieu Poirier
2017-12-15 16:44 ` [PATCH 01/10] perf tools: Integrating the CoreSight decoding library Mathieu Poirier
2017-12-15 16:44 ` [PATCH 02/10] perf tools: Add initial entry point for decoder CoreSight traces Mathieu Poirier
2017-12-15 16:44 ` [PATCH 03/10] perf tools: Add processing of coresight metadata Mathieu Poirier
2017-12-15 16:44 ` [PATCH 04/10] perf tools: Add decoder mechanic to support dumping trace data Mathieu Poirier
2017-12-15 16:44 ` [PATCH 05/10] perf tools: Add support for decoding CoreSight " Mathieu Poirier
2017-12-30 0:33 ` Leo Yan
2018-01-09 12:09 ` Mike Leach
2018-01-10 5:59 ` Leo Yan
2018-01-10 20:16 ` Mathieu Poirier
2017-12-15 16:44 ` [PATCH 06/10] perf tools: Add functionality to communicate with the openCSD decoder Mathieu Poirier
2017-12-15 16:44 ` [PATCH 07/10] pert tools: Add queue management functionality Mathieu Poirier
2017-12-15 16:44 ` [PATCH 08/10] perf tools: Add full support for CoreSight trace decoding Mathieu Poirier
2017-12-15 16:44 ` [PATCH 09/10] perf tools: Add mechanic to synthesise CoreSight trace packets Mathieu Poirier
2017-12-15 16:44 ` [PATCH 10/10] MAINTAINERS: Adding entry for CoreSight trace decoding Mathieu Poirier
2017-12-30 0:51 ` Leo Yan [this message]
2018-01-08 17:45 ` [PATCH 00/10] perf tools: Add support " Mathieu Poirier
2018-01-11 0:08 ` Kim Phillips
2018-01-11 12:23 ` Mark Brown
2018-01-11 15:45 ` Mathieu Poirier
2018-01-11 17:28 ` Kim Phillips
2018-01-11 21:11 ` Mathieu Poirier
2018-01-11 21:49 ` Kim Phillips
2018-01-11 22:18 ` Mathieu Poirier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171230005137.GE600@leoy-linaro \
--to=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).