5a46a30634c98c370853b3755318848342f389cc
1 // SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
3 // SPDX-License-Identifier: GPL-2.0-only
6 #define TRACE_SYSTEM lock
8 #if !defined(LTTNG_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_LOCK_H
11 #include <linux/lockdep.h>
12 #include <lttng/tracepoint-event.h>
16 LTTNG_TRACEPOINT_EVENT(lock_acquire
,
18 TP_PROTO(struct lockdep_map
*lock
, unsigned int subclass
,
19 int trylock
, int read
, int check
,
20 struct lockdep_map
*next_lock
, unsigned long ip
),
22 TP_ARGS(lock
, subclass
, trylock
, read
, check
, next_lock
, ip
),
25 ctf_integer(unsigned int, flags
, (trylock
? 1 : 0) | (read
? 2 : 0))
26 ctf_string(name
, lock
->name
)
27 ctf_integer_hex(void *, lockdep_addr
, lock
)
31 LTTNG_TRACEPOINT_EVENT_CLASS(lock
,
33 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
38 ctf_string(name
, lock
->name
)
39 ctf_integer_hex(void *, lockdep_addr
, lock
)
43 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_release
,
45 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
50 #ifdef CONFIG_LOCK_STAT
52 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_contended
,
54 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
59 LTTNG_TRACEPOINT_EVENT_INSTANCE(lock
, lock_acquired
,
61 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
66 #endif /* CONFIG_LOCK_STAT */
68 #endif /* CONFIG_LOCKDEP */
70 #endif /* LTTNG_TRACE_LOCK_H */
72 /* This part must be outside protection */
73 #include <lttng/define_trace.h>
This page took 0.032729 seconds and 5 git commands to generate.