aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 6e735d4771f..7d5cc37b8fc 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -15,6 +15,10 @@
15#include <linux/trace_seq.h> 15#include <linux/trace_seq.h>
16#include <linux/ftrace_event.h> 16#include <linux/ftrace_event.h>
17 17
18#ifdef CONFIG_KSYM_TRACER
19#include <asm/hw_breakpoint.h>
20#endif
21
18enum trace_type { 22enum trace_type {
19 __TRACE_FIRST_TYPE = 0, 23 __TRACE_FIRST_TYPE = 0,
20 24
@@ -40,6 +44,7 @@ enum trace_type {
40 TRACE_KMEM_FREE, 44 TRACE_KMEM_FREE,
41 TRACE_POWER, 45 TRACE_POWER,
42 TRACE_BLK, 46 TRACE_BLK,
47 TRACE_KSYM,
43 48
44 __TRACE_LAST_TYPE, 49 __TRACE_LAST_TYPE,
45}; 50};
@@ -207,6 +212,21 @@ struct syscall_trace_exit {
207 unsigned long ret; 212 unsigned long ret;
208}; 213};
209 214
215#define KSYM_SELFTEST_ENTRY "ksym_selftest_dummy"
216extern int process_new_ksym_entry(char *ksymname, int op, unsigned long addr);
217
218struct trace_ksym {
219 struct trace_entry ent;
220 struct hw_breakpoint *ksym_hbp;
221 unsigned long ksym_addr;
222 unsigned long ip;
223#ifdef CONFIG_PROFILE_KSYM_TRACER
224 unsigned long counter;
225#endif
226 struct hlist_node ksym_hlist;
227 char ksym_name[KSYM_NAME_LEN];
228 char p_name[TASK_COMM_LEN];
229};
210 230
211/* 231/*
212 * trace_flag_type is an enumeration that holds different 232 * trace_flag_type is an enumeration that holds different
@@ -323,6 +343,7 @@ extern void __ftrace_bad_type(void);
323 TRACE_SYSCALL_ENTER); \ 343 TRACE_SYSCALL_ENTER); \
324 IF_ASSIGN(var, ent, struct syscall_trace_exit, \ 344 IF_ASSIGN(var, ent, struct syscall_trace_exit, \
325 TRACE_SYSCALL_EXIT); \ 345 TRACE_SYSCALL_EXIT); \
346 IF_ASSIGN(var, ent, struct trace_ksym, TRACE_KSYM); \
326 __ftrace_bad_type(); \ 347 __ftrace_bad_type(); \
327 } while (0) 348 } while (0)
328 349
@@ -540,6 +561,8 @@ extern int trace_selftest_startup_branch(struct tracer *trace,
540 struct trace_array *tr); 561 struct trace_array *tr);
541extern int trace_selftest_startup_hw_branches(struct tracer *trace, 562extern int trace_selftest_startup_hw_branches(struct tracer *trace,
542 struct trace_array *tr); 563 struct trace_array *tr);
564extern int trace_selftest_startup_ksym(struct tracer *trace,
565 struct trace_array *tr);
543#endif /* CONFIG_FTRACE_STARTUP_TEST */ 566#endif /* CONFIG_FTRACE_STARTUP_TEST */
544 567
545extern void *head_page(struct trace_array_cpu *data); 568extern void *head_page(struct trace_array_cpu *data);