diff options
author | Jerry Snitselaar <jsnitsel@redhat.com> | 2015-04-30 11:10:24 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-05-12 15:56:57 -0400 |
commit | 7e255d346c12888f7cce4b89a03a5fe5e9196ab1 (patch) | |
tree | b87449fa2978ae7d1975b566e1936784a57cd36b | |
parent | 755a27e7e4c817dd51ade41668b380f26026899c (diff) |
tracing: Export tracing clock functions
Critical tracepoint hooks should never call anything that takes a lock,
so they are unable to call getrawmonotonic() or ktime_get().
Export the rest of the tracing clock functions so can be used in
tracepoint hooks.
Background: We have a customer that adds their own module and registers
a tracepoint hook to sched_wakeup. They were using ktime_get() for a
time source, but it grabs a seq lock and caused a deadlock to occur.
Link: http://lkml.kernel.org/r/1430406624-22609-1-git-send-email-jsnitsel@redhat.com
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | kernel/trace/trace_clock.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c index 57b67b1f24d1..0f06532a755b 100644 --- a/kernel/trace/trace_clock.c +++ b/kernel/trace/trace_clock.c | |||
@@ -56,6 +56,7 @@ u64 notrace trace_clock(void) | |||
56 | { | 56 | { |
57 | return local_clock(); | 57 | return local_clock(); |
58 | } | 58 | } |
59 | EXPORT_SYMBOL_GPL(trace_clock); | ||
59 | 60 | ||
60 | /* | 61 | /* |
61 | * trace_jiffy_clock(): Simply use jiffies as a clock counter. | 62 | * trace_jiffy_clock(): Simply use jiffies as a clock counter. |
@@ -68,6 +69,7 @@ u64 notrace trace_clock_jiffies(void) | |||
68 | { | 69 | { |
69 | return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES); | 70 | return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES); |
70 | } | 71 | } |
72 | EXPORT_SYMBOL_GPL(trace_clock_jiffies); | ||
71 | 73 | ||
72 | /* | 74 | /* |
73 | * trace_clock_global(): special globally coherent trace clock | 75 | * trace_clock_global(): special globally coherent trace clock |
@@ -123,6 +125,7 @@ u64 notrace trace_clock_global(void) | |||
123 | 125 | ||
124 | return now; | 126 | return now; |
125 | } | 127 | } |
128 | EXPORT_SYMBOL_GPL(trace_clock_global); | ||
126 | 129 | ||
127 | static atomic64_t trace_counter; | 130 | static atomic64_t trace_counter; |
128 | 131 | ||