Re: RFC: paravirtualizing perf_clock

2013-10-31 Thread Masami Hiramatsu
(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

Re: Re: RFC: paravirtualizing perf_clock

2013-10-29 Thread Masami Hiramatsu
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

Re: trace_printk() support in trace-cmd

2010-12-16 Thread Masami Hiramatsu
(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: >

Re: trace_printk() support in trace-cmd

2010-12-13 Thread Masami Hiramatsu
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

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-16 Thread Masami Hiramatsu
; > > Joerg > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.or

Re: [TOOL] c2kpe: C expression to kprobe event format converter

2009-08-30 Thread Masami Hiramatsu
Frederic Weisbecker wrote: > On Thu, Aug 13, 2009 at 04:59:19PM -0400, Masami Hiramatsu wrote: >> This program converts probe point in C expression to kprobe event >> format for kprobe-based event tracer. This helps to define kprobes >> events by C source line number or fun

[PATCH tracing/kprobes 4/4] tracing/kprobes: Change trace_arg to probe_arg

2009-08-21 Thread Masami Hiramatsu
Change trace_arg_string() and parse_trace_arg() to probe_arg_string() and parse_probe_arg(), since those are kprobe-tracer local functions. Signed-off-by: Masami Hiramatsu Cc: Jim Keniston Cc: H. Peter Anvin Cc: Ananth N Mavinakayanahalli Cc: Avi Kivity Cc: Andi Kleen Cc: Christoph Hellwig

[PATCH tracing/kprobes 3/4] tracing/kprobes: Fix format typo in trace_kprobes

2009-08-21 Thread Masami Hiramatsu
$ cat /debug/tracing/events/kprobes/event/format ... field: unsigned long ip;offset:16; size:8; field: int nargs; offset:24; size:4; ... Signed-off-by: Masami Hiramatsu Cc: Jim Keniston Cc: H. Peter Anvin Cc: Ananth N Mavinakayanahalli Cc: Avi Kivity

[PATCH tracing/kprobes 2/4] x86: Check awk features before generating inat-tables.c

2009-08-21 Thread Masami Hiramatsu
Check some awk features which old mawk doesn't support. Signed-off-by: Masami Hiramatsu Cc: Jim Keniston Cc: 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 Baro

[PATCH tracing/kprobes 1/4] x86: Fix x86 instruction decoder selftest to check only .text

2009-08-21 Thread Masami Hiramatsu
Fix x86 instruction decoder selftest to check only .text because other sections (e.g. .notes) will have random bytes which don't need to be checked. Signed-off-by: Masami Hiramatsu Cc: Jim Keniston Cc: H. Peter Anvin Cc: Ananth N Mavinakayanahalli Cc: Avi Kivity Cc: Andi Kleen Cc: Chri

Re: [TOOL] kprobestest : Kprobe stress test tool

2009-08-20 Thread Masami Hiramatsu
tracing/kprobes So you can send patches on top of this one. Great! I've found another trivial bugs, so I'll fix those on it. Cool :) Btw, here is the result of your stress test in a PIII (attaching the log and the config). Thanks, I'll check that. Thank you, -- Mas

Re: [TOOL] kprobestest : Kprobe stress test tool

2009-08-20 Thread Masami Hiramatsu
Frederic Weisbecker wrote: On Thu, Aug 13, 2009 at 04:57:20PM -0400, Masami Hiramatsu wrote: This script tests kprobes to probe on all symbols in the kernel and finds symbols which must be blacklisted. Usage - kprobestest [-s SYMLIST] [-b BLACKLIST] [-w WHITELIST] Run stress test

Re: [PATCH -tip v14 01/12] x86: instruction decoder API

2009-08-20 Thread Masami Hiramatsu
Frederic Weisbecker wrote: On Thu, Aug 20, 2009 at 12:16:05PM -0400, Masami Hiramatsu wrote: Frederic Weisbecker wrote: On Thu, Aug 20, 2009 at 11:03:40AM -0400, Masami Hiramatsu wrote: Frederic Weisbecker wrote: On Thu, Aug 20, 2009 at 01:42:31AM +0200, Frederic Weisbecker wrote: On Thu

Re: [PATCH -tip v14 01/12] x86: instruction decoder API

2009-08-20 Thread Masami Hiramatsu
Frederic Weisbecker wrote: On Thu, Aug 20, 2009 at 11:03:40AM -0400, Masami Hiramatsu wrote: Frederic Weisbecker wrote: On Thu, Aug 20, 2009 at 01:42:31AM +0200, Frederic Weisbecker wrote: On Thu, Aug 13, 2009 at 04:34:13PM -0400, Masami Hiramatsu wrote: Add x86 instruction decoder to arch

Re: [PATCH -tip v14 01/12] x86: instruction decoder API

2009-08-20 Thread Masami Hiramatsu
Frederic Weisbecker wrote: On Thu, Aug 20, 2009 at 01:42:31AM +0200, Frederic Weisbecker wrote: On Thu, Aug 13, 2009 at 04:34:13PM -0400, Masami Hiramatsu wrote: Add x86 instruction decoder to arch-specific libraries. This decoder can decode x86 instructions used in kernel into prefix, opcode

Re: [PATCH -tip v14 01/12] x86: instruction decoder API

2009-08-20 Thread Masami Hiramatsu
Frederic Weisbecker wrote: On Thu, Aug 13, 2009 at 04:34:13PM -0400, Masami Hiramatsu wrote: Add x86 instruction decoder to arch-specific libraries. This decoder can decode x86 instructions used in kernel into prefix, opcode, modrm, sib, displacement and immediates. This can also show the

Re: [PATCH -tip v14 07/12] tracing: Introduce TRACE_FIELD_ZERO() macro

2009-08-18 Thread Masami Hiramatsu
Frederic Weisbecker wrote: > On Thu, Aug 13, 2009 at 04:35:01PM -0400, Masami Hiramatsu wrote: >> Use TRACE_FIELD_ZERO(type, item) instead of TRACE_FIELD_ZERO_CHAR(item). >> This also includes a fix of TRACE_ZERO_CHAR() macro. > > > I can't find what the fix is ab

Re: [PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-18 Thread Masami Hiramatsu
Frederic Weisbecker wrote: > On Tue, Aug 18, 2009 at 07:17:39PM -0400, Masami Hiramatsu wrote: >> Frederic Weisbecker wrote: >>>> + while (addr < paddr) { >>>> + kernel_insn_init(&insn, (void *)addr); >>>> + insn_get_o

Re: [PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-18 Thread Masami Hiramatsu
Frederic Weisbecker wrote: > On Thu, Aug 13, 2009 at 04:34:28PM -0400, Masami Hiramatsu wrote: >> 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

[TOOL] c2kpe: C expression to kprobe event format converter

2009-08-13 Thread Masami Hiramatsu
tiple probepoints from stdin. - Better kmodule support. - Use elfutils-libdw? - Merge into trace-cmd or perf-tools? -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America), Inc. Software Solutions Division e-mail: mhira...@redhat.com /* * c2kpe : C expression to kprobe even

[TOOL] kprobestest : Kprobe stress test tool

2009-08-13 Thread Masami Hiramatsu
- This script just gives us some clues to the blacklisted functions. In some cases, a combination of probe points will cause a problem, but each of them doesn't cause the problem alone. Thank you, -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America), Inc. S

[PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-13 Thread Masami Hiramatsu
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: Avi Kivity Cc: Andi

[PATCH -tip v14 05/12] x86: add pt_regs register and stack access APIs

2009-08-13 Thread Masami Hiramatsu
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

[PATCH -tip v14 11/12] tracing: Kprobe tracer assigns new event ids for each event

2009-08-13 Thread Masami Hiramatsu
Assigns new event ids for each kprobes event. This doesn't clear ring_buffer when unregistering each kprobe event. Thus, if you mind 'Unknown event' messages, clear the buffer manually after changing kprobe events. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli

[PATCH -tip v14 09/12] tracing: Kprobe-tracer supports more than 6 arguments

2009-08-13 Thread Masami Hiramatsu
Support up to 128 arguments for each kprobes event. Signed-off-by: Masami Hiramatsu 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: Jim Keniston Cc

[PATCH -tip v14 08/12] tracing: add kprobe-based event tracer

2009-08-13 Thread Masami Hiramatsu
ss. - Use call->data instead of container_of() macro. Signed-off-by: Masami Hiramatsu Acked-by: 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: Jim Kenisto

[PATCH -tip v14 12/12] tracing: Add kprobes event profiling interface

2009-08-13 Thread Masami Hiramatsu
Add profiling interaces for each kprobes event. This interface provides how many times each probe hit or missed. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Avi Kivity Cc: Andi Kleen Cc: Christoph Hellwig Cc: Frank Ch. Eigler Cc: Frederic Weisbecker Cc: H. Peter

[PATCH -tip v14 10/12] tracing: Generate names for each kprobe event automatically

2009-08-13 Thread Masami Hiramatsu
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: Avi Kivity Cc: Andi Kleen Cc: Christoph Hellwig Cc: Frank Ch. Eigler Cc: Frederic

[PATCH -tip v14 07/12] tracing: Introduce TRACE_FIELD_ZERO() macro

2009-08-13 Thread Masami Hiramatsu
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: Ananth N Mavinakayanahalli Cc: Avi Kivity Cc: Andi Kleen Cc: Christoph Hellwig Cc: Frank Ch. Eigler Cc: Frederic Weisbecker Cc

[PATCH -tip v14 06/12] tracing: ftrace dynamic ftrace_event_call support

2009-08-13 Thread Masami Hiramatsu
: - Define remove_subsystem_dir() always (revirt a2ca5e03), because trace_remove_event_call() uses it. - Modify syscall tracer because of ftrace_event_call change. Signed-off-by: Masami Hiramatsu Acked-by: Frederic Weisbecker Cc: Ananth N Mavinakayanahalli Cc: Avi Kivity Cc: Andi Kleen Cc

[PATCH -tip v14 04/12] kprobes: cleanup fix_riprel() using insn decoder on x86

2009-08-13 Thread Masami Hiramatsu
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction decoder. Signed-off-by: Masami Hiramatsu 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

[PATCH -tip v14 00/12] tracing: kprobe-based event tracer and x86 instruction decoder

2009-08-13 Thread Masami Hiramatsu
hows 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 (12): tracing: Add kprobes event profiling interface trac

[PATCH -tip v14 01/12] x86: instruction decoder API

2009-08-13 Thread Masami Hiramatsu
: 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

[PATCH -tip v14 02/12] x86: x86 instruction decoder build-time selftest

2009-08-13 Thread Masami Hiramatsu
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

[PATCH -tip -v13 02/11] x86: x86 instruction decoder build-time selftest

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 01/11] x86: instruction decoder API

2009-07-24 Thread Masami Hiramatsu
: - 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

[PATCH -tip -v13 11/11] tracing: Add kprobes event profiling interface

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 00/11] tracing: kprobe-based event tracer and x86 instruction decoder

2009-07-24 Thread Masami Hiramatsu
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.

[PATCH -tip -v13 10/11] tracing: Generate names for each kprobe event automatically

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 08/11] tracing: add kprobe-based event tracer

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 09/11] tracing: Kprobe-tracer supports more than 6 arguments

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 05/11] x86: add pt_regs register and stack access APIs

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 06/11] tracing: ftrace dynamic ftrace_event_call support

2009-07-24 Thread Masami Hiramatsu
: 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

[PATCH -tip -v13 07/11] tracing: Introduce TRACE_FIELD_ZERO() macro

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 04/11] kprobes: cleanup fix_riprel() using insn decoder on x86

2009-07-24 Thread Masami Hiramatsu
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

[PATCH -tip -v13 03/11] kprobes: checks probe address is instruction boudary on x86

2009-07-24 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
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 >>>

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
? 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

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 03/11] kprobes: checks probe address is instruction boudary on x86

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 08/11] tracing: add kprobe-based event tracer

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 11/11] tracing: Add kprobes event profiling interface

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 00/11] tracing: kprobe-based event tracer and x86 instruction decoder

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 10/11] tracing: Generate names for each kprobe event automatically

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 09/11] tracing: Kprobe-tracer supports more than 6 arguments

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 05/11] x86: add pt_regs register and stack access APIs

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
: 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

[PATCH -tip -v12 07/11] tracing: Introduce TRACE_FIELD_ZERO() macro

2009-07-16 Thread Masami Hiramatsu
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

[PATCH -tip -v12 06/11] tracing: ftrace dynamic ftrace_event_call support

2009-07-16 Thread Masami Hiramatsu
: - 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

[PATCH -tip -v12 04/11] kprobes: cleanup fix_riprel() using insn decoder on x86

2009-07-16 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v11 08/11] tracing: add kprobe-based event tracer

2009-07-10 Thread Masami Hiramatsu
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(

Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface

2009-07-10 Thread Masami Hiramatsu
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, >

[PATCH -tip -v11 09/11] tracing: Kprobe-tracer supports more than 6 arguments

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 00/11] tracing: kprobe-based event tracer and x86 instruction decoder

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 08/11] tracing: add kprobe-based event tracer

2009-07-09 Thread Masami Hiramatsu
- 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

[PATCH -tip -v11 10/11] tracing: Generate names for each kprobe event automatically

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 02/11] x86: x86 instruction decoder build-time selftest

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 05/11] x86: add pt_regs register and stack access APIs

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 07/11] tracing: Introduce TRACE_FIELD_ZERO() macro

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 01/11] x86: instruction decoder API

2009-07-09 Thread Masami Hiramatsu
: 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

[PATCH -tip -v11 04/11] kprobes: cleanup fix_riprel() using insn decoder on x86

2009-07-09 Thread Masami Hiramatsu
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

[PATCH -tip -v11 06/11] tracing: ftrace dynamic ftrace_event_call support

2009-07-09 Thread Masami Hiramatsu
: 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

[PATCH -tip -v11 03/11] kprobes: checks probe address is instruction boudary on x86

2009-07-09 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v10 7/7] tracing: add kprobe-based event tracer

2009-07-07 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v10 7/7] tracing: add kprobe-based event tracer

2009-07-07 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v10 7/7] tracing: add kprobe-based event tracer

2009-07-07 Thread Masami Hiramatsu
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

Re: [PATCH -tip -v10 7/7] tracing: add kprobe-based event tracer

2009-07-07 Thread Masami Hiramatsu
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/

Re: [PATCH -tip -v10 7/7] tracing: add kprobe-based event tracer

2009-07-07 Thread Masami Hiramatsu
, 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) >> +

[PATCH -tip -v10 5/7] x86: add pt_regs register and stack access APIs

2009-07-06 Thread Masami Hiramatsu
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(

Re: [PATCH -tip -v10 5/7] x86: add pt_regs register and stack access APIs

2009-07-06 Thread Masami Hiramatsu
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

[PATCH -tip -v10 7/7] tracing: add kprobe-based event tracer

2009-06-30 Thread Masami Hiramatsu
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

[PATCH -tip -v10 1/7] x86: instruction decoder API

2009-06-30 Thread Masami Hiramatsu
: 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

[PATCH -tip -v10 0/7] tracing: kprobe-based event tracer and x86 instruction decoder

2009-06-30 Thread Masami Hiramatsu
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

[PATCH -tip -v10 4/7] kprobes: cleanup fix_riprel() using insn decoder on x86

2009-06-30 Thread Masami Hiramatsu
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

[PATCH -tip -v10 3/7] kprobes: checks probe address is instruction boudary on x86

2009-06-30 Thread Masami Hiramatsu
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

[PATCH -tip -v10 6/7] tracing: ftrace dynamic ftrace_event_call support

2009-06-30 Thread Masami Hiramatsu
: 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

[PATCH -tip -v10 5/7] x86: add pt_regs register and stack access APIs

2009-06-30 Thread Masami Hiramatsu
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

[PATCH -tip -v10 2/7] x86: x86 instruction decoder build-time selftest

2009-06-30 Thread Masami Hiramatsu
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

[RESEND][ PATCH -tip -v9 4/7] kprobes: cleanup fix_riprel() using insn decoder on x86

2009-06-12 Thread Masami Hiramatsu
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

[RESEND][ PATCH -tip -v9 6/7] tracing: ftrace dynamic ftrace_event_call support

2009-06-12 Thread Masami Hiramatsu
: 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

[RESEND][ PATCH -tip -v9 0/7] tracing: kprobe-based event tracer and x86 instruction decoder

2009-06-12 Thread Masami Hiramatsu
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

[RESEND][ PATCH -tip -v9 7/7] tracing: add kprobe-based event tracer

2009-06-12 Thread Masami Hiramatsu
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

[RESEND][ PATCH -tip -v9 1/7] x86: instruction decoder API

2009-06-12 Thread Masami Hiramatsu
: 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

[RESEND][ PATCH -tip -v9 5/7] x86: add pt_regs register and stack access APIs

2009-06-12 Thread Masami Hiramatsu
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...

[RESEND][ PATCH -tip -v9 3/7] kprobes: checks probe address is instruction boudary on x86

2009-06-12 Thread Masami Hiramatsu
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

  1   2   >