Fix: scsi: sd: Atomic write support added in 6.11-rc1
[lttng-modules.git] / include / instrumentation / events / lock.h
... / ...
CommitLineData
1// SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#undef TRACE_SYSTEM
6#define TRACE_SYSTEM lock
7
8#if !defined(LTTNG_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
9#define LTTNG_TRACE_LOCK_H
10
11#include <linux/lockdep.h>
12#include <lttng/tracepoint-event.h>
13
14#ifdef CONFIG_LOCKDEP
15
16LTTNG_TRACEPOINT_EVENT(lock_acquire,
17
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),
21
22 TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip),
23
24 TP_FIELDS(
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)
28 )
29)
30
31LTTNG_TRACEPOINT_EVENT_CLASS(lock,
32
33 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
34
35 TP_ARGS(lock, ip),
36
37 TP_FIELDS(
38 ctf_string(name, lock->name)
39 ctf_integer_hex(void *, lockdep_addr, lock)
40 )
41)
42
43LTTNG_TRACEPOINT_EVENT_INSTANCE(lock, lock_release,
44
45 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
46
47 TP_ARGS(lock, ip)
48)
49
50#ifdef CONFIG_LOCK_STAT
51
52LTTNG_TRACEPOINT_EVENT_INSTANCE(lock, lock_contended,
53
54 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
55
56 TP_ARGS(lock, ip)
57)
58
59LTTNG_TRACEPOINT_EVENT_INSTANCE(lock, lock_acquired,
60
61 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
62
63 TP_ARGS(lock, ip)
64)
65
66#endif /* CONFIG_LOCK_STAT */
67
68#endif /* CONFIG_LOCKDEP */
69
70#endif /* LTTNG_TRACE_LOCK_H */
71
72/* This part must be outside protection */
73#include <lttng/define_trace.h>
This page took 0.025888 seconds and 5 git commands to generate.