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.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 8b9f4f6e9559..8a6281b2330b 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -11,6 +11,7 @@
11#include <trace/boot.h> 11#include <trace/boot.h>
12#include <linux/kmemtrace.h> 12#include <linux/kmemtrace.h>
13#include <trace/power.h> 13#include <trace/power.h>
14#include <trace/events/skb.h>
14 15
15#include <linux/trace_seq.h> 16#include <linux/trace_seq.h>
16#include <linux/ftrace_event.h> 17#include <linux/ftrace_event.h>
@@ -40,6 +41,7 @@ enum trace_type {
40 TRACE_KMEM_FREE, 41 TRACE_KMEM_FREE,
41 TRACE_POWER, 42 TRACE_POWER,
42 TRACE_BLK, 43 TRACE_BLK,
44 TRACE_SKB_SOURCE,
43 45
44 __TRACE_LAST_TYPE, 46 __TRACE_LAST_TYPE,
45}; 47};
@@ -171,6 +173,21 @@ struct trace_power {
171 struct power_trace state_data; 173 struct power_trace state_data;
172}; 174};
173 175
176struct skb_record {
177 pid_t pid; /* pid of the copying process */
178 int anid; /* node where skb was allocated */
179 int cnid; /* node to which skb was copied in userspace */
180 char ifname[IFNAMSIZ]; /* Name of the receiving interface */
181 int rx_queue; /* The rx queue the skb was received on */
182 int ccpu; /* Cpu the application got this frame from */
183 int len; /* length of the data copied */
184};
185
186struct trace_skb_event {
187 struct trace_entry ent;
188 struct skb_record event_data;
189};
190
174enum kmemtrace_type_id { 191enum kmemtrace_type_id {
175 KMEMTRACE_TYPE_KMALLOC = 0, /* kmalloc() or kfree(). */ 192 KMEMTRACE_TYPE_KMALLOC = 0, /* kmalloc() or kfree(). */
176 KMEMTRACE_TYPE_CACHE, /* kmem_cache_*(). */ 193 KMEMTRACE_TYPE_CACHE, /* kmem_cache_*(). */
@@ -323,6 +340,8 @@ extern void __ftrace_bad_type(void);
323 TRACE_SYSCALL_ENTER); \ 340 TRACE_SYSCALL_ENTER); \
324 IF_ASSIGN(var, ent, struct syscall_trace_exit, \ 341 IF_ASSIGN(var, ent, struct syscall_trace_exit, \
325 TRACE_SYSCALL_EXIT); \ 342 TRACE_SYSCALL_EXIT); \
343 IF_ASSIGN(var, ent, struct trace_skb_event, \
344 TRACE_SKB_SOURCE); \
326 __ftrace_bad_type(); \ 345 __ftrace_bad_type(); \
327 } while (0) 346 } while (0)
328 347