printf: Remove unused 'bprintf'
[drm/drm-misc.git] / include / trace / events / mmap_lock.h
blobbc2e3ad787b3b0d090f835c3c6d1900c9555d05d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM mmap_lock
5 #if !defined(_TRACE_MMAP_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_MMAP_LOCK_H
8 #include <linux/tracepoint.h>
9 #include <linux/types.h>
11 struct mm_struct;
13 DECLARE_EVENT_CLASS(mmap_lock,
15 TP_PROTO(struct mm_struct *mm, const char *memcg_path, bool write),
17 TP_ARGS(mm, memcg_path, write),
19 TP_STRUCT__entry(
20 __field(struct mm_struct *, mm)
21 __string(memcg_path, memcg_path)
22 __field(bool, write)
25 TP_fast_assign(
26 __entry->mm = mm;
27 __assign_str(memcg_path);
28 __entry->write = write;
31 TP_printk(
32 "mm=%p memcg_path=%s write=%s",
33 __entry->mm,
34 __get_str(memcg_path),
35 __entry->write ? "true" : "false"
39 #define DEFINE_MMAP_LOCK_EVENT(name) \
40 DEFINE_EVENT(mmap_lock, name, \
41 TP_PROTO(struct mm_struct *mm, const char *memcg_path, \
42 bool write), \
43 TP_ARGS(mm, memcg_path, write))
45 DEFINE_MMAP_LOCK_EVENT(mmap_lock_start_locking);
46 DEFINE_MMAP_LOCK_EVENT(mmap_lock_released);
48 TRACE_EVENT(mmap_lock_acquire_returned,
50 TP_PROTO(struct mm_struct *mm, const char *memcg_path, bool write,
51 bool success),
53 TP_ARGS(mm, memcg_path, write, success),
55 TP_STRUCT__entry(
56 __field(struct mm_struct *, mm)
57 __string(memcg_path, memcg_path)
58 __field(bool, write)
59 __field(bool, success)
62 TP_fast_assign(
63 __entry->mm = mm;
64 __assign_str(memcg_path);
65 __entry->write = write;
66 __entry->success = success;
69 TP_printk(
70 "mm=%p memcg_path=%s write=%s success=%s",
71 __entry->mm,
72 __get_str(memcg_path),
73 __entry->write ? "true" : "false",
74 __entry->success ? "true" : "false"
78 #endif /* _TRACE_MMAP_LOCK_H */
80 /* This part must be outside protection */
81 #include <trace/define_trace.h>