Skip to content

ARM CoreSight: ETM: Fix a vmalloc/vfree failure and enhance tracing control

Adrien Vergé linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest5 patches 1 replyIn review

Changes in v3 from the cover letter

- Support tracing processes by their PID in PID namespaces
- Reset PID_IN_CONTEXTIDR and PID_NS independent

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ARM CoreSight: ETM: Fix a memory allocation failurearch/arm/kernel/etm.c+8 -50 replies
2/5ARM CoreSight: ETM: Use device attributesarch/arm/kernel/etm.c+21 -270 replies
3/5ARM CoreSight: ETM: Rename 'comparator' to 'address comparator'arch/arm/include/asm/hardware/coresight.h arch/arm/kernel/etm.c+12 -110 replies
4/5ARM CoreSight: ETM: Add address control supportarch/arm/kernel/etm.c+49 -30 replies
5/5ARM CoreSight: ETM: Add PID control supportarch/arm/include/asm/hardware/coresight.h arch/arm/kernel/etm.c+129 -71 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/5] ARM CoreSight: ETM: Fix a vmalloc/vfree failure and enhance tracing control

Hi Russell,

Different ARM users have shown their interest in this patch, so I made a third version that is compatible with PID namespaces.

Mainly:
- It fixes a "vmalloc: allocation failure: 0 bytes" when reading an ETB buffer that is empty.
- It extends current support of CoreSight ETM, that is currently very limited.

ETM is a dedicated hardware that provides program tracing, a cycle-precise and low-overhead solution that software tools such as 'perf record' cannot provide.

Usage of ETM tracing facility is presently limited to start and stop tracing. This set of patches enables management of address combinations and PIDs that trigger tracing, thus allowing to trace specific functions and processes. ETM management was done via sysfs entries (trace_info, trace_running...), this code adds trace_addrrange and trace_pid to let the user read/write custom values.

Changes in V2:
- Fix a vmalloc/vfree failure when ETB is empty
- Use device attributes rather than raw kobjects
- Make PID_IN_CONTEXTIDR incompatible with PID_NS in Kconfig
- Use pid_t instead of long

Changes in V3:
- Support tracing processes by their PID in PID namespaces
- Reset PID_IN_CONTEXTIDR and PID_NS independent

This series of patches applies to v3.13.

Adrien Verg? (5):
ARM CoreSight: ETM: Fix a memory allocation failure ARM CoreSight: ETM: Use device attributes
ARM CoreSight: ETM: Rename 'comparator' to 'address comparator' ARM CoreSight: ETM: Add address control support
ARM CoreSight: ETM: Add PID control support

 arch/arm/include/asm/hardware/coresight.h |   9 +-
 arch/arm/kernel/etm.c                     | 257 ++++++++++++++++++++++++------
 2 files changed, 216 insertions(+), 50 deletions(-)
Signature · 1 line
1.8.5.3