Skip to content

x86, ptrace: execution trace support

Markus Metzger lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 1 patch 0 repliesNew

Patches in v1 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

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

Read the v1 thread

Cover letter [patch 0/1] x86, ptrace: execution trace support

Execution trace support for application debugging.

The following patch establishes the user interface and the low-level hardware interface. What's missing is an intermediate layer based on utrace.

The user interface uses ptrace to expose the feature to application debuggers. From what I found on lwn.net, ptrace will remain as user interface for utrace.

The low-level interface functions as resource allocator for the hardware's IA32_DS_AREA MSR, which is used for PEBS performance monitoring and for BTS execution tracing.

The low-level interface will be used by perfmon2 and is currently used by this patch.

The patch currently implements execution trace support directly in ptrace for the simple reason that utrace is not yet available.

Quoted 1 line

From the perspective of this patch, utrace is an intermediate layer

that will be introduced between ptrace and ds.c. As such, this layer may be introduced at any time without affecting the other interfaces.

I fail to see a reason why we should not establish the two interfaces that are meant to remain stable at this point in time.
- Intel is waiting for the user interface to support execution trace in their application debugger for MID.
- Perfmon2 is waiting for the low-level interface.
- Execution tracing is an extremely useful debugging feature that would greatly help application developers as well as kernel developers.

The patch does not depend on ptrace except for a small change to ptrace_disable(); nor does it add dependencies to ptrace. It therefore does not cause any additional effort in order to introduce the utrace layer for the remainder of ptrace.

The two (three, if we consider perfmon2) projects would be able to proceed independently and in parallel. Currently, we are preventing progress on perfmon2 and on execution trace support for Moblin for no apparent reason.

regards,
markus.
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.