Loading Documentation/ftrace.txt +6 −2 Original line number Diff line number Diff line Loading @@ -1251,7 +1251,11 @@ These are the only wild cards which are supported. <match>*<match> will not work. # echo hrtimer_* > /debug/tracing/set_ftrace_filter Note: It is better to use quotes to enclose the wild cards, otherwise the shell may expand the parameters into names of files in the local directory. # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter Produces: Loading Loading @@ -1306,7 +1310,7 @@ Again, now we want to append. # echo sys_nanosleep > /debug/tracing/set_ftrace_filter # cat /debug/tracing/set_ftrace_filter sys_nanosleep # echo hrtimer_* >> /debug/tracing/set_ftrace_filter # echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter # cat /debug/tracing/set_ftrace_filter hrtimer_run_queues hrtimer_run_pending Loading Documentation/markers.txt +10 −5 Original line number Diff line number Diff line Loading @@ -51,11 +51,16 @@ to call) for the specific marker through marker_probe_register() and can be activated by calling marker_arm(). Marker deactivation can be done by calling marker_disarm() as many times as marker_arm() has been called. Removing a probe is done through marker_probe_unregister(); it will disarm the probe. marker_synchronize_unregister() must be called before the end of the module exit function to make sure there is no caller left using the probe. This, and the fact that preemption is disabled around the probe call, make sure that probe removal and module unload are safe. See the "Probe example" section below for a sample probe module. marker_synchronize_unregister() must be called between probe unregistration and the first occurrence of - the end of module exit function, to make sure there is no caller left using the probe; - the free of any resource used by the probes, to make sure the probes wont be accessing invalid data. This, and the fact that preemption is disabled around the probe call, make sure that probe removal and module unload are safe. See the "Probe example" section below for a sample probe module. The marker mechanism supports inserting multiple instances of the same marker. Markers can be put in inline functions, inlined static functions, and Loading Documentation/tracepoints.txt +2 −2 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ In include/trace/subsys.h : #include <linux/tracepoint.h> DECLARE_TRACE(subsys_eventname, TPPTOTO(int firstarg, struct task_struct *p), TPPROTO(int firstarg, struct task_struct *p), TPARGS(firstarg, p)); In subsys/file.c (where the tracing statement must be added) : Loading @@ -66,7 +66,7 @@ Where : - subsys is the name of your subsystem. - eventname is the name of the event to trace. - TPPTOTO(int firstarg, struct task_struct *p) is the prototype of the - TPPROTO(int firstarg, struct task_struct *p) is the prototype of the function called by this tracepoint. - TPARGS(firstarg, p) are the parameters names, same as found in the Loading arch/powerpc/kernel/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog ifdef CONFIG_DYNAMIC_FTRACE # dynamic ftrace setup. Loading arch/powerpc/kernel/entry_32.S +9 −31 Original line number Diff line number Diff line Loading @@ -1162,39 +1162,17 @@ machine_check_in_rtas: #ifdef CONFIG_DYNAMIC_FTRACE _GLOBAL(mcount) _GLOBAL(_mcount) stwu r1,-48(r1) stw r3, 12(r1) stw r4, 16(r1) stw r5, 20(r1) stw r6, 24(r1) mflr r3 stw r7, 28(r1) mfcr r5 stw r8, 32(r1) stw r9, 36(r1) stw r10,40(r1) stw r3, 44(r1) stw r5, 8(r1) subi r3, r3, MCOUNT_INSN_SIZE .globl mcount_call mcount_call: bl ftrace_stub nop lwz r6, 8(r1) lwz r0, 44(r1) lwz r3, 12(r1) /* * It is required that _mcount on PPC32 must preserve the * link register. But we have r0 to play with. We use r0 * to push the return address back to the caller of mcount * into the ctr register, restore the link register and * then jump back using the ctr register. */ mflr r0 mtctr r0 lwz r4, 16(r1) mtcr r6 lwz r5, 20(r1) lwz r6, 24(r1) lwz r0, 52(r1) lwz r7, 28(r1) lwz r8, 32(r1) lwz r0, 4(r1) mtlr r0 lwz r9, 36(r1) lwz r10,40(r1) addi r1, r1, 48 bctr _GLOBAL(ftrace_caller) Loading Loading
Documentation/ftrace.txt +6 −2 Original line number Diff line number Diff line Loading @@ -1251,7 +1251,11 @@ These are the only wild cards which are supported. <match>*<match> will not work. # echo hrtimer_* > /debug/tracing/set_ftrace_filter Note: It is better to use quotes to enclose the wild cards, otherwise the shell may expand the parameters into names of files in the local directory. # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter Produces: Loading Loading @@ -1306,7 +1310,7 @@ Again, now we want to append. # echo sys_nanosleep > /debug/tracing/set_ftrace_filter # cat /debug/tracing/set_ftrace_filter sys_nanosleep # echo hrtimer_* >> /debug/tracing/set_ftrace_filter # echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter # cat /debug/tracing/set_ftrace_filter hrtimer_run_queues hrtimer_run_pending Loading
Documentation/markers.txt +10 −5 Original line number Diff line number Diff line Loading @@ -51,11 +51,16 @@ to call) for the specific marker through marker_probe_register() and can be activated by calling marker_arm(). Marker deactivation can be done by calling marker_disarm() as many times as marker_arm() has been called. Removing a probe is done through marker_probe_unregister(); it will disarm the probe. marker_synchronize_unregister() must be called before the end of the module exit function to make sure there is no caller left using the probe. This, and the fact that preemption is disabled around the probe call, make sure that probe removal and module unload are safe. See the "Probe example" section below for a sample probe module. marker_synchronize_unregister() must be called between probe unregistration and the first occurrence of - the end of module exit function, to make sure there is no caller left using the probe; - the free of any resource used by the probes, to make sure the probes wont be accessing invalid data. This, and the fact that preemption is disabled around the probe call, make sure that probe removal and module unload are safe. See the "Probe example" section below for a sample probe module. The marker mechanism supports inserting multiple instances of the same marker. Markers can be put in inline functions, inlined static functions, and Loading
Documentation/tracepoints.txt +2 −2 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ In include/trace/subsys.h : #include <linux/tracepoint.h> DECLARE_TRACE(subsys_eventname, TPPTOTO(int firstarg, struct task_struct *p), TPPROTO(int firstarg, struct task_struct *p), TPARGS(firstarg, p)); In subsys/file.c (where the tracing statement must be added) : Loading @@ -66,7 +66,7 @@ Where : - subsys is the name of your subsystem. - eventname is the name of the event to trace. - TPPTOTO(int firstarg, struct task_struct *p) is the prototype of the - TPPROTO(int firstarg, struct task_struct *p) is the prototype of the function called by this tracepoint. - TPARGS(firstarg, p) are the parameters names, same as found in the Loading
arch/powerpc/kernel/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog ifdef CONFIG_DYNAMIC_FTRACE # dynamic ftrace setup. Loading
arch/powerpc/kernel/entry_32.S +9 −31 Original line number Diff line number Diff line Loading @@ -1162,39 +1162,17 @@ machine_check_in_rtas: #ifdef CONFIG_DYNAMIC_FTRACE _GLOBAL(mcount) _GLOBAL(_mcount) stwu r1,-48(r1) stw r3, 12(r1) stw r4, 16(r1) stw r5, 20(r1) stw r6, 24(r1) mflr r3 stw r7, 28(r1) mfcr r5 stw r8, 32(r1) stw r9, 36(r1) stw r10,40(r1) stw r3, 44(r1) stw r5, 8(r1) subi r3, r3, MCOUNT_INSN_SIZE .globl mcount_call mcount_call: bl ftrace_stub nop lwz r6, 8(r1) lwz r0, 44(r1) lwz r3, 12(r1) /* * It is required that _mcount on PPC32 must preserve the * link register. But we have r0 to play with. We use r0 * to push the return address back to the caller of mcount * into the ctr register, restore the link register and * then jump back using the ctr register. */ mflr r0 mtctr r0 lwz r4, 16(r1) mtcr r6 lwz r5, 20(r1) lwz r6, 24(r1) lwz r0, 52(r1) lwz r7, 28(r1) lwz r8, 32(r1) lwz r0, 4(r1) mtlr r0 lwz r9, 36(r1) lwz r10,40(r1) addi r1, r1, 48 bctr _GLOBAL(ftrace_caller) Loading