Re: [RFC] [PATCH 0/7] UBP, XOL and Uprobes

From: Masami Hiramatsu
Date: Mon Jan 11 2010 - 09:36:30 EST

Srikar Dronamraju wrote:
> Hi,
> This patchset implements Uprobes which enables you to dynamically
> break into any routine in a user space application and collect
> information non-disruptively. Uprobes is based on utrace and uses
> x86 instruction decoder.
> When a uprobe is registered, Uprobes makes a copy of the probed
> instruction, stops the probed application, replaces the first
> byte(s) of the probed instruction with a breakpoint instruction and
> allows the probed application to continue. (Uprobes uses the same
> copy-on-write mechanism so that the breakpoint affects only that
> process.)
> When a CPU hits the breakpoint instruction, Uprobes intercepts the
> SIGTRAP and finds the associated uprobe. It then executes the
> associated handler. Uprobes single-steps its copy of the probed
> instruction and resumes execution of the probed process at the
> instruction following the probepoint. Instruction copies to be
> single-stepped are stored in a per-process "single-step out of line
> (XOL) area,"
> Uprobes can be used to take advantage of static markers available
> in user space applications.
> Advantages of uprobes over conventional debugging include:
> 1. Non-disruptive.
> 2. Uses Execution out of line(XOL),
> 3. Much better handling of multithreaded programs because of XOL.
> 4. No context switch between tracer, tracee.

Hi Srikar and Jim,

Great work! thanks for releasing it.

> Here is the list of TODO Items.
> - Provide a perf interface to uprobes.

I think we also need to integrate ftrace-kprobe/uprobe to support
dynamic trace event. it helps perf probe to support uprobe much

> - Return probes.

Hmm, I think we need some symbol information for supporting
return probes in user space. Could you tell me how to work it?
is that requires some user-space helper?

> - Support for Other Architectures.
> - Jump optimization.

I assume that you meant this is "uprobe-booster" to skip
just single stepping after probing, isn't it?

Thank you,
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@xxxxxxxxxx

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at