1 /* SPDX-License-Identifier: GPL-2.0 */
4 #define TRACE_SYSTEM lock
6 #if !defined(LTTNG_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define LTTNG_TRACE_LOCK_H
9 #include <linux/lockdep.h>
10 #include <probes/lttng-tracepoint-event.h>
14 LTTNG_TRACEPOINT_EVENT(lock_acquire
,
16 TP_PROTO(struct lockdep_map
*lock
, unsigned int subclass
,
17 int trylock
, int read
, int check
,
18 struct lockdep_map
*next_lock
, unsigned long ip
),
20 TP_ARGS(lock
, subclass
, trylock
, read
, check
, next_lock
, ip
),
23 ctf_integer(unsigned int, flags
, (trylock
? 1 : 0) | (read
? 2 : 0))
24 ctf_string(name
, lock
->name
)
25 ctf_integer_hex(void *, lockdep_addr
, lock
)
29 LTTNG_TRACEPOINT_EVENT_CLASS(lock
,
31 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
36 ctf_string(name
, lock
->name
)
37 ctf_integer_hex(void *, lockdep_addr
, lock
)
41 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_release
,
43 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
48 #ifdef CONFIG_LOCK_STAT
50 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_contended
,
52 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
57 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_acquired
,
59 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
64 #endif /* CONFIG_LOCK_STAT */
66 #endif /* CONFIG_LOCKDEP */
68 #endif /* LTTNG_TRACE_LOCK_H */
70 /* This part must be outside protection */
71 #include <probes/define_trace.h>
This page took 0.031958 seconds and 4 git commands to generate.