diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 11 | ||||
-rw-r--r-- | include/linux/i2c-dev.h | 2 | ||||
-rw-r--r-- | include/linux/i2c.h | 2 | ||||
-rw-r--r-- | include/linux/if_vlan.h | 1 | ||||
-rw-r--r-- | include/linux/skbuff.h | 9 | ||||
-rw-r--r-- | include/linux/tracepoint.h | 3 | ||||
-rw-r--r-- | include/net/sock.h | 1 | ||||
-rw-r--r-- | include/trace/sched.h | 49 | ||||
-rw-r--r-- | include/trace/sched_event_types.h | 72 |
9 files changed, 89 insertions, 61 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index c61fab1dd2f8..0add6b28c366 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -61,6 +61,14 @@ | |||
61 | #define BRANCH_PROFILE() | 61 | #define BRANCH_PROFILE() |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef CONFIG_EVENT_TRACER | ||
65 | #define FTRACE_EVENTS() VMLINUX_SYMBOL(__start_ftrace_events) = .; \ | ||
66 | *(_ftrace_events) \ | ||
67 | VMLINUX_SYMBOL(__stop_ftrace_events) = .; | ||
68 | #else | ||
69 | #define FTRACE_EVENTS() | ||
70 | #endif | ||
71 | |||
64 | /* .data section */ | 72 | /* .data section */ |
65 | #define DATA_DATA \ | 73 | #define DATA_DATA \ |
66 | *(.data) \ | 74 | *(.data) \ |
@@ -81,7 +89,8 @@ | |||
81 | *(__tracepoints) \ | 89 | *(__tracepoints) \ |
82 | VMLINUX_SYMBOL(__stop___tracepoints) = .; \ | 90 | VMLINUX_SYMBOL(__stop___tracepoints) = .; \ |
83 | LIKELY_PROFILE() \ | 91 | LIKELY_PROFILE() \ |
84 | BRANCH_PROFILE() | 92 | BRANCH_PROFILE() \ |
93 | FTRACE_EVENTS() | ||
85 | 94 | ||
86 | #define RO_DATA(align) \ | 95 | #define RO_DATA(align) \ |
87 | . = ALIGN((align)); \ | 96 | . = ALIGN((align)); \ |
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h index 311315b56b61..fd53bfd26470 100644 --- a/include/linux/i2c-dev.h +++ b/include/linux/i2c-dev.h | |||
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | #define I2C_RETRIES 0x0701 /* number of times a device address should | 34 | #define I2C_RETRIES 0x0701 /* number of times a device address should |
35 | be polled when not acknowledging */ | 35 | be polled when not acknowledging */ |
36 | #define I2C_TIMEOUT 0x0702 /* set timeout in jiffies - call with int */ | 36 | #define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ |
37 | 37 | ||
38 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses | 38 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses |
39 | * are NOT supported! (due to code brokenness) | 39 | * are NOT supported! (due to code brokenness) |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index fcfbfea3af72..c86c3b07604c 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -361,7 +361,7 @@ struct i2c_adapter { | |||
361 | struct mutex bus_lock; | 361 | struct mutex bus_lock; |
362 | struct mutex clist_lock; | 362 | struct mutex clist_lock; |
363 | 363 | ||
364 | int timeout; | 364 | int timeout; /* in jiffies */ |
365 | int retries; | 365 | int retries; |
366 | struct device dev; /* the adapter device */ | 366 | struct device dev; /* the adapter device */ |
367 | 367 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index f8ff918c208f..e1ff5b14310e 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -210,6 +210,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci) | |||
210 | 210 | ||
211 | /* Move the mac addresses to the beginning of the new header. */ | 211 | /* Move the mac addresses to the beginning of the new header. */ |
212 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); | 212 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); |
213 | skb->mac_header -= VLAN_HLEN; | ||
213 | 214 | ||
214 | /* first, the ethernet type */ | 215 | /* first, the ethernet type */ |
215 | veth->h_vlan_proto = htons(ETH_P_8021Q); | 216 | veth->h_vlan_proto = htons(ETH_P_8021Q); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cf2cb50f77d1..9dcf956ad18a 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -416,15 +416,6 @@ extern void skb_over_panic(struct sk_buff *skb, int len, | |||
416 | void *here); | 416 | void *here); |
417 | extern void skb_under_panic(struct sk_buff *skb, int len, | 417 | extern void skb_under_panic(struct sk_buff *skb, int len, |
418 | void *here); | 418 | void *here); |
419 | extern void skb_truesize_bug(struct sk_buff *skb); | ||
420 | |||
421 | static inline void skb_truesize_check(struct sk_buff *skb) | ||
422 | { | ||
423 | int len = sizeof(struct sk_buff) + skb->len; | ||
424 | |||
425 | if (unlikely((int)skb->truesize < len)) | ||
426 | skb_truesize_bug(skb); | ||
427 | } | ||
428 | 419 | ||
429 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | 420 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, |
430 | int getfrag(void *from, char *to, int offset, | 421 | int getfrag(void *from, char *to, int offset, |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 757005458366..34ae464effff 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -153,4 +153,7 @@ static inline void tracepoint_synchronize_unregister(void) | |||
153 | synchronize_sched(); | 153 | synchronize_sched(); |
154 | } | 154 | } |
155 | 155 | ||
156 | #define DEFINE_TRACE_FMT(name, proto, args, fmt) \ | ||
157 | DECLARE_TRACE(name, TPPROTO(proto), TPARGS(args)) | ||
158 | |||
156 | #endif | 159 | #endif |
diff --git a/include/net/sock.h b/include/net/sock.h index ce3b5b622683..eefeeaf7fc46 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -860,7 +860,6 @@ static inline void sk_mem_uncharge(struct sock *sk, int size) | |||
860 | 860 | ||
861 | static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb) | 861 | static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb) |
862 | { | 862 | { |
863 | skb_truesize_check(skb); | ||
864 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); | 863 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); |
865 | sk->sk_wmem_queued -= skb->truesize; | 864 | sk->sk_wmem_queued -= skb->truesize; |
866 | sk_mem_uncharge(sk, skb->truesize); | 865 | sk_mem_uncharge(sk, skb->truesize); |
diff --git a/include/trace/sched.h b/include/trace/sched.h index 0d81098ee9fc..4e372a1a29bf 100644 --- a/include/trace/sched.h +++ b/include/trace/sched.h | |||
@@ -4,53 +4,6 @@ | |||
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/tracepoint.h> | 5 | #include <linux/tracepoint.h> |
6 | 6 | ||
7 | DECLARE_TRACE(sched_kthread_stop, | 7 | #include <trace/sched_event_types.h> |
8 | TPPROTO(struct task_struct *t), | ||
9 | TPARGS(t)); | ||
10 | |||
11 | DECLARE_TRACE(sched_kthread_stop_ret, | ||
12 | TPPROTO(int ret), | ||
13 | TPARGS(ret)); | ||
14 | |||
15 | DECLARE_TRACE(sched_wait_task, | ||
16 | TPPROTO(struct rq *rq, struct task_struct *p), | ||
17 | TPARGS(rq, p)); | ||
18 | |||
19 | DECLARE_TRACE(sched_wakeup, | ||
20 | TPPROTO(struct rq *rq, struct task_struct *p, int success), | ||
21 | TPARGS(rq, p, success)); | ||
22 | |||
23 | DECLARE_TRACE(sched_wakeup_new, | ||
24 | TPPROTO(struct rq *rq, struct task_struct *p, int success), | ||
25 | TPARGS(rq, p, success)); | ||
26 | |||
27 | DECLARE_TRACE(sched_switch, | ||
28 | TPPROTO(struct rq *rq, struct task_struct *prev, | ||
29 | struct task_struct *next), | ||
30 | TPARGS(rq, prev, next)); | ||
31 | |||
32 | DECLARE_TRACE(sched_migrate_task, | ||
33 | TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu), | ||
34 | TPARGS(p, orig_cpu, dest_cpu)); | ||
35 | |||
36 | DECLARE_TRACE(sched_process_free, | ||
37 | TPPROTO(struct task_struct *p), | ||
38 | TPARGS(p)); | ||
39 | |||
40 | DECLARE_TRACE(sched_process_exit, | ||
41 | TPPROTO(struct task_struct *p), | ||
42 | TPARGS(p)); | ||
43 | |||
44 | DECLARE_TRACE(sched_process_wait, | ||
45 | TPPROTO(struct pid *pid), | ||
46 | TPARGS(pid)); | ||
47 | |||
48 | DECLARE_TRACE(sched_process_fork, | ||
49 | TPPROTO(struct task_struct *parent, struct task_struct *child), | ||
50 | TPARGS(parent, child)); | ||
51 | |||
52 | DECLARE_TRACE(sched_signal_send, | ||
53 | TPPROTO(int sig, struct task_struct *p), | ||
54 | TPARGS(sig, p)); | ||
55 | 8 | ||
56 | #endif | 9 | #endif |
diff --git a/include/trace/sched_event_types.h b/include/trace/sched_event_types.h new file mode 100644 index 000000000000..a4f662940f4e --- /dev/null +++ b/include/trace/sched_event_types.h | |||
@@ -0,0 +1,72 @@ | |||
1 | |||
2 | /* use <trace/sched.h> instead */ | ||
3 | #ifndef DEFINE_TRACE_FMT | ||
4 | # error Do not include this file directly. | ||
5 | # error Unless you know what you are doing. | ||
6 | #endif | ||
7 | |||
8 | DEFINE_TRACE_FMT(sched_kthread_stop, | ||
9 | TPPROTO(struct task_struct *t), | ||
10 | TPARGS(t), | ||
11 | TPFMT("task %s:%d", t->comm, t->pid)); | ||
12 | |||
13 | DEFINE_TRACE_FMT(sched_kthread_stop_ret, | ||
14 | TPPROTO(int ret), | ||
15 | TPARGS(ret), | ||
16 | TPFMT("ret=%d", ret)); | ||
17 | |||
18 | DEFINE_TRACE_FMT(sched_wait_task, | ||
19 | TPPROTO(struct rq *rq, struct task_struct *p), | ||
20 | TPARGS(rq, p), | ||
21 | TPFMT("task %s:%d", p->comm, p->pid)); | ||
22 | |||
23 | DEFINE_TRACE_FMT(sched_wakeup, | ||
24 | TPPROTO(struct rq *rq, struct task_struct *p, int success), | ||
25 | TPARGS(rq, p, success), | ||
26 | TPFMT("task %s:%d %s", | ||
27 | p->comm, p->pid, success?"succeeded":"failed")); | ||
28 | |||
29 | DEFINE_TRACE_FMT(sched_wakeup_new, | ||
30 | TPPROTO(struct rq *rq, struct task_struct *p, int success), | ||
31 | TPARGS(rq, p, success), | ||
32 | TPFMT("task %s:%d", | ||
33 | p->comm, p->pid, success?"succeeded":"failed")); | ||
34 | |||
35 | DEFINE_TRACE_FMT(sched_switch, | ||
36 | TPPROTO(struct rq *rq, struct task_struct *prev, | ||
37 | struct task_struct *next), | ||
38 | TPARGS(rq, prev, next), | ||
39 | TPFMT("task %s:%d ==> %s:%d", | ||
40 | prev->comm, prev->pid, next->comm, next->pid)); | ||
41 | |||
42 | DEFINE_TRACE_FMT(sched_migrate_task, | ||
43 | TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu), | ||
44 | TPARGS(p, orig_cpu, dest_cpu), | ||
45 | TPFMT("task %s:%d from: %d to: %d", | ||
46 | p->comm, p->pid, orig_cpu, dest_cpu)); | ||
47 | |||
48 | DEFINE_TRACE_FMT(sched_process_free, | ||
49 | TPPROTO(struct task_struct *p), | ||
50 | TPARGS(p), | ||
51 | TPFMT("task %s:%d", p->comm, p->pid)); | ||
52 | |||
53 | DEFINE_TRACE_FMT(sched_process_exit, | ||
54 | TPPROTO(struct task_struct *p), | ||
55 | TPARGS(p), | ||
56 | TPFMT("task %s:%d", p->comm, p->pid)); | ||
57 | |||
58 | DEFINE_TRACE_FMT(sched_process_wait, | ||
59 | TPPROTO(struct pid *pid), | ||
60 | TPARGS(pid), | ||
61 | TPFMT("pid %d", pid)); | ||
62 | |||
63 | DEFINE_TRACE_FMT(sched_process_fork, | ||
64 | TPPROTO(struct task_struct *parent, struct task_struct *child), | ||
65 | TPARGS(parent, child), | ||
66 | TPFMT("parent %s:%d child %s:%d", | ||
67 | parent->comm, parent->pid, child->comm, child->pid)); | ||
68 | |||
69 | DEFINE_TRACE_FMT(sched_signal_send, | ||
70 | TPPROTO(int sig, struct task_struct *p), | ||
71 | TPARGS(sig, p), | ||
72 | TPFMT("sig: %d task %s:%d", sig, p->comm, p->pid)); | ||