WIP FPC-III support
[linux/fpc-iii.git] / include / trace / events / mmap_lock.h
blob0abff67b96f09a84e89e29d360103ce328d5ac96
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 extern int trace_mmap_lock_reg(void);
14 extern void trace_mmap_lock_unreg(void);
16 TRACE_EVENT_FN(mmap_lock_start_locking,
18 TP_PROTO(struct mm_struct *mm, const char *memcg_path, bool write),
20 TP_ARGS(mm, memcg_path, write),
22 TP_STRUCT__entry(
23 __field(struct mm_struct *, mm)
24 __string(memcg_path, memcg_path)
25 __field(bool, write)
28 TP_fast_assign(
29 __entry->mm = mm;
30 __assign_str(memcg_path, memcg_path);
31 __entry->write = write;
34 TP_printk(
35 "mm=%p memcg_path=%s write=%s\n",
36 __entry->mm,
37 __get_str(memcg_path),
38 __entry->write ? "true" : "false"
41 trace_mmap_lock_reg, trace_mmap_lock_unreg
44 TRACE_EVENT_FN(mmap_lock_acquire_returned,
46 TP_PROTO(struct mm_struct *mm, const char *memcg_path, bool write,
47 bool success),
49 TP_ARGS(mm, memcg_path, write, success),
51 TP_STRUCT__entry(
52 __field(struct mm_struct *, mm)
53 __string(memcg_path, memcg_path)
54 __field(bool, write)
55 __field(bool, success)
58 TP_fast_assign(
59 __entry->mm = mm;
60 __assign_str(memcg_path, memcg_path);
61 __entry->write = write;
62 __entry->success = success;
65 TP_printk(
66 "mm=%p memcg_path=%s write=%s success=%s\n",
67 __entry->mm,
68 __get_str(memcg_path),
69 __entry->write ? "true" : "false",
70 __entry->success ? "true" : "false"
73 trace_mmap_lock_reg, trace_mmap_lock_unreg
76 TRACE_EVENT_FN(mmap_lock_released,
78 TP_PROTO(struct mm_struct *mm, const char *memcg_path, bool write),
80 TP_ARGS(mm, memcg_path, write),
82 TP_STRUCT__entry(
83 __field(struct mm_struct *, mm)
84 __string(memcg_path, memcg_path)
85 __field(bool, write)
88 TP_fast_assign(
89 __entry->mm = mm;
90 __assign_str(memcg_path, memcg_path);
91 __entry->write = write;
94 TP_printk(
95 "mm=%p memcg_path=%s write=%s\n",
96 __entry->mm,
97 __get_str(memcg_path),
98 __entry->write ? "true" : "false"
101 trace_mmap_lock_reg, trace_mmap_lock_unreg
104 #endif /* _TRACE_MMAP_LOCK_H */
106 /* This part must be outside protection */
107 #include <trace/define_trace.h>