aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/gfpflags.h1
-rw-r--r--include/trace/events/kmem.h4
-rw-r--r--include/trace/events/random.h134
-rw-r--r--include/trace/events/sched.h4
-rw-r--r--include/trace/events/workqueue.h2
-rw-r--r--include/trace/events/xen.h12
-rw-r--r--include/trace/ftrace.h6
7 files changed, 154 insertions, 9 deletions
diff --git a/include/trace/events/gfpflags.h b/include/trace/events/gfpflags.h
index 9fe3a36646e9..d6fd8e5b14b7 100644
--- a/include/trace/events/gfpflags.h
+++ b/include/trace/events/gfpflags.h
@@ -30,6 +30,7 @@
30 {(unsigned long)__GFP_COMP, "GFP_COMP"}, \ 30 {(unsigned long)__GFP_COMP, "GFP_COMP"}, \
31 {(unsigned long)__GFP_ZERO, "GFP_ZERO"}, \ 31 {(unsigned long)__GFP_ZERO, "GFP_ZERO"}, \
32 {(unsigned long)__GFP_NOMEMALLOC, "GFP_NOMEMALLOC"}, \ 32 {(unsigned long)__GFP_NOMEMALLOC, "GFP_NOMEMALLOC"}, \
33 {(unsigned long)__GFP_MEMALLOC, "GFP_MEMALLOC"}, \
33 {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ 34 {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \
34 {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ 35 {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \
35 {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ 36 {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
index 5f889f16b0c8..08fa27244da7 100644
--- a/include/trace/events/kmem.h
+++ b/include/trace/events/kmem.h
@@ -214,7 +214,7 @@ TRACE_EVENT(mm_page_alloc,
214 214
215 TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s", 215 TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s",
216 __entry->page, 216 __entry->page,
217 page_to_pfn(__entry->page), 217 __entry->page ? page_to_pfn(__entry->page) : 0,
218 __entry->order, 218 __entry->order,
219 __entry->migratetype, 219 __entry->migratetype,
220 show_gfp_flags(__entry->gfp_flags)) 220 show_gfp_flags(__entry->gfp_flags))
@@ -240,7 +240,7 @@ DECLARE_EVENT_CLASS(mm_page,
240 240
241 TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d", 241 TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d",
242 __entry->page, 242 __entry->page,
243 page_to_pfn(__entry->page), 243 __entry->page ? page_to_pfn(__entry->page) : 0,
244 __entry->order, 244 __entry->order,
245 __entry->migratetype, 245 __entry->migratetype,
246 __entry->order == 0) 246 __entry->order == 0)
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
new file mode 100644
index 000000000000..422df19de732
--- /dev/null
+++ b/include/trace/events/random.h
@@ -0,0 +1,134 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM random
3
4#if !defined(_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_RANDOM_H
6
7#include <linux/writeback.h>
8#include <linux/tracepoint.h>
9
10DECLARE_EVENT_CLASS(random__mix_pool_bytes,
11 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
12
13 TP_ARGS(pool_name, bytes, IP),
14
15 TP_STRUCT__entry(
16 __field( const char *, pool_name )
17 __field( int, bytes )
18 __field(unsigned long, IP )
19 ),
20
21 TP_fast_assign(
22 __entry->pool_name = pool_name;
23 __entry->bytes = bytes;
24 __entry->IP = IP;
25 ),
26
27 TP_printk("%s pool: bytes %d caller %pF",
28 __entry->pool_name, __entry->bytes, (void *)__entry->IP)
29);
30
31DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes,
32 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
33
34 TP_ARGS(pool_name, bytes, IP)
35);
36
37DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
38 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
39
40 TP_ARGS(pool_name, bytes, IP)
41);
42
43TRACE_EVENT(credit_entropy_bits,
44 TP_PROTO(const char *pool_name, int bits, int entropy_count,
45 int entropy_total, unsigned long IP),
46
47 TP_ARGS(pool_name, bits, entropy_count, entropy_total, IP),
48
49 TP_STRUCT__entry(
50 __field( const char *, pool_name )
51 __field( int, bits )
52 __field( int, entropy_count )
53 __field( int, entropy_total )
54 __field(unsigned long, IP )
55 ),
56
57 TP_fast_assign(
58 __entry->pool_name = pool_name;
59 __entry->bits = bits;
60 __entry->entropy_count = entropy_count;
61 __entry->entropy_total = entropy_total;
62 __entry->IP = IP;
63 ),
64
65 TP_printk("%s pool: bits %d entropy_count %d entropy_total %d "
66 "caller %pF", __entry->pool_name, __entry->bits,
67 __entry->entropy_count, __entry->entropy_total,
68 (void *)__entry->IP)
69);
70
71TRACE_EVENT(get_random_bytes,
72 TP_PROTO(int nbytes, unsigned long IP),
73
74 TP_ARGS(nbytes, IP),
75
76 TP_STRUCT__entry(
77 __field( int, nbytes )
78 __field(unsigned long, IP )
79 ),
80
81 TP_fast_assign(
82 __entry->nbytes = nbytes;
83 __entry->IP = IP;
84 ),
85
86 TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP)
87);
88
89DECLARE_EVENT_CLASS(random__extract_entropy,
90 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
91 unsigned long IP),
92
93 TP_ARGS(pool_name, nbytes, entropy_count, IP),
94
95 TP_STRUCT__entry(
96 __field( const char *, pool_name )
97 __field( int, nbytes )
98 __field( int, entropy_count )
99 __field(unsigned long, IP )
100 ),
101
102 TP_fast_assign(
103 __entry->pool_name = pool_name;
104 __entry->nbytes = nbytes;
105 __entry->entropy_count = entropy_count;
106 __entry->IP = IP;
107 ),
108
109 TP_printk("%s pool: nbytes %d entropy_count %d caller %pF",
110 __entry->pool_name, __entry->nbytes, __entry->entropy_count,
111 (void *)__entry->IP)
112);
113
114
115DEFINE_EVENT(random__extract_entropy, extract_entropy,
116 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
117 unsigned long IP),
118
119 TP_ARGS(pool_name, nbytes, entropy_count, IP)
120);
121
122DEFINE_EVENT(random__extract_entropy, extract_entropy_user,
123 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
124 unsigned long IP),
125
126 TP_ARGS(pool_name, nbytes, entropy_count, IP)
127);
128
129
130
131#endif /* _TRACE_RANDOM_H */
132
133/* This part must be outside protection */
134#include <trace/define_trace.h>
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index ea7a2035456d..5a8671e8a67f 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -73,6 +73,9 @@ DECLARE_EVENT_CLASS(sched_wakeup_template,
73 __entry->prio = p->prio; 73 __entry->prio = p->prio;
74 __entry->success = success; 74 __entry->success = success;
75 __entry->target_cpu = task_cpu(p); 75 __entry->target_cpu = task_cpu(p);
76 )
77 TP_perf_assign(
78 __perf_task(p);
76 ), 79 ),
77 80
78 TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", 81 TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d",
@@ -325,6 +328,7 @@ DECLARE_EVENT_CLASS(sched_stat_template,
325 ) 328 )
326 TP_perf_assign( 329 TP_perf_assign(
327 __perf_count(delay); 330 __perf_count(delay);
331 __perf_task(tsk);
328 ), 332 ),
329 333
330 TP_printk("comm=%s pid=%d delay=%Lu [ns]", 334 TP_printk("comm=%s pid=%d delay=%Lu [ns]",
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h
index 4018f5058f27..f28d1b65f178 100644
--- a/include/trace/events/workqueue.h
+++ b/include/trace/events/workqueue.h
@@ -54,7 +54,7 @@ TRACE_EVENT(workqueue_queue_work,
54 __entry->function = work->func; 54 __entry->function = work->func;
55 __entry->workqueue = cwq->wq; 55 __entry->workqueue = cwq->wq;
56 __entry->req_cpu = req_cpu; 56 __entry->req_cpu = req_cpu;
57 __entry->cpu = cwq->gcwq->cpu; 57 __entry->cpu = cwq->pool->gcwq->cpu;
58 ), 58 ),
59 59
60 TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u", 60 TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u",
diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h
index 92f1a796829e..15ba03bdd7c6 100644
--- a/include/trace/events/xen.h
+++ b/include/trace/events/xen.h
@@ -397,18 +397,20 @@ TRACE_EVENT(xen_mmu_flush_tlb_single,
397 397
398TRACE_EVENT(xen_mmu_flush_tlb_others, 398TRACE_EVENT(xen_mmu_flush_tlb_others,
399 TP_PROTO(const struct cpumask *cpus, struct mm_struct *mm, 399 TP_PROTO(const struct cpumask *cpus, struct mm_struct *mm,
400 unsigned long addr), 400 unsigned long addr, unsigned long end),
401 TP_ARGS(cpus, mm, addr), 401 TP_ARGS(cpus, mm, addr, end),
402 TP_STRUCT__entry( 402 TP_STRUCT__entry(
403 __field(unsigned, ncpus) 403 __field(unsigned, ncpus)
404 __field(struct mm_struct *, mm) 404 __field(struct mm_struct *, mm)
405 __field(unsigned long, addr) 405 __field(unsigned long, addr)
406 __field(unsigned long, end)
406 ), 407 ),
407 TP_fast_assign(__entry->ncpus = cpumask_weight(cpus); 408 TP_fast_assign(__entry->ncpus = cpumask_weight(cpus);
408 __entry->mm = mm; 409 __entry->mm = mm;
409 __entry->addr = addr), 410 __entry->addr = addr,
410 TP_printk("ncpus %d mm %p addr %lx", 411 __entry->end = end),
411 __entry->ncpus, __entry->mm, __entry->addr) 412 TP_printk("ncpus %d mm %p addr %lx, end %lx",
413 __entry->ncpus, __entry->mm, __entry->addr, __entry->end)
412 ); 414 );
413 415
414TRACE_EVENT(xen_mmu_write_cr3, 416TRACE_EVENT(xen_mmu_write_cr3,
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index c6bc2faaf261..a763888a36f9 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -712,6 +712,9 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
712#undef __perf_count 712#undef __perf_count
713#define __perf_count(c) __count = (c) 713#define __perf_count(c) __count = (c)
714 714
715#undef __perf_task
716#define __perf_task(t) __task = (t)
717
715#undef TP_perf_assign 718#undef TP_perf_assign
716#define TP_perf_assign(args...) args 719#define TP_perf_assign(args...) args
717 720
@@ -725,6 +728,7 @@ perf_trace_##call(void *__data, proto) \
725 struct ftrace_raw_##call *entry; \ 728 struct ftrace_raw_##call *entry; \
726 struct pt_regs __regs; \ 729 struct pt_regs __regs; \
727 u64 __addr = 0, __count = 1; \ 730 u64 __addr = 0, __count = 1; \
731 struct task_struct *__task = NULL; \
728 struct hlist_head *head; \ 732 struct hlist_head *head; \
729 int __entry_size; \ 733 int __entry_size; \
730 int __data_size; \ 734 int __data_size; \
@@ -752,7 +756,7 @@ perf_trace_##call(void *__data, proto) \
752 \ 756 \
753 head = this_cpu_ptr(event_call->perf_events); \ 757 head = this_cpu_ptr(event_call->perf_events); \
754 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ 758 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
755 __count, &__regs, head); \ 759 __count, &__regs, head, __task); \
756} 760}
757 761
758/* 762/*