Add support for UltraSoc System Memory Buffer.
Change since v4:
- Add a simple document of SMB driver according to Suzuki's comment.
- Address the comments from Suzuki.
- https://lore.kernel.org/linux-arm-kernel/20220128061755.31909-1-liuqi115@hu…
Change since v3:
- Modify the file header according to community specifications.
- Address the comments from Mathieu.
- Link:https://lore.kernel.org/linux-arm-kernel/20211118110016.40398-1-liuqi1…
Change since v2:
- Move ultrasoc driver to drivers/hwtracing/coresight.
- Link:https://lists.linaro.org/pipermail/coresight/2021-November/007310.html
Change since v1:
- Drop the document of UltraSoc according to Mathieu's comment.
- Add comments to explain some private hardware settings.
- Address the comments from Mathieu.
- Link: https://lists.linaro.org/pipermail/coresight/2021-August/006842.html
Change since RFC:
- Move driver to drivers/hwtracing/coresight/ultrasoc.
- Remove ultrasoc-axi-com.c, as AXI-COM doesn't need to be configured in
basic tracing function.
- Remove ultrasoc.c as SMB does not need to register with the ultrasoc core.
- Address the comments from Mathieu and Suzuki.
- Link: https://lists.linaro.org/pipermail/coresight/2021-June/006535.html
Qi Liu (2):
drivers/coresight: Add UltraSoc System Memory Buffer driver
Documentation: Add document for UltraSoc SMB drivers
.../trace/coresight/ultrasoc-smb.rst | 79 +++
drivers/hwtracing/coresight/Kconfig | 10 +
drivers/hwtracing/coresight/Makefile | 1 +
drivers/hwtracing/coresight/ultrasoc-smb.c | 643 ++++++++++++++++++
drivers/hwtracing/coresight/ultrasoc-smb.h | 106 +++
5 files changed, 839 insertions(+)
create mode 100644 Documentation/trace/coresight/ultrasoc-smb.rst
create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.c
create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.h
--
2.24.0
Hi Jinlong
On 09/03/2022 14:22, Mao Jinlong wrote:
> It is possibe that probe failure issue happens when the device
> and its child_device's probe happens at the same time.
> In coresight_make_links, has_conns_grp is true for parent, but
> has_conns_grp is false for child device as has_conns_grp is set
> to true in coresight_create_conns_sysfs_group. The probe of parent
> device will fail at this condition. Add has_conns_grp check for
> child device before make the links and make the process from
> device_register to connection_create be atomic to avoid this
> probe failure issue.
>
> Suggested-by: Suzuki K Poulose <suzuki.poulose(a)arm.com>
> Suggested-by: Mike Leach <mike.leach(a)linaro.org>
> Signed-off-by: Mao Jinlong <quic_jinlmao(a)quicinc.com>
Thanks for the rework. The patch looks good to me.
Suzuki
This allows enabling branch broadcast for Perf hosted sessions (the option
is currently only available for the sysfs interface). Hopefully this could
be useful for testing the decode in perf, for example does a determinisitic
run with branch broadcast enabled look the same as with it disabled? It
could also be used for scenarios like OpenJ9's support for JIT code:
java -Xjit:perfTool hello.java
Currently this is not working and you get the usual errors of a missing
DSO, but branch broadcast would have to be enabled anyway before working
through this next issue:
CS ETM Trace: Debug data not found for address 0xffff7b94b058 in /tmp/perf-29360.map
Address range support in Perf for branch broadcast has also not been added
here, but could be added later.
The documentation has been refactored slightly to allow updates to be made
that link the Perf format arguments with the existing documentation.
For Suzuki's comment, I will do it as a separate change that converts all
the other hard coded values to a more consistent sysreg.h style:
nit: While at this, please could you change the hard coded value
to ETM4_CFG_BIT_RETSTK ?
Changes since v1:
* Added Leo's reviewed by on patch 3
* Fix bracket styling
* Add documentation
Applies on top of coresight/next efa56eddf5d5c. But this docs fix is also
required to get the links to work:
https://marc.info/?l=linux-doc&m=164139331923986&w=2
Also available at: https://gitlab.arm.com/linux-arm/linux-jc/-/tree/james-branch-broadcast-v2
James Clark (6):
coresight: Add config flag to enable branch broadcast
coresight: Fail to open with return stacks if they are unavailable
perf cs-etm: Update deduction of TRCCONFIGR register for branch
broadcast
Documentation: coresight: Turn numbered subsections into real
subsections
Documentation: coresight: Link config options to existing
documentation
Documentation: coresight: Expand branch broadcast documentation
.../coresight/coresight-etm4x-reference.rst | 14 ++++-
Documentation/trace/coresight/coresight.rst | 56 +++++++++++++++++--
.../hwtracing/coresight/coresight-etm-perf.c | 2 +
.../coresight/coresight-etm4x-core.c | 23 ++++++--
include/linux/coresight-pmu.h | 2 +
tools/include/linux/coresight-pmu.h | 2 +
tools/perf/arch/arm/util/cs-etm.c | 3 +
7 files changed, 92 insertions(+), 10 deletions(-)
--
2.28.0
Hi,
I'm Sending this sysfs addition to the etm4x driver in order to expose
the timestamp source of the trace (given by the TRFCR_ELx.TS register).
As mentioned in [1/2], having this information is useful for assigning
Kernel times to the perf samples.
Thanks,
German
German Gomez (3):
coresight: etm4x: Expose default timestamp source in sysfs
coresight: etm4x: docs: Add documentation for 'ts_source' sysfs
interface
perf cs_etm: Store ts_source in AUXTRACE_INFO fields
.../testing/sysfs-bus-coresight-devices-etm4x | 8 +++
.../coresight/coresight-etm4x-reference.rst | 14 ++++
arch/arm64/include/asm/sysreg.h | 1 +
.../coresight/coresight-etm4x-sysfs.c | 34 ++++++++++
tools/perf/arch/arm/util/cs-etm.c | 64 +++++++++++++++++--
tools/perf/util/cs-etm.c | 61 +++++++++---------
tools/perf/util/cs-etm.h | 13 +++-
7 files changed, 159 insertions(+), 36 deletions(-)
--
2.25.1
Hi Mike,
We would like to know if the perf decode script (cs-trace-disasm.py) mentioned
in the OpenCSD HOWTO page is hosted anywhere ?
https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md#trace-decoding-with-…
Also, does the script support generating instruction trace for both user space
and kernel space ?
With Regards,
Tanmay