1 #include <linux/version.h>
4 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
5 #define TRACE_SYSTEM lock
7 #define TRACE_SYSTEM lockdep
8 #define TRACE_INCLUDE_FILE lock
9 #if defined(_TRACE_LOCKDEP_H)
10 #define LTTNG_TRACE_LOCK_H
14 #if !defined(LTTNG_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
15 #define LTTNG_TRACE_LOCK_H
17 #include <linux/lockdep.h>
18 #include "../../../probes/lttng-tracepoint-event.h"
22 LTTNG_TRACEPOINT_EVENT(lock_acquire
,
24 TP_PROTO(struct lockdep_map
*lock
, unsigned int subclass
,
25 int trylock
, int read
, int check
,
26 struct lockdep_map
*next_lock
, unsigned long ip
),
28 TP_ARGS(lock
, subclass
, trylock
, read
, check
, next_lock
, ip
),
31 ctf_integer(unsigned int, flags
, (trylock
? 1 : 0) | (read
? 2 : 0))
32 ctf_string(name
, lock
->name
)
33 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
34 ctf_integer_hex(void *, lockdep_addr
, lock
)
39 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
41 LTTNG_TRACEPOINT_EVENT_CLASS(lock
,
43 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
48 ctf_string(name
, lock
->name
)
49 ctf_integer_hex(void *, lockdep_addr
, lock
)
53 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_release
,
55 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
60 #ifdef CONFIG_LOCK_STAT
62 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_contended
,
64 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
69 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_acquired
,
71 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
78 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
80 LTTNG_TRACEPOINT_EVENT(lock_release
,
82 TP_PROTO(struct lockdep_map
*lock
, int nested
, unsigned long ip
),
84 TP_ARGS(lock
, nested
, ip
),
87 ctf_string(name
, lock
->name
)
88 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
89 ctf_integer_hex(void *, lockdep_addr
, lock
)
94 #ifdef CONFIG_LOCK_STAT
96 LTTNG_TRACEPOINT_EVENT(lock_contended
,
98 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
103 ctf_string(name
, lock
->name
)
104 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
105 ctf_integer_hex(void *, lockdep_addr
, lock
)
110 LTTNG_TRACEPOINT_EVENT(lock_acquired
,
112 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
, s64 waittime
),
114 TP_ARGS(lock
, ip
, waittime
),
117 ctf_string(name
, lock
->name
)
118 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
119 ctf_integer(s64
, wait_nsec
, wait_nsec
)
120 ctf_integer_hex(void *, lockdep_addr
, lock
)
122 ctf_integer(unsigned long, wait_usec
, (unsigned long) waittime
)
123 ctf_integer(unsigned long, wait_nsec_rem
, do_div(waittime
, NSEC_PER_USEC
))
130 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
134 #endif /* LTTNG_TRACE_LOCK_H */
136 /* This part must be outside protection */
137 #include "../../../probes/define_trace.h"
This page took 0.059187 seconds and 4 git commands to generate.