Re: linux-next: add utrace tree

2010-01-28 Thread Jim Keniston
On Thu, 2010-01-28 at 09:55 +0100, Ingo Molnar wrote: * Jim Keniston jkeni...@us.ibm.com wrote: On Wed, 2010-01-27 at 09:54 +0100, Ingo Molnar wrote: ... Yes, emulating push %ebp would buy us a lot of coverage for a lot of apps on x86 (but see below**). [...] ... [...] Even

Re: linux-next: add utrace tree

2010-01-27 Thread Jim Keniston
On Wed, 2010-01-27 at 09:54 +0100, Ingo Molnar wrote: ... I think the best solution for user probes (by far) is to use a simplified in-kernel instruction emulator for the few common probes instruction. (Kprobes already partially decodes x86 instructions to make it safe to apply

Re: [RFC] [PATCH 0/7] UBP, XOL and Uprobes [ Summary of Comments and actions to be taken ]

2010-01-22 Thread Jim Keniston
On Fri, 2010-01-22 at 19:06 +0100, Peter Zijlstra wrote: On Fri, 2010-01-22 at 12:32 +0530, Srikar Dronamraju wrote: 2. XOL vma vs Emulation vs Single Stepping Inline vs using Protection Rings. XOL VMA is an additional process address vma. This is opposition to add an

Re: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)

2010-01-19 Thread Jim Keniston
On Tue, 2010-01-19 at 10:07 +0200, Avi Kivity wrote: On 01/19/2010 12:15 AM, Jim Keniston wrote: I don't like the idea but if the performance benefits are real (are they?), Based on what seems to be the closest thing to an apples-to-apples comparison -- counting the number

Re: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)

2010-01-18 Thread Jim Keniston
On Mon, 2010-01-18 at 10:58 -0500, Masami Hiramatsu wrote: Jim Keniston wrote: Not really. For #3 (boosting), you need to know everything for #2, plus be able to compute the length of each instruction -- which we can now do for x86. To emulate an instruction (#4), you need

Re: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)

2010-01-18 Thread Jim Keniston
On Mon, 2010-01-18 at 14:34 +0100, Mark Wielaard wrote: On Mon, 2010-01-18 at 14:53 +0200, Avi Kivity wrote: On 01/18/2010 02:51 PM, Pekka Enberg wrote: And how many probes do we expected to be live at the same time in real-world scenarios? I guess Avi's one million is more than

Re: [RFC] [PATCH 3/7] Execution out of line (XOL)

2010-01-15 Thread Jim Keniston
On Fri, 2010-01-15 at 10:07 +0100, Peter Zijlstra wrote: On Thu, 2010-01-14 at 14:43 -0800, Jim Keniston wrote: Yeah, there's not a lot of context there. I hope it will make more sense if you read section 1.1 of Documentation/uprobes.txt (patch #6). Or look at get_insn_slot

Re: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)

2010-01-15 Thread Jim Keniston
On Fri, 2010-01-15 at 10:02 +0100, Peter Zijlstra wrote: On Thu, 2010-01-14 at 11:46 -0800, Jim Keniston wrote: +Instruction copies to be single-stepped are stored in a per-process +single-step out of line (XOL) area, which is a little VM area +created by Uprobes in each probed

Re: [RFC] [PATCH 4/7] Uprobes Implementation

2010-01-15 Thread Jim Keniston
On Fri, 2010-01-15 at 12:18 +0100, Peter Zijlstra wrote: On Fri, 2010-01-15 at 12:12 +0100, Peter Zijlstra wrote: ... Adding the probe uses the fact that (most) executable mappings are MAP_PRIVATE and CoWs a private copy of the page with the modified ins, right? We've just used

Re: [RFC] [PATCH 4/7] Uprobes Implementation

2010-01-15 Thread Jim Keniston
On Fri, 2010-01-15 at 19:50 +0530, Srikar Dronamraju wrote: Furthermore it requires stopping and resuming tasks and nonsense like that, that's unwanted in many cases, just run stuff from the trap site and you're done. I don't know what you mean exactly. A trap already

Re: [RFC] [PATCH 4/7] Uprobes Implementation

2010-01-15 Thread Jim Keniston
On Fri, 2010-01-15 at 12:12 +0100, Peter Zijlstra wrote: ... Adding the probe uses the fact that (most) executable mappings are MAP_PRIVATE and CoWs a private copy of the page with the modified ins, right? What does it do for MAP_SHARED|MAP_EXECUTABLE sections -- simply fail to add the

Re: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)

2010-01-14 Thread Jim Keniston
On Thu, 2010-01-14 at 12:08 +0100, Peter Zijlstra wrote: On Mon, 2010-01-11 at 17:55 +0530, Srikar Dronamraju wrote: User Space Breakpoint Assistance Layer (UBP) User space breakpointing Infrastructure provides kernel subsystems with architecture independent interface to establish

Re: [RFC] [PATCH 3/7] Execution out of line (XOL)

2010-01-14 Thread Jim Keniston
On Thu, 2010-01-14 at 12:08 +0100, Peter Zijlstra wrote: On Mon, 2010-01-11 at 17:55 +0530, Srikar Dronamraju wrote: Execution out of line (XOL) Slot allocation mechanism for Execution Out of Line strategy in User space breakpointing Inftrastructure. (XOL) This patch provides slot

Re: [RFC] [PATCH 4/7] Uprobes Implementation

2010-01-14 Thread Jim Keniston
On Thu, 2010-01-14 at 12:09 +0100, Peter Zijlstra wrote: On Mon, 2010-01-11 at 17:55 +0530, Srikar Dronamraju wrote: Uprobes Infrastructure enables user to dynamically establish probepoints in user applications and collect information by executing a handler functions when the

Re: [RFC] [PATCH 4/7] Uprobes Implementation

2010-01-12 Thread Jim Keniston
On Tue, 2010-01-12 at 13:44 +0530, Ananth N Mavinakayanahalli wrote: On Tue, Jan 12, 2010 at 06:36:00AM +0100, Frederic Weisbecker wrote: ... So, as stated before, uprobe seems to handle too much standalone policies such as freeing on exec, always inherit on clone and never on fork. Such

Re: gdbstub/uprobes problems: uprobe_unregister with halted target

2009-08-10 Thread Jim Keniston
On Mon, 2009-08-10 at 12:42 -0400, Frank Ch. Eigler wrote: Hi - On Mon, Aug 03, 2009 at 11:10:00AM -0700, Jim Keniston wrote: [...] So as per my analysis, gdb_utrace_report_signal was called, followed by uprobe_report_signal. Since gdb_utrace_report_signal requested for UTRACE_STOP

Re: [PATCH 2/3] Quiesce all threads of a process

2009-07-31 Thread Jim Keniston
On Thu, 2009-07-30 at 15:26 +0530, Ananth N Mavinakayanahalli wrote: +static u32 core_clone(enum utrace_resume_action action, ... + /* + * -EINPROGRESS = thread on the way to quiesce + * -EALREADY = we may be racing with attach_utrace_engines +

Re: breakpointing user threads

2009-04-06 Thread Jim Keniston
tucked into the SystemTap runtime (runtime/uprobes[2]) since October 2007, but for various reasons (LONG story) it hasn't debuted on LKML yet. The uprobes API is documented in the SystemTap source: runtime/uprobes/uprobes.txt. Jim Keniston

x86 instruction classification

2009-04-03 Thread Jim Keniston
As promised on yesterday's SystemTap call, here's inat.c. It consists of a couple of tables that capture more information about the x86 instruction sets. For example, you could use this code to determine whether an opcode/instruction is invalid, privileged, a floating-point op, or in some other

Re: Need more information on uProbes .

2009-03-31 Thread Jim Keniston
On Tue, 2009-03-31 at 10:09 -0400, Frank Ch. Eigler wrote: ananth wrote: Uprobes is implemented only for architectures that have utrace support (x86-32, x86_64, powerpc, s390, but not IA64). [...] (HAVE_ARCH_TRACEHOOK is on for ia64, sparc, sh also, so utrace per se should work there.)

Re: instruction-analysis API(s)

2009-03-06 Thread Jim Keniston
Quoting Masami Hiramatsu mhira...@redhat.com: Hi Jim and Sriker, Here, I almost rewrote my patch. Changelog: - rewrite decoding logic based on Intel' manual. - supoort insn_get_sib(),insn_get_displacement() and insn_get_immediate() too. - support 3 bytes opcode and 64bit immediate. -

Re: instruction-analysis API(s)

2009-03-03 Thread Jim Keniston
On Fri, 2009-02-27 at 16:20 -0500, Masami Hiramatsu wrote: ... Here are a patch against your code and an example code for instruction length decoder. Curiously, KVM's instruction decoder does not completely cover all instructions(especially, Jcc/test...). I had to refer Intel manuals.

Re: newly created engine immediately notified of exec already in progress

2009-01-06 Thread Jim Keniston
On Wed, 2008-12-17 at 01:21 -0800, Roland McGrath wrote: The current implementation is that if I create a new engine in response to an exec (when called from some other engine's report_exec callback), and set that engine's flags to be notified of execs, the new engine gets notified of the

UTRACE_ACTION_xxx in comments

2008-08-01 Thread Jim Keniston
In utrace code fetched today, cscope reports 16 lines with references to obsolete UTRACE_ACTION_something symbols. They're all in comments or #if 0 code, so they don't break the build, but those comments aren't very helpful in their current state. Jim

Re: [Ksummit-2008-discuss] DTrace

2008-06-30 Thread Jim Keniston
doing this in userspace is for sure a better idea. Can you elaborate upon this more complex scenario? - FChE Jim Keniston

Fwd: utrace refactoring

2007-11-13 Thread Jim Keniston
instruction tracing. Jim Keniston IBM Linux Technology Center Forwarded Message From: Roland McGrath [EMAIL PROTECTED] To: Jim Keniston [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], Maneesh Soni [EMAIL PROTECTED], Frank Eigler [EMAIL PROTECTED] Subject: Re: utrace refactoring... Date: Sun, 11