41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From: Tom Zanussi <tom.zanussi@linux.intel.com>
|
|
Date: Mon, 26 Jun 2017 17:49:32 -0500
|
|
Subject: [PATCH 31/32] tracing: Make tracing_set_clock() non-static
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.11/older/patches-4.11.9-rt7.tar.xz
|
|
|
|
Allow tracing code outside of trace.c to access tracing_set_clock().
|
|
|
|
Some applications may require a particular clock in order to function
|
|
properly, such as latency calculations.
|
|
|
|
Also, add an accessor returning the current clock string.
|
|
|
|
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
---
|
|
kernel/trace/trace.c | 2 +-
|
|
kernel/trace/trace.h | 1 +
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- a/kernel/trace/trace.c
|
|
+++ b/kernel/trace/trace.c
|
|
@@ -5887,7 +5887,7 @@ static int tracing_clock_show(struct seq
|
|
return 0;
|
|
}
|
|
|
|
-static int tracing_set_clock(struct trace_array *tr, const char *clockstr)
|
|
+int tracing_set_clock(struct trace_array *tr, const char *clockstr)
|
|
{
|
|
int i;
|
|
|
|
--- a/kernel/trace/trace.h
|
|
+++ b/kernel/trace/trace.h
|
|
@@ -279,6 +279,7 @@ extern int trace_array_get(struct trace_
|
|
extern void trace_array_put(struct trace_array *tr);
|
|
|
|
extern int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs);
|
|
+extern int tracing_set_clock(struct trace_array *tr, const char *clockstr);
|
|
|
|
extern bool trace_clock_in_ns(struct trace_array *tr);
|
|
|