Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 69 +
1 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
truct pt_regs *reg, unsigned nth)
Get Nth argument at function call. (N >= 0)
Changes from v5:
- Rename valid_stack_address to within_kernel_stack.
- Rename get_stack_nth to get_kernel_stack_nth.
Signed-off-by: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Moln
:
- fix patch title.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
---
arch/x86/include/asm
are no differences.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
Cc: Sam Ravnborg
upport patch.
- Add kprobe_trace_entry and kretprobe_trace_entry for recording kprobe
events.
- Support common arguments filtering via
tracing/events/ftrace/kprobe(or kretprobe)/filter.
- Add a selftest.
Signed-off-by: Masami Hiramatsu
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: An
1b/0x1d <-do_sys_open:
0x3 0x81367a3a
Each line shows when the kernel hits a probe, and <- SYMBOL means kernel
returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
returns from do_sys_open to sys_open+0x1b).
Thank you,
---
Masami Hiramatsu (6
: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
Cc: Frederic Weisbecker
---
include/linux/ftrace_event.h | 13 ++
include/trace/ftrace.h | 22 +
kernel/trace/trace_events.c | 54 +-
kernel/trace
Ensure safeness of inserting kprobes by checking whether the specified
address is at the first byte of a instruction on x86.
This is done by decoding probed function from its head to the probe point.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo
truct pt_regs *reg, unsigned nth)
Get Nth argument at function call. (N >= 0)
Signed-off-by: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Roland McGrath
---
arch/x86/include/asm
are no differences.
Changes from v7:
- Add data, addr, rep, lock prefixes to skip instructions list.
- Add license comments.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
:
- fix patch title.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
---
arch/x86/include/asm
38282.286969: do_sys_open+0x0/0xd6: 0xff9c
0x4041c6 0x98800 0x10
<...>-1447 [001] 1038282.286976: sys_open+0x1b/0x1d <- do_sys_open:
0x3 0x81367a3a
Each line shows when the kernel hits a probe, and <- SYMBOL means kernel
returns from SYMBOL(e.g. "sys_op
vent Tracer
+ =
+
+ Documentation is written by Masami Hiramatsu
+
+
+Overview
+
+This tracer is similar to the events tracer which is based on Tracepoint
+infrastructure. Instead of Tracepoint, this tracer is based on kprobes(kprobe
+and kretprobe). It probes anywhere where kprobes can
Steven Rostedt wrote:
>
>
> On Thu, 28 May 2009, Masami Hiramatsu wrote:
>
>> +#undef SHOW_FIELD
>> +#define SHOW_FIELD(type, item, name)
>> \
>> +do {\
&g
Christoph Hellwig wrote:
> On Thu, May 28, 2009 at 08:03:53PM -0400, Masami Hiramatsu wrote:
>> Add kprobes-based event tracer on ftrace.
>
> Wouldn't it make more sense to call this the dynamic event tracer?
>
> The use of kprobes is more an implementation detail than
return regs->ax;
> case 1:
> return regs->dx;
> case 2:
> return regs->cx;
> }
Oops, thanks,
>
>> +#define REG_OFFSET(r) offsetof(struct pt_regs, r)
>> +#define
rom
dwarf register mapping.) So, below command adds probe at
fs/open.c:1024 and trace 'files' variable :-)
$ echo p _stext+0xd1f72 %r12 > /debug/tracing/kprobe_events
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Div
:
- fix patch title.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
---
arch/x86/include/asm
: sys_open+0x1b/0x1d <- do_sys_open:
0x3 0x81367a3a
Each line shows when the kernel hits a probe, and <- SYMBOL means kernel
returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
returns from do_sys_open to sys_open+0x1b).
Thank you,
---
Masami Hira
:
- Lock event_mutex in trace_add/remove_event_call().
- Add __trace_add/remove_event_call() for internal use.
- Rename "dummy" variables to "unused".
Signed-off-by: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
Cc: Frederic Weisbecker
---
include/
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
are no differences.
Changes from v7:
- Add data, addr, rep, lock prefixes to skip instructions list.
- Add license comments.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
k. (N >= 0)
- regs_get_argument_nth(struct pt_regs *reg, unsigned nth)
Get Nth argument at function call. (N >= 0)
Changes from v8:
- Add regs_ prefix to the APIs
- Add kerneldoc comments.
- Cleanup regs_get_argument_nth() code.
- Remove REG_OFFSET macro.
Signed-off-by: Masami Hiramatsu
Cc: Chris
fig.
- Fix debugfs file path.
Signed-off-by: Masami Hiramatsu
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zanussi
---
Documentation/trace/kprobes.txt | 138
kernel/trace/Kconfig | 11
k
Ensure safeness of inserting kprobes by checking whether the specified
address is at the first byte of a instruction on x86.
This is done by decoding probed function from its head to the probe point.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo
are no differences.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
Cc
Ensure safeness of inserting kprobes by checking whether the specified
address is at the first byte of a instruction on x86.
This is done by decoding probed function from its head to the probe point.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo
: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
---
arch/x86/include/asm/inat.h
k. (N >= 0)
- regs_get_argument_nth(struct pt_regs *reg, unsigned nth)
Get Nth argument at function call. (N >= 0)
Signed-off-by: Masami Hiramatsu
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Roland McGrath
Cc: linux-a...
argument. (N >= 0)
rv: Fetch return value.
ra: Fetch return address.
+|-offs(FETCHARG) : fetch memory at FETCHARG +|- offs address.
See Documentation/trace/kprobes.txt for details.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
x4041c6 0x98800 0x10
<...>-1447 [001] 1038282.286976: sys_open+0x1b/0x1d <- do_sys_open:
0x3 0x81367a3a
Each line shows when the kernel hits a probe, and <- SYMBOL means kernel
returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
r
: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
Cc: Frederic Weisbecker
---
include/linux/ftrace_event.h | 13 +---
include/trace/ftrace.h | 22 +++--
kernel/trace/trace_events.c | 70 --
kernel/trace
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
are no differences.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
Cc
k. (N >= 0)
- regs_get_argument_nth(struct pt_regs *reg, unsigned nth)
Get Nth argument at function call. (N >= 0)
Changes from v9:
-Fix a typo in a comment.
Signed-off-by: Masami Hiramatsu
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbe
: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
Cc: Frederic Weisbecker
---
include/linux/ftrace_event.h | 13 +---
include/trace/ftrace.h | 22 +++--
kernel/trace/trace_events.c | 70 --
kernel/trace
Ensure safeness of inserting kprobes by checking whether the specified
address is at the first byte of a instruction on x86.
This is done by decoding probed function from its head to the probe point.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
Each line shows when the kernel hits a probe, and <- SYMBOL means kernel
returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
returns from do_sys_open to sys_open+0x1b).
Thank you,
---
Masami Hiramatsu (7):
tracing: add kprobe-based event tracer
: Masami Hiramatsu
Signed-off-by: Jim Keniston
Acked-by: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
---
arch/x86/include/asm/inat.h
argument. (N >= 0)
rv: Fetch return value.
ra: Fetch return address.
+|-offs(FETCHARG) : fetch memory at FETCHARG +|- offs address.
See Documentation/trace/kprobes.txt for details.
Changes from v9:
- Select CONFIG_GENERIC_TRACER when CONFIG_KPROBE_TRACER=y.
Signed-off-by: Masam
Andi Kleen wrote:
> Masami Hiramatsu writes:
>
>> Add following APIs for accessing registers and stack entries from pt_regs.
>
> You forgot to state who calls these functions/why are they added?
> Who only has strings for registers?
Oh, yes. This patch is needed for kprob
Andi Kleen wrote:
> On Mon, Jul 06, 2009 at 03:28:02PM -0400, Masami Hiramatsu wrote:
>> I'm not so sure about your idea.
>> Would you mean below code?
>>
>> int offs_table[NR_REGPARMS] = {
>
> not REGPARMS of course
>
>> [0] = offsetof(
, func)
>> +TRACE_FIELD(unsigned long, ret_ip, ret_ip)
>> +TRACE_FIELD(int, nargs, nargs)
>> +TRACE_FIELD_SPECIAL(unsigned long args[TRACE_KPROBE_ARGS],
>> +args, TRACE_KPROBE_ARGS, args)
>> +
Frederic Weisbecker wrote:
> On Tue, Jul 07, 2009 at 03:55:28PM -0400, Masami Hiramatsu wrote:
>> Frederic Weisbecker wrote:
>>>> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
>>>> index 206cb7d..65945eb 100644
>>>> --- a/kernel/
Frederic Weisbecker wrote:
> On Tue, Jul 07, 2009 at 04:42:32PM -0400, Masami Hiramatsu wrote:
>> Frederic Weisbecker wrote:
>>> On Tue, Jul 07, 2009 at 03:55:28PM -0400, Masami Hiramatsu wrote:
>>>> Frederic Weisbecker wrote:
>>>>>> diff --g
Frederic Weisbecker wrote:
> On Tue, Jul 07, 2009 at 05:31:25PM -0400, Masami Hiramatsu wrote:
>> Frederic Weisbecker wrote:
>>> On Tue, Jul 07, 2009 at 04:42:32PM -0400, Masami Hiramatsu wrote:
>>>> Frederic Weisbecker wrote:
>>>>> On Tue, Jul 07, 200
Masami Hiramatsu wrote:
> Frederic Weisbecker wrote:
>> On Tue, Jul 07, 2009 at 05:31:25PM -0400, Masami Hiramatsu wrote:
>>> Frederic Weisbecker wrote:
>>>> On Tue, Jul 07, 2009 at 04:42:32PM -0400, Masami Hiramatsu wrote:
>>>>> Frederic Weisbecker wro
Ensure safeness of inserting kprobes by checking whether the specified
address is at the first byte of a instruction on x86.
This is done by decoding probed function from its head to the probe point.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo
: Masami Hiramatsu
Acked-by: Frederic Weisbecker
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
---
include/linux/ftrace_event.h | 13 +---
include/trace/ftrace.h | 22 +++--
kernel/trace/trace_events.c | 70 --
kernel/trace
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
: Masami Hiramatsu
Signed-off-by: Jim Keniston
Acked-by: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
---
arch/x86/include/asm/inat.h
get_argument_nth().
- Use "unsigned int" instead of "unsigned".
Signed-off-by: Masami Hiramatsu
Reviewed-by: Frederic Weisbecker
Cc: Andi Kleen
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Rolan
Use TRACE_FIELD_ZERO(type, item) instead of TRACE_FIELD_ZERO_CHAR(item).
This also includes a fix of TRACE_ZERO_CHAR() macro.
Signed-off-by: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
Cc: Frederic Weisbecker
---
kernel/trace/trace_event_types.h |4 ++--
kernel
are no differences.
Changes from v10:
- Use "unsigned int" instead of "unsigned".
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbe
Generate names for each kprobe event based on the probe point,
and remove generic k*probe event types because there is no user
of those types.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc
- Make kprobe_trace_entry and kretprobe_trace_entry variable array.
- Use TRACE_FIELD_ZERO()
- Rename the document to kprobetrace.txt.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zan
Add profiling interaces for each kprobes event.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zanussi
---
Documentation/trace/kprobetrace.txt |8 ++
kernel/trace
n the kernel hits a probe, and <- SYMBOL means kernel
returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
returns from do_sys_open to sys_open+0x1b).
Thank you,
---
Masami Hiramatsu (11):
tracing: Add kprobes event profiling interface
tracing
Support up to 128 arguments for each kprobes event.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zanussi
---
Documentation/trace/kprobetrace.txt |2 +-
kernel/trace
gt;> +if (tp == NULL)
>> +return 0;
>> +
>
> tp will never be NULL, which is guaranteed by seq_file
OK, fixed.
>> +seq_printf(m, "%s", tp->call.name);
>> +
>> +seq_printf(m, "\t%8lu %8lu\n", tp->nhits,
>
t; +if (!trace_seq_puts(s, " <- "))
>> +goto partial;
>> +
>> +if (!seq_print_ip_sym(s, field->func, flags & ~TRACE_ITER_SYM_OFFSET))
>> + goto partial;
>> +
>
> and $pf?
>
>> +if (!trace_seq_puts(
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
:
- Call remove_subsystem_dir() when unregistering an event call.
Signed-off-by: Masami Hiramatsu
Acked-by: Frederic Weisbecker
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
---
include/linux/ftrace_event.h | 13 +---
include/trace/ftrace.h | 22 ++---
kernel
Use TRACE_FIELD_ZERO(type, item) instead of TRACE_FIELD_ZERO_CHAR(item).
This also includes a fix of TRACE_ZERO_CHAR() macro.
Signed-off-by: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
Cc: Frederic Weisbecker
---
kernel/trace/trace_event_types.h |4 ++--
kernel
: Masami Hiramatsu
Signed-off-by: Jim Keniston
Acked-by: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Andi Kleen
Cc: Vegard Nossum
Cc: Avi Kivity
Cc: Przemysław Pawełczyk
---
arch/x86/include/asm/inat.h
get_argument_nth().
- Use "unsigned int" instead of "unsigned".
Signed-off-by: Masami Hiramatsu
Reviewed-by: Frederic Weisbecker
Cc: Andi Kleen
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Rolan
Support up to 128 arguments for each kprobes event.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zanussi
---
Documentation/trace/kprobetrace.txt |2 +-
kernel/trace
Generate names for each kprobe event based on the probe point,
and remove generic k*probe event types because there is no user
of those types.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc
Each line shows when the kernel hits a probe, and <- SYMBOL means kernel
returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
returns from do_sys_open to sys_open+0x1b).
Thank you,
---
Masami Hiramatsu (11):
tracing: Add kprobes event profiling i
Add profiling interaces for each kprobes event.
Changes from v11:
- Fix a typo and remove redundant check.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zanussi
Cc: Li Zefan
are no differences.
Changes from v10:
- Use "unsigned int" instead of "unsigned".
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: H. Peter Anvin
Cc: Steven Rostedt
Cc: Ananth N Mavinakayanahalli
Cc: Srikar Dronamraju
Cc: Ingo Molnar
Cc: Frederic Weisbe
cess string bug in trace_arg_string().
- Remove redundant checks.
- Fix buffer overflow in probes_write().
- Fix probes_write() to support inputs ended without a new-line.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo
Ensure safeness of inserting kprobes by checking whether the specified
address is at the first byte of a instruction on x86.
This is done by decoding probed function from its head to the probe point.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo
On 2009年07月16日 12:19, H. Peter Anvin wrote:
> Masami Hiramatsu wrote:
>>
>> These opcode maps do NOT include most of SSE and FP opcodes, because
>> those opcodes are not used in the kernel.
>>
>
> That is not true.
Ah, these opcode maps include some SSE/FP s
?
Thank you,
>
> Same for the other files that requred the types.h hack.
>
> Sam
>
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhira...@redhat.com
--
To unsubscribe from this list: send the line "unsub
Sam Ravnborg wrote:
> On Thu, Jul 16, 2009 at 11:57:06AM -0400, Masami Hiramatsu wrote:
>> Add a user-space selftest of x86 instruction decoder at kernel build time.
>> When CONFIG_X86_DECODER_SELFTEST=y, Kbuild builds a test harness of x86
>> instruction decoder and perfo
Masami Hiramatsu wrote:
>> You are using the native objdump here.
>> But I assume this fails miserably when you build x86 on a powerpc host.
>> In other words - you broke an allyesconfig build for -next...
>> We have $(OBJDUMP) for this.
>
> Ah, I see... Would you k
st is little-endian?
> If it does then it would fail on a power-pc target despite using the
> correct objdump.
Hmm, as far as I can see, the result of get_next() macro with the types
more than two bytes(s16, s32...) might be effected.
But it doesn't effect get_insn_len test because those
Sam Ravnborg wrote:
> On Thu, Jul 16, 2009 at 01:28:54PM -0400, Masami Hiramatsu wrote:
>> Sam Ravnborg wrote:
>>>> diff --git a/arch/x86/include/asm/inat.h b/arch/x86/include/asm/inat.h
>>>> new file mode 100644
>>>> index 000..01e079a
>>>
lly, pagefaults could happen on fetching variables. But
fetching argument routines should handle it...
I'd like to check it, could you tell me details? for example, that exception
log,
kprobe-tracer's event definition(you can see it via
debugfs/tracing/kprobe-events)
and the result of `perf probe
(2010/12/16 19:20), Avi Kivity wrote:
> On 12/13/2010 01:20 PM, Masami Hiramatsu wrote:
>> (2010/12/13 2:47), Avi Kivity wrote:
>> > On 12/12/2010 07:43 PM, Arnaldo Carvalho de Melo wrote:
>> >> Em Sun, Dec 12, 2010 at 07:42:06PM +0200, Avi Kivity escreveu:
>
x27;t
depends on the arch specific feature. However, since physical timer(clock)
interfaces and virtualization interfaces strongly depends on the arch,
I guess the optimized implementations will become different on each arch.
For example, maybe we can export tsc-offset to the guest to adjust clock
o
(2013/10/30 23:03), David Ahern wrote:
> On 10/29/13 11:59 PM, Masami Hiramatsu wrote:
>> (2013/10/29 11:58), David Ahern wrote:
>>> To back out a bit, my end goal is to be able to create and merge
>>> perf-events from any context on a KVM-based host -- guest usersp
Ensure safeness of inserting kprobes by checking whether the specified
address is at the first byte of a instruction on x86.
This is done by decoding probed function from its head to the probe point.
Signed-off-by: Masami Hiramatsu
Acked-by: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction
decoder.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Jim Keniston
Cc: Ingo Molnar
---
arch/x86/kernel/kprobes.c | 128 -
1 files changed, 23
Use TRACE_FIELD_ZERO(type, item) instead of TRACE_FIELD_ZERO_CHAR(item).
This also includes a fix of TRACE_ZERO_CHAR() macro.
Signed-off-by: Masami Hiramatsu
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
Cc: Frederic Weisbecker
---
kernel/trace/trace_event_types.h |4 ++--
kernel
: Masami Hiramatsu
Acked-by: Frederic Weisbecker
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Tom Zanussi
---
include/linux/ftrace_event.h | 13 +---
include/trace/ftrace.h | 22 ++---
kernel/trace/trace_events.c | 72 --
kernel/trace
the kernel stack.
- regs_get_kernel_stack_nth(struct pt_regs *reg, unsigned int nth)
Get Nth entry of the kernel stack. (N >= 0)
- regs_get_argument_nth(struct pt_regs *reg, unsigned int nth)
Get Nth argument at function call. (N >= 0)
Signed-off-by: Masami Hiramatsu
Reviewed-by: Fre
Support up to 128 arguments for each kprobes event.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zanussi
---
Documentation/trace/kprobetrace.txt |2 +-
kernel/trace
vent Tracer
+ =
+
+ Documentation is written by Masami Hiramatsu
+
+
+Overview
+
+This tracer is similar to the events tracer which is based on Tracepoint
+infrastructure. Instead of Tracepoint, this tracer is based on kprobes(kprobe
+an
Generate names for each kprobe event based on the probe point,
and remove generic k*probe event types because there is no user
of those types.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc
rch/x86/lib/inat.c
create mode 100644 arch/x86/lib/insn.c
create mode 100644 arch/x86/lib/x86-opcode-map.txt
create mode 100644 arch/x86/tools/Makefile
create mode 100644 arch/x86/tools/distill.awk
create mode 100644 arch/x86/tools/gen-insn-attr-x86.awk
create mode 100644 arch/x86/tools/test_get_len.
Add profiling interaces for each kprobes event. This interface provides
how many times each probe hit or missed.
Changes from v12:
- Reformat profile data.
Signed-off-by: Masami Hiramatsu
Cc: Ananth N Mavinakayanahalli
Cc: Christoph Hellwig
Cc: Steven Rostedt
Cc: Ingo Molnar
Cc: Frederic
:
- Use arch/x86/tools dir instead of arch/x86/scripts.
- Remove all EXPORT_SYMBOL_GPL() and linux/module.h.
- Replace all types defined in linux/types.h.
- Use inline functions instead of macros.
- Add VIA's RNG/ACE instructions.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Ken
are no differences.
Changes from v12:
- Remove user_include.h.
- Use $(OBJDUMP) instead of native objdump.
- Use hostprogs-y and include insn.c and inat.c directly from test_gen_insn.c.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: Sam Ravnborg
Cc: H. Peter Anvin
Cc: Steven
are no differences.
Signed-off-by: Masami Hiramatsu
Signed-off-by: Jim Keniston
Cc: Ananth N Mavinakayanahalli
Cc: Avi Kivity
Cc: Andi Kleen
Cc: Christoph Hellwig
Cc: Frank Ch. Eigler
Cc: Frederic Weisbecker
Cc: H. Peter Anvin
Cc: Ingo Molnar
Cc: Jason Baron
Cc: K.Prasad
Cc: Lai
: Masami Hiramatsu
Signed-off-by: Jim Keniston
Acked-by: H. Peter Anvin
Cc: Ananth N Mavinakayanahalli
Cc: Avi Kivity
Cc: Andi Kleen
Cc: Christoph Hellwig
Cc: Frank Ch. Eigler
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jason Baron
Cc: K.Prasad
Cc: Lai Jiangshan
Cc: Li Zefan
Cc: Przemysław
1 - 100 of 183 matches
Mail list logo