aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_event.c4
-rw-r--r--kernel/trace/Makefile4
-rw-r--r--kernel/trace/trace_events_filter.c4
-rw-r--r--kernel/trace/trace_kprobe.c14
-rw-r--r--kernel/trace/trace_syscalls.c5
5 files changed, 16 insertions, 15 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 099bd662daa6..5b987b4a98a8 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4177,7 +4177,7 @@ static const struct pmu perf_ops_task_clock = {
4177 .read = task_clock_perf_event_read, 4177 .read = task_clock_perf_event_read,
4178}; 4178};
4179 4179
4180#ifdef CONFIG_EVENT_PROFILE 4180#ifdef CONFIG_EVENT_TRACING
4181 4181
4182void perf_tp_event(int event_id, u64 addr, u64 count, void *record, 4182void perf_tp_event(int event_id, u64 addr, u64 count, void *record,
4183 int entry_size) 4183 int entry_size)
@@ -4282,7 +4282,7 @@ static void perf_event_free_filter(struct perf_event *event)
4282{ 4282{
4283} 4283}
4284 4284
4285#endif /* CONFIG_EVENT_PROFILE */ 4285#endif /* CONFIG_EVENT_TRACING */
4286 4286
4287#ifdef CONFIG_HAVE_HW_BREAKPOINT 4287#ifdef CONFIG_HAVE_HW_BREAKPOINT
4288static void bp_perf_event_destroy(struct perf_event *event) 4288static void bp_perf_event_destroy(struct perf_event *event)
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index cd9ecd89ec77..d00c6fe23f54 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -51,7 +51,9 @@ endif
51obj-$(CONFIG_EVENT_TRACING) += trace_events.o 51obj-$(CONFIG_EVENT_TRACING) += trace_events.o
52obj-$(CONFIG_EVENT_TRACING) += trace_export.o 52obj-$(CONFIG_EVENT_TRACING) += trace_export.o
53obj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o 53obj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o
54obj-$(CONFIG_EVENT_PROFILE) += trace_event_profile.o 54ifeq ($(CONFIG_PERF_EVENTS),y)
55obj-$(CONFIG_EVENT_TRACING) += trace_event_profile.o
56endif
55obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o 57obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o
56obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o 58obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o
57obj-$(CONFIG_KSYM_TRACER) += trace_ksym.o 59obj-$(CONFIG_KSYM_TRACER) += trace_ksym.o
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 50504cb228de..74563d7e102e 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1360,7 +1360,7 @@ out_unlock:
1360 return err; 1360 return err;
1361} 1361}
1362 1362
1363#ifdef CONFIG_EVENT_PROFILE 1363#ifdef CONFIG_PERF_EVENTS
1364 1364
1365void ftrace_profile_free_filter(struct perf_event *event) 1365void ftrace_profile_free_filter(struct perf_event *event)
1366{ 1366{
@@ -1428,5 +1428,5 @@ out_unlock:
1428 return err; 1428 return err;
1429} 1429}
1430 1430
1431#endif /* CONFIG_EVENT_PROFILE */ 1431#endif /* CONFIG_PERF_EVENTS */
1432 1432
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 375f81a568dc..75d75dec226a 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1249,7 +1249,7 @@ static int kretprobe_event_show_format(struct ftrace_event_call *call,
1249 ", REC->" FIELD_STRING_RETIP); 1249 ", REC->" FIELD_STRING_RETIP);
1250} 1250}
1251 1251
1252#ifdef CONFIG_EVENT_PROFILE 1252#ifdef CONFIG_PERF_EVENTS
1253 1253
1254/* Kprobe profile handler */ 1254/* Kprobe profile handler */
1255static __kprobes int kprobe_profile_func(struct kprobe *kp, 1255static __kprobes int kprobe_profile_func(struct kprobe *kp,
@@ -1407,7 +1407,7 @@ static void probe_profile_disable(struct ftrace_event_call *call)
1407 disable_kprobe(&tp->rp.kp); 1407 disable_kprobe(&tp->rp.kp);
1408 } 1408 }
1409} 1409}
1410#endif /* CONFIG_EVENT_PROFILE */ 1410#endif /* CONFIG_PERF_EVENTS */
1411 1411
1412 1412
1413static __kprobes 1413static __kprobes
@@ -1417,10 +1417,10 @@ int kprobe_dispatcher(struct kprobe *kp, struct pt_regs *regs)
1417 1417
1418 if (tp->flags & TP_FLAG_TRACE) 1418 if (tp->flags & TP_FLAG_TRACE)
1419 kprobe_trace_func(kp, regs); 1419 kprobe_trace_func(kp, regs);
1420#ifdef CONFIG_EVENT_PROFILE 1420#ifdef CONFIG_PERF_EVENTS
1421 if (tp->flags & TP_FLAG_PROFILE) 1421 if (tp->flags & TP_FLAG_PROFILE)
1422 kprobe_profile_func(kp, regs); 1422 kprobe_profile_func(kp, regs);
1423#endif /* CONFIG_EVENT_PROFILE */ 1423#endif
1424 return 0; /* We don't tweek kernel, so just return 0 */ 1424 return 0; /* We don't tweek kernel, so just return 0 */
1425} 1425}
1426 1426
@@ -1431,10 +1431,10 @@ int kretprobe_dispatcher(struct kretprobe_instance *ri, struct pt_regs *regs)
1431 1431
1432 if (tp->flags & TP_FLAG_TRACE) 1432 if (tp->flags & TP_FLAG_TRACE)
1433 kretprobe_trace_func(ri, regs); 1433 kretprobe_trace_func(ri, regs);
1434#ifdef CONFIG_EVENT_PROFILE 1434#ifdef CONFIG_PERF_EVENTS
1435 if (tp->flags & TP_FLAG_PROFILE) 1435 if (tp->flags & TP_FLAG_PROFILE)
1436 kretprobe_profile_func(ri, regs); 1436 kretprobe_profile_func(ri, regs);
1437#endif /* CONFIG_EVENT_PROFILE */ 1437#endif
1438 return 0; /* We don't tweek kernel, so just return 0 */ 1438 return 0; /* We don't tweek kernel, so just return 0 */
1439} 1439}
1440 1440
@@ -1463,7 +1463,7 @@ static int register_probe_event(struct trace_probe *tp)
1463 call->regfunc = probe_event_enable; 1463 call->regfunc = probe_event_enable;
1464 call->unregfunc = probe_event_disable; 1464 call->unregfunc = probe_event_disable;
1465 1465
1466#ifdef CONFIG_EVENT_PROFILE 1466#ifdef CONFIG_PERF_EVENTS
1467 call->profile_enable = probe_profile_enable; 1467 call->profile_enable = probe_profile_enable;
1468 call->profile_disable = probe_profile_disable; 1468 call->profile_disable = probe_profile_disable;
1469#endif 1469#endif
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 75289f372dd2..f694f66d75b0 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -421,7 +421,7 @@ int __init init_ftrace_syscalls(void)
421} 421}
422core_initcall(init_ftrace_syscalls); 422core_initcall(init_ftrace_syscalls);
423 423
424#ifdef CONFIG_EVENT_PROFILE 424#ifdef CONFIG_PERF_EVENTS
425 425
426static DECLARE_BITMAP(enabled_prof_enter_syscalls, NR_syscalls); 426static DECLARE_BITMAP(enabled_prof_enter_syscalls, NR_syscalls);
427static DECLARE_BITMAP(enabled_prof_exit_syscalls, NR_syscalls); 427static DECLARE_BITMAP(enabled_prof_exit_syscalls, NR_syscalls);
@@ -626,6 +626,5 @@ void prof_sysexit_disable(struct ftrace_event_call *call)
626 mutex_unlock(&syscall_trace_lock); 626 mutex_unlock(&syscall_trace_lock);
627} 627}
628 628
629#endif 629#endif /* CONFIG_PERF_EVENTS */
630
631 630