]>
git.proxmox.com Git - mirror_ubuntu-kernels.git/blob - include/trace/events/lockdep.h
45e326b5c7f3e69b81e1453782090e3b7c903433
1 #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _TRACE_LOCKDEP_H
4 #include <linux/lockdep.h>
5 #include <linux/tracepoint.h>
8 #define TRACE_SYSTEM lockdep
12 TRACE_FORMAT(lock_acquire
,
13 TP_PROTO(struct lockdep_map
*lock
, unsigned int subclass
,
14 int trylock
, int read
, int check
,
15 struct lockdep_map
*next_lock
, unsigned long ip
),
16 TP_ARGS(lock
, subclass
, trylock
, read
, check
, next_lock
, ip
),
17 TP_FMT("%s%s%s", trylock
? "try " : "",
18 read
? "read " : "", lock
->name
)
21 TRACE_FORMAT(lock_release
,
22 TP_PROTO(struct lockdep_map
*lock
, int nested
, unsigned long ip
),
23 TP_ARGS(lock
, nested
, ip
),
24 TP_FMT("%s", lock
->name
)
27 #ifdef CONFIG_LOCK_STAT
29 TRACE_FORMAT(lock_contended
,
30 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
),
32 TP_FMT("%s", lock
->name
)
35 TRACE_EVENT(lock_acquired
,
36 TP_PROTO(struct lockdep_map
*lock
, unsigned long ip
, s64 waittime
),
38 TP_ARGS(lock
, ip
, waittime
),
41 __field(const char *, name
)
42 __field(unsigned long, wait_usec
)
43 __field(unsigned long, wait_nsec_rem
)
46 __entry
->name
= lock
->name
;
47 __entry
->wait_nsec_rem
= do_div(waittime
, NSEC_PER_USEC
);
48 __entry
->wait_usec
= (unsigned long) waittime
;
50 TP_printk("%s (%lu.%03lu us)", __entry
->name
, __entry
->wait_usec
,
51 __entry
->wait_nsec_rem
)
57 #endif /* _TRACE_LOCKDEP_H */
59 /* This part must be outside protection */
60 #include <trace/define_trace.h>