aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 14:50:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 14:50:00 -0400
commitb8c0aa46b3e86083721b57ed2eec6bd2c29ebfba (patch)
tree45e349bf8a14aa99279d323fdc515e849fd349f3 /arch/sh
parentc7ed326fa7cafb83ced5a8b02517a61672fe9e90 (diff)
parentdc6f03f26f570104a2bb03f9d1deb588026d7c75 (diff)
Merge tag 'trace-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "This pull request has a lot of work done. The main thing is the changes to the ftrace function callback infrastructure. It's introducing a way to allow different functions to call directly different trampolines instead of all calling the same "mcount" one. The only user of this for now is the function graph tracer, which always had a different trampoline, but the function tracer trampoline was called and did basically nothing, and then the function graph tracer trampoline was called. The difference now, is that the function graph tracer trampoline can be called directly if a function is only being traced by the function graph trampoline. If function tracing is also happening on the same function, the old way is still done. The accounting for this takes up more memory when function graph tracing is activated, as it needs to keep track of which functions it uses. I have a new way that wont take as much memory, but it's not ready yet for this merge window, and will have to wait for the next one. Another big change was the removal of the ftrace_start/stop() calls that were used by the suspend/resume code that stopped function tracing when entering into suspend and resume paths. The stop of ftrace was done because there was some function that would crash the system if one called smp_processor_id()! The stop/start was a big hammer to solve the issue at the time, which was when ftrace was first introduced into Linux. Now ftrace has better infrastructure to debug such issues, and I found the problem function and labeled it with "notrace" and function tracing can now safely be activated all the way down into the guts of suspend and resume Other changes include clean ups of uprobe code, clean up of the trace_seq() code, and other various small fixes and clean ups to ftrace and tracing" * tag 'trace-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (57 commits) ftrace: Add warning if tramp hash does not match nr_trampolines ftrace: Fix trampoline hash update check on rec->flags ring-buffer: Use rb_page_size() instead of open coded head_page size ftrace: Rename ftrace_ops field from trampolines to nr_trampolines tracing: Convert local function_graph functions to static ftrace: Do not copy old hash when resetting tracing: let user specify tracing_thresh after selecting function_graph ring-buffer: Always run per-cpu ring buffer resize with schedule_work_on() tracing: Remove function_trace_stop and HAVE_FUNCTION_TRACE_MCOUNT_TEST s390/ftrace: remove check of obsolete variable function_trace_stop arm64, ftrace: Remove check of obsolete variable function_trace_stop Blackfin: ftrace: Remove check of obsolete variable function_trace_stop metag: ftrace: Remove check of obsolete variable function_trace_stop microblaze: ftrace: Remove check of obsolete variable function_trace_stop MIPS: ftrace: Remove check of obsolete variable function_trace_stop parisc: ftrace: Remove check of obsolete variable function_trace_stop sh: ftrace: Remove check of obsolete variable function_trace_stop sparc64,ftrace: Remove check of obsolete variable function_trace_stop tile: ftrace: Remove check of obsolete variable function_trace_stop ftrace: x86: Remove check of obsolete variable function_trace_stop ...
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sh/kernel/ftrace.c3
-rw-r--r--arch/sh/lib/mcount.S24
3 files changed, 5 insertions, 23 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 834b67c4db5a..aa2df3eaeb29 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -57,7 +57,6 @@ config SUPERH32
57 select HAVE_FUNCTION_TRACER 57 select HAVE_FUNCTION_TRACER
58 select HAVE_FTRACE_MCOUNT_RECORD 58 select HAVE_FTRACE_MCOUNT_RECORD
59 select HAVE_DYNAMIC_FTRACE 59 select HAVE_DYNAMIC_FTRACE
60 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
61 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE 60 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
62 select ARCH_WANT_IPC_PARSE_VERSION 61 select ARCH_WANT_IPC_PARSE_VERSION
63 select HAVE_FUNCTION_GRAPH_TRACER 62 select HAVE_FUNCTION_GRAPH_TRACER
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 3c74f53db6db..079d70e6d74b 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -344,6 +344,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
344 struct ftrace_graph_ent trace; 344 struct ftrace_graph_ent trace;
345 unsigned long return_hooker = (unsigned long)&return_to_handler; 345 unsigned long return_hooker = (unsigned long)&return_to_handler;
346 346
347 if (unlikely(ftrace_graph_is_dead()))
348 return;
349
347 if (unlikely(atomic_read(&current->tracing_graph_pause))) 350 if (unlikely(atomic_read(&current->tracing_graph_pause)))
348 return; 351 return;
349 352
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S
index 52aa2011d753..7a8572f9d58b 100644
--- a/arch/sh/lib/mcount.S
+++ b/arch/sh/lib/mcount.S
@@ -92,13 +92,6 @@ mcount:
92 rts 92 rts
93 nop 93 nop
94#else 94#else
95#ifndef CONFIG_DYNAMIC_FTRACE
96 mov.l .Lfunction_trace_stop, r0
97 mov.l @r0, r0
98 tst r0, r0
99 bf ftrace_stub
100#endif
101
102 MCOUNT_ENTER() 95 MCOUNT_ENTER()
103 96
104#ifdef CONFIG_DYNAMIC_FTRACE 97#ifdef CONFIG_DYNAMIC_FTRACE
@@ -174,11 +167,6 @@ ftrace_graph_call:
174 167
175 .globl ftrace_caller 168 .globl ftrace_caller
176ftrace_caller: 169ftrace_caller:
177 mov.l .Lfunction_trace_stop, r0
178 mov.l @r0, r0
179 tst r0, r0
180 bf ftrace_stub
181
182 MCOUNT_ENTER() 170 MCOUNT_ENTER()
183 171
184 .globl ftrace_call 172 .globl ftrace_call
@@ -196,8 +184,6 @@ ftrace_call:
196#endif /* CONFIG_DYNAMIC_FTRACE */ 184#endif /* CONFIG_DYNAMIC_FTRACE */
197 185
198 .align 2 186 .align 2
199.Lfunction_trace_stop:
200 .long function_trace_stop
201 187
202/* 188/*
203 * NOTE: From here on the locations of the .Lftrace_stub label and 189 * NOTE: From here on the locations of the .Lftrace_stub label and
@@ -217,12 +203,7 @@ ftrace_stub:
217#ifdef CONFIG_FUNCTION_GRAPH_TRACER 203#ifdef CONFIG_FUNCTION_GRAPH_TRACER
218 .globl ftrace_graph_caller 204 .globl ftrace_graph_caller
219ftrace_graph_caller: 205ftrace_graph_caller:
220 mov.l 2f, r0 206 mov.l 2f, r1
221 mov.l @r0, r0
222 tst r0, r0
223 bt 1f
224
225 mov.l 3f, r1
226 jmp @r1 207 jmp @r1
227 nop 208 nop
2281: 2091:
@@ -242,8 +223,7 @@ ftrace_graph_caller:
242 MCOUNT_LEAVE() 223 MCOUNT_LEAVE()
243 224
244 .align 2 225 .align 2
2452: .long function_trace_stop 2262: .long skip_trace
2463: .long skip_trace
247.Lprepare_ftrace_return: 227.Lprepare_ftrace_return:
248 .long prepare_ftrace_return 228 .long prepare_ftrace_return
249 229