diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-01-24 07:39:31 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-01-24 07:39:31 -0500 |
commit | 4913ae3991acf00b414701852ee2193d1edd9c2d (patch) | |
tree | b079652f0a897f86c5ecc16b2d4ba4bc3fefd220 /include | |
parent | ff7532ca2c631e7e96dcd305a967b610259dc0ea (diff) | |
parent | 0b07436d95b5404134da4d661fd183eac863513e (diff) |
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core
Pull tracing updates from Steve Rostedt.
This commit:
tracing: Remove the extra 4 bytes of padding in events
changes the ABI. All involved parties seem to agree that it's safe to
do now, but the devil is in the details ...
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace.h | 6 | ||||
-rw-r--r-- | include/linux/ftrace_event.h | 3 | ||||
-rw-r--r-- | include/linux/hardirq.h | 4 | ||||
-rw-r--r-- | include/linux/kprobes.h | 12 |
4 files changed, 7 insertions, 18 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 92691d85c320..e5ca8ef50e9b 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -74,7 +74,7 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip, | |||
74 | * SAVE_REGS - The ftrace_ops wants regs saved at each function called | 74 | * SAVE_REGS - The ftrace_ops wants regs saved at each function called |
75 | * and passed to the callback. If this flag is set, but the | 75 | * and passed to the callback. If this flag is set, but the |
76 | * architecture does not support passing regs | 76 | * architecture does not support passing regs |
77 | * (ARCH_SUPPORTS_FTRACE_SAVE_REGS is not defined), then the | 77 | * (CONFIG_DYNAMIC_FTRACE_WITH_REGS is not defined), then the |
78 | * ftrace_ops will fail to register, unless the next flag | 78 | * ftrace_ops will fail to register, unless the next flag |
79 | * is set. | 79 | * is set. |
80 | * SAVE_REGS_IF_SUPPORTED - This is the same as SAVE_REGS, but if the | 80 | * SAVE_REGS_IF_SUPPORTED - This is the same as SAVE_REGS, but if the |
@@ -418,7 +418,7 @@ void ftrace_modify_all_code(int command); | |||
418 | #endif | 418 | #endif |
419 | 419 | ||
420 | #ifndef FTRACE_REGS_ADDR | 420 | #ifndef FTRACE_REGS_ADDR |
421 | #ifdef ARCH_SUPPORTS_FTRACE_SAVE_REGS | 421 | #ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS |
422 | # define FTRACE_REGS_ADDR ((unsigned long)ftrace_regs_caller) | 422 | # define FTRACE_REGS_ADDR ((unsigned long)ftrace_regs_caller) |
423 | #else | 423 | #else |
424 | # define FTRACE_REGS_ADDR FTRACE_ADDR | 424 | # define FTRACE_REGS_ADDR FTRACE_ADDR |
@@ -480,7 +480,7 @@ extern int ftrace_make_nop(struct module *mod, | |||
480 | */ | 480 | */ |
481 | extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr); | 481 | extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr); |
482 | 482 | ||
483 | #ifdef ARCH_SUPPORTS_FTRACE_SAVE_REGS | 483 | #ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS |
484 | /** | 484 | /** |
485 | * ftrace_modify_call - convert from one addr to another (no nop) | 485 | * ftrace_modify_call - convert from one addr to another (no nop) |
486 | * @rec: the mcount call site record | 486 | * @rec: the mcount call site record |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index a3d489531d83..6f8d0b77006b 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -49,7 +49,6 @@ struct trace_entry { | |||
49 | unsigned char flags; | 49 | unsigned char flags; |
50 | unsigned char preempt_count; | 50 | unsigned char preempt_count; |
51 | int pid; | 51 | int pid; |
52 | int padding; | ||
53 | }; | 52 | }; |
54 | 53 | ||
55 | #define FTRACE_MAX_EVENT \ | 54 | #define FTRACE_MAX_EVENT \ |
@@ -272,7 +271,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type, | |||
272 | extern int trace_add_event_call(struct ftrace_event_call *call); | 271 | extern int trace_add_event_call(struct ftrace_event_call *call); |
273 | extern void trace_remove_event_call(struct ftrace_event_call *call); | 272 | extern void trace_remove_event_call(struct ftrace_event_call *call); |
274 | 273 | ||
275 | #define is_signed_type(type) (((type)(-1)) < 0) | 274 | #define is_signed_type(type) (((type)(-1)) < (type)0) |
276 | 275 | ||
277 | int trace_set_clr_event(const char *system, const char *event, int set); | 276 | int trace_set_clr_event(const char *system, const char *event, int set); |
278 | 277 | ||
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 624ef3f45c8e..57bfdce8fb90 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -180,10 +180,10 @@ extern void irq_exit(void); | |||
180 | 180 | ||
181 | #define nmi_enter() \ | 181 | #define nmi_enter() \ |
182 | do { \ | 182 | do { \ |
183 | lockdep_off(); \ | ||
183 | ftrace_nmi_enter(); \ | 184 | ftrace_nmi_enter(); \ |
184 | BUG_ON(in_nmi()); \ | 185 | BUG_ON(in_nmi()); \ |
185 | add_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ | 186 | add_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ |
186 | lockdep_off(); \ | ||
187 | rcu_nmi_enter(); \ | 187 | rcu_nmi_enter(); \ |
188 | trace_hardirq_enter(); \ | 188 | trace_hardirq_enter(); \ |
189 | } while (0) | 189 | } while (0) |
@@ -192,10 +192,10 @@ extern void irq_exit(void); | |||
192 | do { \ | 192 | do { \ |
193 | trace_hardirq_exit(); \ | 193 | trace_hardirq_exit(); \ |
194 | rcu_nmi_exit(); \ | 194 | rcu_nmi_exit(); \ |
195 | lockdep_on(); \ | ||
196 | BUG_ON(!in_nmi()); \ | 195 | BUG_ON(!in_nmi()); \ |
197 | sub_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ | 196 | sub_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ |
198 | ftrace_nmi_exit(); \ | 197 | ftrace_nmi_exit(); \ |
198 | lockdep_on(); \ | ||
199 | } while (0) | 199 | } while (0) |
200 | 200 | ||
201 | #endif /* LINUX_HARDIRQ_H */ | 201 | #endif /* LINUX_HARDIRQ_H */ |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 23755ba42abc..4b6ef4d33cc2 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -49,16 +49,6 @@ | |||
49 | #define KPROBE_REENTER 0x00000004 | 49 | #define KPROBE_REENTER 0x00000004 |
50 | #define KPROBE_HIT_SSDONE 0x00000008 | 50 | #define KPROBE_HIT_SSDONE 0x00000008 |
51 | 51 | ||
52 | /* | ||
53 | * If function tracer is enabled and the arch supports full | ||
54 | * passing of pt_regs to function tracing, then kprobes can | ||
55 | * optimize on top of function tracing. | ||
56 | */ | ||
57 | #if defined(CONFIG_FUNCTION_TRACER) && defined(ARCH_SUPPORTS_FTRACE_SAVE_REGS) \ | ||
58 | && defined(ARCH_SUPPORTS_KPROBES_ON_FTRACE) | ||
59 | # define KPROBES_CAN_USE_FTRACE | ||
60 | #endif | ||
61 | |||
62 | /* Attach to insert probes on any functions which should be ignored*/ | 52 | /* Attach to insert probes on any functions which should be ignored*/ |
63 | #define __kprobes __attribute__((__section__(".kprobes.text"))) | 53 | #define __kprobes __attribute__((__section__(".kprobes.text"))) |
64 | 54 | ||
@@ -316,7 +306,7 @@ extern int proc_kprobes_optimization_handler(struct ctl_table *table, | |||
316 | #endif | 306 | #endif |
317 | 307 | ||
318 | #endif /* CONFIG_OPTPROBES */ | 308 | #endif /* CONFIG_OPTPROBES */ |
319 | #ifdef KPROBES_CAN_USE_FTRACE | 309 | #ifdef CONFIG_KPROBES_ON_FTRACE |
320 | extern void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, | 310 | extern void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, |
321 | struct ftrace_ops *ops, struct pt_regs *regs); | 311 | struct ftrace_ops *ops, struct pt_regs *regs); |
322 | extern int arch_prepare_kprobe_ftrace(struct kprobe *p); | 312 | extern int arch_prepare_kprobe_ftrace(struct kprobe *p); |