hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/trace.h
....@@ -3,6 +3,11 @@
33 #define _LINUX_TRACE_H
44
55 #ifdef CONFIG_TRACING
6
+
7
+#define TRACE_EXPORT_FUNCTION BIT(0)
8
+#define TRACE_EXPORT_EVENT BIT(1)
9
+#define TRACE_EXPORT_MARKER BIT(2)
10
+
611 /*
712 * The trace export - an export of Ftrace output. The trace_export
813 * can process traces and export them to a registered destination as
....@@ -15,15 +20,26 @@
1520 * next - pointer to the next trace_export
1621 * write - copy traces which have been delt with ->commit() to
1722 * the destination
23
+ * flags - which ftrace to be exported
1824 */
1925 struct trace_export {
2026 struct trace_export __rcu *next;
2127 void (*write)(struct trace_export *, const void *, unsigned int);
28
+ int flags;
2229 };
2330
2431 int register_ftrace_export(struct trace_export *export);
2532 int unregister_ftrace_export(struct trace_export *export);
2633
34
+struct trace_array;
35
+
36
+void trace_printk_init_buffers(void);
37
+int trace_array_printk(struct trace_array *tr, unsigned long ip,
38
+ const char *fmt, ...);
39
+int trace_array_init_printk(struct trace_array *tr);
40
+void trace_array_put(struct trace_array *tr);
41
+struct trace_array *trace_array_get_by_name(const char *name);
42
+int trace_array_destroy(struct trace_array *tr);
2743 #endif /* CONFIG_TRACING */
2844
2945 #endif /* _LINUX_TRACE_H */