aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace_event.h10
-rw-r--r--include/linux/kprobes.h4
-rw-r--r--include/linux/nmi.h4
-rw-r--r--include/linux/perf_event.h26
-rw-r--r--include/linux/sched.h4
-rw-r--r--include/linux/stacktrace.h4
-rw-r--r--include/linux/syscalls.h10
-rw-r--r--include/linux/tracepoint.h4
-rw-r--r--include/trace/events/syscalls.h4
-rw-r--r--include/trace/ftrace.h7
10 files changed, 63 insertions, 14 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 8beabb958f61..725bf6bd39f7 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -154,12 +154,14 @@ enum {
154 TRACE_EVENT_FL_ENABLED_BIT, 154 TRACE_EVENT_FL_ENABLED_BIT,
155 TRACE_EVENT_FL_FILTERED_BIT, 155 TRACE_EVENT_FL_FILTERED_BIT,
156 TRACE_EVENT_FL_RECORDED_CMD_BIT, 156 TRACE_EVENT_FL_RECORDED_CMD_BIT,
157 TRACE_EVENT_FL_CAP_ANY_BIT,
157}; 158};
158 159
159enum { 160enum {
160 TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), 161 TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT),
161 TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), 162 TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT),
162 TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), 163 TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT),
164 TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT),
163}; 165};
164 166
165struct ftrace_event_call { 167struct ftrace_event_call {
@@ -196,6 +198,14 @@ struct ftrace_event_call {
196#endif 198#endif
197}; 199};
198 200
201#define __TRACE_EVENT_FLAGS(name, value) \
202 static int __init trace_init_flags_##name(void) \
203 { \
204 event_##name.flags = value; \
205 return 0; \
206 } \
207 early_initcall(trace_init_flags_##name);
208
199#define PERF_MAX_TRACE_SIZE 2048 209#define PERF_MAX_TRACE_SIZE 2048
200 210
201#define MAX_FILTER_PRED 32 211#define MAX_FILTER_PRED 32
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index e7d1b2e0070d..b78edb58ee66 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -275,7 +275,9 @@ extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn);
275extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); 275extern int arch_check_optimized_kprobe(struct optimized_kprobe *op);
276extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); 276extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op);
277extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); 277extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op);
278extern int arch_optimize_kprobe(struct optimized_kprobe *op); 278extern void arch_optimize_kprobes(struct list_head *oplist);
279extern void arch_unoptimize_kprobes(struct list_head *oplist,
280 struct list_head *done_list);
279extern void arch_unoptimize_kprobe(struct optimized_kprobe *op); 281extern void arch_unoptimize_kprobe(struct optimized_kprobe *op);
280extern kprobe_opcode_t *get_optinsn_slot(void); 282extern kprobe_opcode_t *get_optinsn_slot(void);
281extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty); 283extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty);
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 06aab5eee134..17ccf44e7dcb 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -17,8 +17,6 @@
17#ifdef ARCH_HAS_NMI_WATCHDOG 17#ifdef ARCH_HAS_NMI_WATCHDOG
18#include <asm/nmi.h> 18#include <asm/nmi.h>
19extern void touch_nmi_watchdog(void); 19extern void touch_nmi_watchdog(void);
20extern void acpi_nmi_disable(void);
21extern void acpi_nmi_enable(void);
22#else 20#else
23#ifndef CONFIG_HARDLOCKUP_DETECTOR 21#ifndef CONFIG_HARDLOCKUP_DETECTOR
24static inline void touch_nmi_watchdog(void) 22static inline void touch_nmi_watchdog(void)
@@ -28,8 +26,6 @@ static inline void touch_nmi_watchdog(void)
28#else 26#else
29extern void touch_nmi_watchdog(void); 27extern void touch_nmi_watchdog(void);
30#endif 28#endif
31static inline void acpi_nmi_disable(void) { }
32static inline void acpi_nmi_enable(void) { }
33#endif 29#endif
34 30
35/* 31/*
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 4f1279e105ee..dda5b0a3ff60 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -215,8 +215,9 @@ struct perf_event_attr {
215 */ 215 */
216 precise_ip : 2, /* skid constraint */ 216 precise_ip : 2, /* skid constraint */
217 mmap_data : 1, /* non-exec mmap data */ 217 mmap_data : 1, /* non-exec mmap data */
218 sample_id_all : 1, /* sample_type all events */
218 219
219 __reserved_1 : 46; 220 __reserved_1 : 45;
220 221
221 union { 222 union {
222 __u32 wakeup_events; /* wakeup every n events */ 223 __u32 wakeup_events; /* wakeup every n events */
@@ -327,6 +328,15 @@ struct perf_event_header {
327enum perf_event_type { 328enum perf_event_type {
328 329
329 /* 330 /*
331 * If perf_event_attr.sample_id_all is set then all event types will
332 * have the sample_type selected fields related to where/when
333 * (identity) an event took place (TID, TIME, ID, CPU, STREAM_ID)
334 * described in PERF_RECORD_SAMPLE below, it will be stashed just after
335 * the perf_event_header and the fields already present for the existing
336 * fields, i.e. at the end of the payload. That way a newer perf.data
337 * file will be supported by older perf tools, with these new optional
338 * fields being ignored.
339 *
330 * The MMAP events record the PROT_EXEC mappings so that we can 340 * The MMAP events record the PROT_EXEC mappings so that we can
331 * correlate userspace IPs to code. They have the following structure: 341 * correlate userspace IPs to code. They have the following structure:
332 * 342 *
@@ -578,6 +588,10 @@ struct perf_event;
578struct pmu { 588struct pmu {
579 struct list_head entry; 589 struct list_head entry;
580 590
591 struct device *dev;
592 char *name;
593 int type;
594
581 int * __percpu pmu_disable_count; 595 int * __percpu pmu_disable_count;
582 struct perf_cpu_context * __percpu pmu_cpu_context; 596 struct perf_cpu_context * __percpu pmu_cpu_context;
583 int task_ctx_nr; 597 int task_ctx_nr;
@@ -758,6 +772,9 @@ struct perf_event {
758 u64 shadow_ctx_time; 772 u64 shadow_ctx_time;
759 773
760 struct perf_event_attr attr; 774 struct perf_event_attr attr;
775 u16 header_size;
776 u16 id_header_size;
777 u16 read_size;
761 struct hw_perf_event hw; 778 struct hw_perf_event hw;
762 779
763 struct perf_event_context *ctx; 780 struct perf_event_context *ctx;
@@ -903,7 +920,7 @@ struct perf_output_handle {
903 920
904#ifdef CONFIG_PERF_EVENTS 921#ifdef CONFIG_PERF_EVENTS
905 922
906extern int perf_pmu_register(struct pmu *pmu); 923extern int perf_pmu_register(struct pmu *pmu, char *name, int type);
907extern void perf_pmu_unregister(struct pmu *pmu); 924extern void perf_pmu_unregister(struct pmu *pmu);
908 925
909extern int perf_num_counters(void); 926extern int perf_num_counters(void);
@@ -970,6 +987,11 @@ extern int perf_event_overflow(struct perf_event *event, int nmi,
970 struct perf_sample_data *data, 987 struct perf_sample_data *data,
971 struct pt_regs *regs); 988 struct pt_regs *regs);
972 989
990static inline bool is_sampling_event(struct perf_event *event)
991{
992 return event->attr.sample_period != 0;
993}
994
973/* 995/*
974 * Return 1 for a software event, 0 for a hardware event 996 * Return 1 for a software event, 0 for a hardware event
975 */ 997 */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 223874538b33..a99d735db3df 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -316,6 +316,7 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
316 size_t *lenp, loff_t *ppos); 316 size_t *lenp, loff_t *ppos);
317extern unsigned int softlockup_panic; 317extern unsigned int softlockup_panic;
318extern int softlockup_thresh; 318extern int softlockup_thresh;
319void lockup_detector_init(void);
319#else 320#else
320static inline void touch_softlockup_watchdog(void) 321static inline void touch_softlockup_watchdog(void)
321{ 322{
@@ -326,6 +327,9 @@ static inline void touch_softlockup_watchdog_sync(void)
326static inline void touch_all_softlockup_watchdogs(void) 327static inline void touch_all_softlockup_watchdogs(void)
327{ 328{
328} 329}
330static inline void lockup_detector_init(void)
331{
332}
329#endif 333#endif
330 334
331#ifdef CONFIG_DETECT_HUNG_TASK 335#ifdef CONFIG_DETECT_HUNG_TASK
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h
index 51efbef38fb0..25310f1d7f37 100644
--- a/include/linux/stacktrace.h
+++ b/include/linux/stacktrace.h
@@ -2,6 +2,7 @@
2#define __LINUX_STACKTRACE_H 2#define __LINUX_STACKTRACE_H
3 3
4struct task_struct; 4struct task_struct;
5struct pt_regs;
5 6
6#ifdef CONFIG_STACKTRACE 7#ifdef CONFIG_STACKTRACE
7struct task_struct; 8struct task_struct;
@@ -13,7 +14,8 @@ struct stack_trace {
13}; 14};
14 15
15extern void save_stack_trace(struct stack_trace *trace); 16extern void save_stack_trace(struct stack_trace *trace);
16extern void save_stack_trace_bp(struct stack_trace *trace, unsigned long bp); 17extern void save_stack_trace_regs(struct stack_trace *trace,
18 struct pt_regs *regs);
17extern void save_stack_trace_tsk(struct task_struct *tsk, 19extern void save_stack_trace_tsk(struct task_struct *tsk,
18 struct stack_trace *trace); 20 struct stack_trace *trace);
19 21
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index cacc27a0e285..18cd0684fc4e 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -127,8 +127,6 @@ extern struct trace_event_functions exit_syscall_print_funcs;
127#define SYSCALL_TRACE_ENTER_EVENT(sname) \ 127#define SYSCALL_TRACE_ENTER_EVENT(sname) \
128 static struct syscall_metadata \ 128 static struct syscall_metadata \
129 __attribute__((__aligned__(4))) __syscall_meta_##sname; \ 129 __attribute__((__aligned__(4))) __syscall_meta_##sname; \
130 static struct ftrace_event_call \
131 __attribute__((__aligned__(4))) event_enter_##sname; \
132 static struct ftrace_event_call __used \ 130 static struct ftrace_event_call __used \
133 __attribute__((__aligned__(4))) \ 131 __attribute__((__aligned__(4))) \
134 __attribute__((section("_ftrace_events"))) \ 132 __attribute__((section("_ftrace_events"))) \
@@ -137,13 +135,12 @@ extern struct trace_event_functions exit_syscall_print_funcs;
137 .class = &event_class_syscall_enter, \ 135 .class = &event_class_syscall_enter, \
138 .event.funcs = &enter_syscall_print_funcs, \ 136 .event.funcs = &enter_syscall_print_funcs, \
139 .data = (void *)&__syscall_meta_##sname,\ 137 .data = (void *)&__syscall_meta_##sname,\
140 } 138 }; \
139 __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
141 140
142#define SYSCALL_TRACE_EXIT_EVENT(sname) \ 141#define SYSCALL_TRACE_EXIT_EVENT(sname) \
143 static struct syscall_metadata \ 142 static struct syscall_metadata \
144 __attribute__((__aligned__(4))) __syscall_meta_##sname; \ 143 __attribute__((__aligned__(4))) __syscall_meta_##sname; \
145 static struct ftrace_event_call \
146 __attribute__((__aligned__(4))) event_exit_##sname; \
147 static struct ftrace_event_call __used \ 144 static struct ftrace_event_call __used \
148 __attribute__((__aligned__(4))) \ 145 __attribute__((__aligned__(4))) \
149 __attribute__((section("_ftrace_events"))) \ 146 __attribute__((section("_ftrace_events"))) \
@@ -152,7 +149,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
152 .class = &event_class_syscall_exit, \ 149 .class = &event_class_syscall_exit, \
153 .event.funcs = &exit_syscall_print_funcs, \ 150 .event.funcs = &exit_syscall_print_funcs, \
154 .data = (void *)&__syscall_meta_##sname,\ 151 .data = (void *)&__syscall_meta_##sname,\
155 } 152 }; \
153 __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
156 154
157#define SYSCALL_METADATA(sname, nb) \ 155#define SYSCALL_METADATA(sname, nb) \
158 SYSCALL_TRACE_ENTER_EVENT(sname); \ 156 SYSCALL_TRACE_ENTER_EVENT(sname); \
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index a4a90b6726ce..5a6074fcd81d 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -234,6 +234,8 @@ do_trace: \
234 PARAMS(void *__data, proto), \ 234 PARAMS(void *__data, proto), \
235 PARAMS(__data, args)) 235 PARAMS(__data, args))
236 236
237#define TRACE_EVENT_FLAGS(event, flag)
238
237#endif /* DECLARE_TRACE */ 239#endif /* DECLARE_TRACE */
238 240
239#ifndef TRACE_EVENT 241#ifndef TRACE_EVENT
@@ -354,4 +356,6 @@ do_trace: \
354 assign, print, reg, unreg) \ 356 assign, print, reg, unreg) \
355 DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) 357 DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
356 358
359#define TRACE_EVENT_FLAGS(event, flag)
360
357#endif /* ifdef TRACE_EVENT (see note above) */ 361#endif /* ifdef TRACE_EVENT (see note above) */
diff --git a/include/trace/events/syscalls.h b/include/trace/events/syscalls.h
index fb726ac7caee..5a4c04a75b3d 100644
--- a/include/trace/events/syscalls.h
+++ b/include/trace/events/syscalls.h
@@ -40,6 +40,8 @@ TRACE_EVENT_FN(sys_enter,
40 syscall_regfunc, syscall_unregfunc 40 syscall_regfunc, syscall_unregfunc
41); 41);
42 42
43TRACE_EVENT_FLAGS(sys_enter, TRACE_EVENT_FL_CAP_ANY)
44
43TRACE_EVENT_FN(sys_exit, 45TRACE_EVENT_FN(sys_exit,
44 46
45 TP_PROTO(struct pt_regs *regs, long ret), 47 TP_PROTO(struct pt_regs *regs, long ret),
@@ -62,6 +64,8 @@ TRACE_EVENT_FN(sys_exit,
62 syscall_regfunc, syscall_unregfunc 64 syscall_regfunc, syscall_unregfunc
63); 65);
64 66
67TRACE_EVENT_FLAGS(sys_exit, TRACE_EVENT_FL_CAP_ANY)
68
65#endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */ 69#endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */
66 70
67#endif /* _TRACE_EVENTS_SYSCALLS_H */ 71#endif /* _TRACE_EVENTS_SYSCALLS_H */
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index a9377c0083ad..e718a917d897 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -82,6 +82,10 @@
82 TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \ 82 TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \
83 PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \ 83 PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \
84 84
85#undef TRACE_EVENT_FLAGS
86#define TRACE_EVENT_FLAGS(name, value) \
87 __TRACE_EVENT_FLAGS(name, value)
88
85#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 89#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
86 90
87 91
@@ -129,6 +133,9 @@
129#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ 133#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
130 DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args)) 134 DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
131 135
136#undef TRACE_EVENT_FLAGS
137#define TRACE_EVENT_FLAGS(event, flag)
138
132#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 139#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
133 140
134/* 141/*