In the previous patch set for fixing CoreSight snapshot mode [1], the
patch for perf tool has been merged into the mainline kernel [2]; other
two patches for CoreSight driver have been left out.
This patch series resends these two missed out patches, alongside
patches 01 and 02 are updated with minor improvement commits.
This patch series has been tested on Arm64 Juno board.
Changes from v2:
- Minor improvement the commits for patches 01 and 02.
[1] https://lore.kernel.org/lkml/20210701093537.90759-1-leo.yan@linaro.org/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
Leo Yan (2):
coresight: tmc-etr: Use perf_output_handle::head for AUX ring buffer
coresight: Update comments for removing cs_etm_find_snapshot()
drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +-
drivers/hwtracing/coresight/coresight-tmc-etr.c | 12 ++++--------
3 files changed, 6 insertions(+), 10 deletions(-)
--
2.25.1
Changes since v1:
* Re-implement with a new magic number instead of piggybacking on ETMv4
* Improve comments and function name around cs_etm_decoder__get_etmv4_arch_ver()
* Add a warning for unrecognised magic numbers
* Split typo fix into new commit
* Add Leo's reviewed-by tags
* Create a new struct for ETE config (cs_ete_trace_params) instead of re-using ETMv4 config
Applies to perf/core f3c33cbd922
Also available at https://gitlab.arm.com/linux-arm/linux-jc/-/tree/james-ete-v2
James Clark (9):
perf cs-etm: Refactor initialisation of decoder params.
perf cs-etm: Initialise architecture based on TRCIDR1
perf cs-etm: Refactor out ETMv4 header saving
perf cs-etm: Save TRCDEVARCH register
perf cs-etm: Fix typo
perf cs-etm: Update OpenCSD decoder for ETE
perf cs-etm: Create ETE decoder
perf cs-etm: Print the decoder name
perf cs-etm: Show a warning for an unknown magic number
tools/build/feature/test-libopencsd.c | 4 +-
tools/perf/arch/arm/util/cs-etm.c | 97 ++++++++----
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 148 ++++++++----------
.../perf/util/cs-etm-decoder/cs-etm-decoder.h | 13 ++
tools/perf/util/cs-etm.c | 43 ++++-
tools/perf/util/cs-etm.h | 10 ++
6 files changed, 200 insertions(+), 115 deletions(-)
--
2.28.0
Hello everyone,
I'm interested in using CoreSight on a DragonBoard 410c. My preference
is to perform trace acquisition and decoding using perf tools. I
successfully cross-compiled the Linaro Linux release 21.03 [1] and
built a boot image with CoreSight components enabled. Then I tried to
figure out trace decoding, which I prefer to perform on a host
machine. I successfully compiled OpenCSD on my Ubuntu host using the
instructions in [2], but I got errors when I tried to compile perf
with OpenCSD.
Then I moved to the other option that was trace decoding on the board.
I successfully compiled OpenCSD on my DragonBoard 410c. Since the free
space on the eMMC is less than the size of the kernel source, I stored
the kernel source on a MicroSD card and tried to compile perf within
the MicroSD. But I got the following error in both cases of trying to
compile perf with OpenCSD (make -C tools/perf VF=1 CORESIGHT=1) or
compiling it standalone (make -C tools/perf):
linaro@linaro-alip:/media/linaro/mymicrosd/kernel$ make -C tools/perf
VF=1 CORESIGHT=1
make: Entering directory '/media/linaro/mymicrosd/kernel/tools/perf'
BUILD: Doing 'make -j4' parallel build
make[1]: ./check-headers.sh: Permission denied
make[1]: *** [Makefile.perf:232: sub-make] Error 127
make: *** [Makefile:70: all] Error 2
make: Leaving directory '/media/linaro/mymicrosd/kernel/tools/perf'
To conclude, my problem regarding trace acquisition is that I cannot
compile perf on DragonBoard 410c, and my problem regarding trace
decoding is that I cannot compile perf with OpenCSD either on a Ubuntu
host or on the board.
Any help is greatly appreciated.
Regards,
Farzam
[1] https://releases.linaro.org/96boards/dragonboard410c/linaro/debian/21.03/
[2] https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md
Hi Tao,
Apologies for the late reply - this patch fell through the cracks.
On Thu, Aug 19, 2021 at 05:29:37PM +0800, Tao Zhang wrote:
> The input parameter of the function pm_runtime_put should be the
> same in the function cti_enable_hw and cti_disable_hw. The correct
> parameter to use here should be dev->parent.
>
> Signed-off-by: Tao Zhang <quic_taozha(a)quicinc.com>
> ---
> drivers/hwtracing/coresight/coresight-cti-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c b/drivers/hwtracing/coresight/coresight-cti-core.c
> index e2a3620..8988b2e 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-core.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-core.c
> @@ -175,7 +175,7 @@ static int cti_disable_hw(struct cti_drvdata *drvdata)
> coresight_disclaim_device_unlocked(csdev);
> CS_LOCK(drvdata->base);
> spin_unlock(&drvdata->spinlock);
> - pm_runtime_put(dev);
> + pm_runtime_put(dev->parent);
You are correct - I have added this patch to my next tree.
Thanks,
Mathieu
> return 0;
>
> /* not disabled this call */
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
When build perf tool with passing option 'CORESIGHT=1' explicitly, if
the feature test fails for library libopencsd, the build doesn't
complain the feature failure and continue to build the tool with
disabling the CoreSight feature insteadly.
This patch changes the building behaviour, when build perf tool with the
option 'CORESIGHT=1' and detect the failure for testing feature
libopencsd, the build process will be aborted and it shows the complaint
info.
Signed-off-by: Leo Yan <leo.yan(a)linaro.org>
---
Changes from v1:
Fixed a typo in the error message.
tools/perf/Makefile.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 4a0d9a6defc7..5df79538486b 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -489,6 +489,8 @@ ifdef CORESIGHT
CFLAGS += -DCS_RAW_PACKED
endif
endif
+ else
+ dummy := $(error Error: No libopencsd library found or the version is not up-to-date. Please install recent libopencsd to build with CORESIGHT=1)
endif
endif
--
2.25.1
When build perf tool with passing option 'CORESIGHT=1' explicitly, if
the feature test fails for library libopencsd, the build doesn't
complain the feature failure and continue to build the tool with
disabling the CoreSight feature insteadly.
This patch changes the building behaviour, when build perf tool with the
option 'CORESIGHT=1' and detect the failure for testing feature
libopencsd, the build process will be aborted and it shows the complaint
info.
Signed-off-by: Leo Yan <leo.yan(a)linaro.org>
---
tools/perf/Makefile.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 4a0d9a6defc7..5df79538486b 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -489,6 +489,8 @@ ifdef CORESIGHT
CFLAGS += -DCS_RAW_PACKED
endif
endif
+ else
+ dummy := $(error Error: No libopencsd library found or the version is not up-to-date. Please install recent libopencsd to build with COREISGHT=1)
endif
endif
--
2.25.1