d11da78dc961bc43ca6906143bff28ebdf761314
[lttng-modules.git] / include / instrumentation / events / jbd.h
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 jbd
7
8 #if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_JBD_H
10
11 #include <lttng/tracepoint-event.h>
12 #include <linux/jbd.h>
13 #include <lttng/kernel-version.h>
14
15 LTTNG_TRACEPOINT_EVENT(jbd_checkpoint,
16
17 TP_PROTO(journal_t *journal, int result),
18
19 TP_ARGS(journal, result),
20
21 TP_FIELDS(
22 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
23 ctf_integer(int, result, result)
24 )
25 )
26
27 LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit,
28
29 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
30
31 TP_ARGS(journal, commit_transaction),
32
33 TP_FIELDS(
34 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
35 ctf_integer(int, transaction, commit_transaction->t_tid)
36 )
37 )
38
39 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_start_commit,
40
41 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
42
43 TP_ARGS(journal, commit_transaction)
44 )
45
46 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_locking,
47
48 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
49
50 TP_ARGS(journal, commit_transaction)
51 )
52
53 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_flushing,
54
55 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
56
57 TP_ARGS(journal, commit_transaction)
58 )
59
60 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_logging,
61
62 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
63
64 TP_ARGS(journal, commit_transaction)
65 )
66
67 LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction,
68
69 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
70
71 TP_ARGS(journal, commit_transaction),
72
73 TP_FIELDS(
74 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
75 ctf_integer(int, transaction, commit_transaction->t_tid)
76 )
77 )
78
79 LTTNG_TRACEPOINT_EVENT(jbd_end_commit,
80 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
81
82 TP_ARGS(journal, commit_transaction),
83
84 TP_FIELDS(
85 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
86 ctf_integer(int, transaction, commit_transaction->t_tid)
87 ctf_integer(int, head, journal->j_tail_sequence)
88 )
89 )
90
91 LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data,
92 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
93
94 TP_ARGS(journal, commit_transaction),
95
96 TP_FIELDS(
97 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
98 ctf_integer(int, transaction, commit_transaction->t_tid)
99 )
100 )
101
102 LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail,
103
104 TP_PROTO(journal_t *journal, tid_t first_tid,
105 unsigned long block_nr, unsigned long freed),
106
107 TP_ARGS(journal, first_tid, block_nr, freed),
108
109 TP_FIELDS(
110 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
111 ctf_integer(tid_t, tail_sequence, journal->j_tail_sequence)
112 ctf_integer(tid_t, first_tid, first_tid)
113 ctf_integer(unsigned long, block_nr, block_nr)
114 ctf_integer(unsigned long, freed, freed)
115 )
116 )
117
118 LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock,
119
120 jbd_journal_write_superblock,
121
122 TP_PROTO(journal_t *journal, int write_op),
123
124 TP_ARGS(journal, write_op),
125
126 TP_FIELDS(
127 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
128 ctf_integer(int, write_op, write_op)
129 )
130 )
131
132 #endif /* LTTNG_TRACE_JBD_H */
133
134 /* This part must be outside protection */
135 #include <lttng/define_trace.h>
This page took 0.039401 seconds and 5 git commands to generate.