public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tracing/boot: Cleanup prototypes
@ 2020-01-29  9:36 Masami Hiramatsu
  2020-01-29  9:36 ` [PATCH 1/2] tracing/boot: Include required headers and sort it alphabetically Masami Hiramatsu
  2020-01-29  9:36 ` [PATCH 2/2] tracing/boot: Move external function declarations to kernel/trace/trace.h Masami Hiramatsu
  0 siblings, 2 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2020-01-29  9:36 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, Tom Zanussi, Thomas Gleixner, linux-kernel

Hi,

Here is a couple of patches to cleanup prototypes and includes
in boot time tracer.
I left 2 externs in trace_boot.c which will be removed by
Tom's in-kernel dynamic event API series.

Thank you,

---

Masami Hiramatsu (2):
      tracing/boot: Include required headers and sort it alphabetically
      tracing/boot: Move external function declarations to kernel/trace/trace.h


 kernel/trace/trace.h      |   17 +++++++++++++++++
 kernel/trace/trace_boot.c |   24 ++++++++----------------
 2 files changed, 25 insertions(+), 16 deletions(-)

--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] tracing/boot: Include required headers and sort it alphabetically
  2020-01-29  9:36 [PATCH 0/2] tracing/boot: Cleanup prototypes Masami Hiramatsu
@ 2020-01-29  9:36 ` Masami Hiramatsu
  2020-01-29  9:36 ` [PATCH 2/2] tracing/boot: Move external function declarations to kernel/trace/trace.h Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2020-01-29  9:36 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, Tom Zanussi, Thomas Gleixner, linux-kernel

Include some required (but currently indirectly included)
headers and sort it alphabetically.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 kernel/trace/trace_boot.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index 2f616cd926b0..5aad41961f03 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -6,9 +6,16 @@
 
 #define pr_fmt(fmt)	"trace_boot: " fmt
 
+#include <linux/bootconfig.h>
+#include <linux/cpumask.h>
 #include <linux/ftrace.h>
 #include <linux/init.h>
-#include <linux/bootconfig.h>
+#include <linux/kernel.h>
+#include <linux/mutex.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/trace.h>
+#include <linux/trace_events.h>
 
 #include "trace.h"
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] tracing/boot: Move external function declarations to kernel/trace/trace.h
  2020-01-29  9:36 [PATCH 0/2] tracing/boot: Cleanup prototypes Masami Hiramatsu
  2020-01-29  9:36 ` [PATCH 1/2] tracing/boot: Include required headers and sort it alphabetically Masami Hiramatsu
@ 2020-01-29  9:36 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2020-01-29  9:36 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, Tom Zanussi, Thomas Gleixner, linux-kernel

Move external function declarations into kernel/trace/trace.h
from trace_boot.c for tracing subsystem internal use.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 kernel/trace/trace.h      |   17 +++++++++++++++++
 kernel/trace/trace_boot.c |   15 ---------------
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 6bb64d89c321..b3075b637d14 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -1157,6 +1157,11 @@ int unregister_ftrace_command(struct ftrace_func_command *cmd);
 void ftrace_create_filter_files(struct ftrace_ops *ops,
 				struct dentry *parent);
 void ftrace_destroy_filter_files(struct ftrace_ops *ops);
+
+extern int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,
+			     int len, int reset);
+extern int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,
+			      int len, int reset);
 #else
 struct ftrace_func_command;
 
@@ -1905,6 +1910,15 @@ void trace_printk_start_comm(void);
 int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set);
 int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled);
 
+/* Used from boot time tracer */
+extern int trace_set_options(struct trace_array *tr, char *option);
+extern int tracing_set_tracer(struct trace_array *tr, const char *buf);
+extern ssize_t tracing_resize_ring_buffer(struct trace_array *tr,
+					  unsigned long size, int cpu_id);
+extern int tracing_set_cpumask(struct trace_array *tr,
+				cpumask_var_t tracing_cpumask_new);
+
+
 #define MAX_EVENT_NAME_LEN	64
 
 extern int trace_run_command(const char *buf, int (*createfn)(int, char**));
@@ -1964,6 +1978,9 @@ static inline const char *get_syscall_name(int syscall)
 #ifdef CONFIG_EVENT_TRACING
 void trace_event_init(void);
 void trace_event_eval_update(struct trace_eval_map **map, int len);
+/* Used from boot time tracer */
+extern int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
+extern int trigger_process_regex(struct trace_event_file *file, char *buff);
 #else
 static inline void __init trace_event_init(void) { }
 static inline void trace_event_eval_update(struct trace_eval_map **map, int len) { }
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index 5aad41961f03..4d37bf5c3742 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -21,13 +21,6 @@
 
 #define MAX_BUF_LEN 256
 
-extern int trace_set_options(struct trace_array *tr, char *option);
-extern int tracing_set_tracer(struct trace_array *tr, const char *buf);
-extern ssize_t tracing_resize_ring_buffer(struct trace_array *tr,
-					  unsigned long size, int cpu_id);
-extern int tracing_set_cpumask(struct trace_array *tr,
-				cpumask_var_t tracing_cpumask_new);
-
 static void __init
 trace_boot_set_instance_options(struct trace_array *tr, struct xbc_node *node)
 {
@@ -76,9 +69,6 @@ trace_boot_set_instance_options(struct trace_array *tr, struct xbc_node *node)
 }
 
 #ifdef CONFIG_EVENT_TRACING
-extern int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
-extern int trigger_process_regex(struct trace_event_file *file, char *buff);
-
 static void __init
 trace_boot_enable_events(struct trace_array *tr, struct xbc_node *node)
 {
@@ -252,11 +242,6 @@ trace_boot_init_events(struct trace_array *tr, struct xbc_node *node)
 #endif
 
 #ifdef CONFIG_DYNAMIC_FTRACE
-extern bool ftrace_filter_param __initdata;
-extern int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,
-			     int len, int reset);
-extern int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,
-			      int len, int reset);
 static void __init
 trace_boot_set_ftrace_filter(struct trace_array *tr, struct xbc_node *node)
 {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-29  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-29  9:36 [PATCH 0/2] tracing/boot: Cleanup prototypes Masami Hiramatsu
2020-01-29  9:36 ` [PATCH 1/2] tracing/boot: Include required headers and sort it alphabetically Masami Hiramatsu
2020-01-29  9:36 ` [PATCH 2/2] tracing/boot: Move external function declarations to kernel/trace/trace.h Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox