2 #define TRACE_SYSTEM lttng_statedump
4 #if !defined(LTTNG_TRACE_LTTNG_STATEDUMP_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_LTTNG_STATEDUMP_H
7 #include "../../../probes/lttng-tracepoint-event.h"
8 #include <linux/nsproxy.h>
9 #include <linux/pid_namespace.h>
10 #include <linux/types.h>
12 LTTNG_TRACEPOINT_EVENT(lttng_statedump_start
,
13 TP_PROTO(struct lttng_session
*session
),
18 LTTNG_TRACEPOINT_EVENT(lttng_statedump_end
,
19 TP_PROTO(struct lttng_session
*session
),
24 LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_state
,
25 TP_PROTO(struct lttng_session
*session
,
26 struct task_struct
*p
,
27 int type
, int mode
, int submode
, int status
,
28 struct pid_namespace
*pid_ns
),
29 TP_ARGS(session
, p
, type
, mode
, submode
, status
, pid_ns
),
31 ctf_integer(pid_t
, tid
, p
->pid
)
32 ctf_integer(pid_t
, vtid
, pid_ns
? task_pid_nr_ns(p
, pid_ns
) : 0)
33 ctf_integer(pid_t
, pid
, p
->tgid
)
34 ctf_integer(pid_t
, vpid
, pid_ns
? task_tgid_nr_ns(p
, pid_ns
) : 0)
35 ctf_integer(pid_t
, ppid
,
40 ret
= task_tgid_nr(p
->real_parent
);
44 ctf_integer(pid_t
, vppid
,
46 struct task_struct
*parent
;
51 parent
= rcu_dereference(p
->real_parent
);
52 ret
= task_tgid_nr_ns(parent
, pid_ns
);
57 ctf_array_text(char, name
, p
->comm
, TASK_COMM_LEN
)
58 ctf_integer(int, type
, type
)
59 ctf_integer(int, mode
, mode
)
60 ctf_integer(int, submode
, submode
)
61 ctf_integer(int, status
, status
)
62 ctf_integer(int, ns_level
, pid_ns
? pid_ns
->level
: 0)
66 LTTNG_TRACEPOINT_EVENT(lttng_statedump_file_descriptor
,
67 TP_PROTO(struct lttng_session
*session
,
68 struct task_struct
*p
, int fd
, const char *filename
,
69 unsigned int flags
, fmode_t fmode
),
70 TP_ARGS(session
, p
, fd
, filename
, flags
, fmode
),
72 ctf_integer(pid_t
, pid
, p
->tgid
)
73 ctf_integer(int, fd
, fd
)
74 ctf_integer_oct(unsigned int, flags
, flags
)
75 ctf_integer_hex(fmode_t
, fmode
, fmode
)
76 ctf_string(filename
, filename
)
80 LTTNG_TRACEPOINT_EVENT(lttng_statedump_vm_map
,
81 TP_PROTO(struct lttng_session
*session
,
82 struct task_struct
*p
, struct vm_area_struct
*map
,
84 TP_ARGS(session
, p
, map
, inode
),
86 ctf_integer(pid_t
, pid
, p
->tgid
)
87 ctf_integer_hex(unsigned long, start
, map
->vm_start
)
88 ctf_integer_hex(unsigned long, end
, map
->vm_end
)
89 ctf_integer_hex(unsigned long, flags
, map
->vm_flags
)
90 ctf_integer(unsigned long, inode
, inode
)
91 ctf_integer(unsigned long, pgoff
, map
->vm_pgoff
<< PAGE_SHIFT
)
95 LTTNG_TRACEPOINT_EVENT(lttng_statedump_network_interface
,
96 TP_PROTO(struct lttng_session
*session
,
97 struct net_device
*dev
, struct in_ifaddr
*ifa
),
98 TP_ARGS(session
, dev
, ifa
),
100 ctf_string(name
, dev
->name
)
101 ctf_integer_network_hex(uint32_t, address_ipv4
,
102 ifa
? ifa
->ifa_address
: 0U)
106 LTTNG_TRACEPOINT_EVENT(lttng_statedump_block_device
,
107 TP_PROTO(struct lttng_session
*session
,
108 dev_t dev
, const char *diskname
),
109 TP_ARGS(session
, dev
, diskname
),
111 ctf_integer(dev_t
, dev
, dev
)
112 ctf_string(diskname
, diskname
)
116 /* Called with desc->lock held */
117 LTTNG_TRACEPOINT_EVENT(lttng_statedump_interrupt
,
118 TP_PROTO(struct lttng_session
*session
,
119 unsigned int irq
, const char *chip_name
,
120 struct irqaction
*action
),
121 TP_ARGS(session
, irq
, chip_name
, action
),
123 ctf_integer(unsigned int, irq
, irq
)
124 ctf_string(name
, chip_name
)
125 ctf_string(action
, action
->name
? : "")
129 #endif /* LTTNG_TRACE_LTTNG_STATEDUMP_H */
131 /* This part must be outside protection */
132 #include "../../../probes/define_trace.h"