Cleanup: Remove toplevel directory from include search path
[lttng-modules.git] / include / instrumentation / events / lttng-module / lock.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: GPL-2.0-only */
7c68b363 2
b283666f
PW
3#undef TRACE_SYSTEM
4#define TRACE_SYSTEM lock
5
3bc29f0a
MD
6#if !defined(LTTNG_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
7#define LTTNG_TRACE_LOCK_H
b283666f
PW
8
9#include <linux/lockdep.h>
3b4aafcb 10#include <lttng/tracepoint-event.h>
b283666f
PW
11
12#ifdef CONFIG_LOCKDEP
13
3bc29f0a 14LTTNG_TRACEPOINT_EVENT(lock_acquire,
b283666f
PW
15
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),
19
20 TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip),
21
f127e61e
MD
22 TP_FIELDS(
23 ctf_integer(unsigned int, flags, (trylock ? 1 : 0) | (read ? 2 : 0))
24 ctf_string(name, lock->name)
fa91fcac 25 ctf_integer_hex(void *, lockdep_addr, lock)
f127e61e 26 )
b283666f
PW
27)
28
3bc29f0a 29LTTNG_TRACEPOINT_EVENT_CLASS(lock,
b283666f
PW
30
31 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
32
33 TP_ARGS(lock, ip),
34
f127e61e
MD
35 TP_FIELDS(
36 ctf_string(name, lock->name)
fa91fcac 37 ctf_integer_hex(void *, lockdep_addr, lock)
f127e61e 38 )
b283666f
PW
39)
40
3bc29f0a 41LTTNG_TRACEPOINT_EVENT_INSTANCE(lock, lock_release,
b283666f
PW
42
43 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
44
45 TP_ARGS(lock, ip)
46)
47
48#ifdef CONFIG_LOCK_STAT
49
3bc29f0a 50LTTNG_TRACEPOINT_EVENT_INSTANCE(lock, lock_contended,
b283666f
PW
51
52 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
53
54 TP_ARGS(lock, ip)
55)
56
3bc29f0a 57LTTNG_TRACEPOINT_EVENT_INSTANCE(lock, lock_acquired,
b283666f
PW
58
59 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
60
61 TP_ARGS(lock, ip)
62)
63
82ccabf3 64#endif /* CONFIG_LOCK_STAT */
7c68b363 65
82ccabf3 66#endif /* CONFIG_LOCKDEP */
b283666f 67
3bc29f0a 68#endif /* LTTNG_TRACE_LOCK_H */
b283666f
PW
69
70/* This part must be outside protection */
3b4aafcb 71#include <lttng/define_trace.h>
This page took 0.038288 seconds and 4 git commands to generate.