1 // SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
3 // SPDX-License-Identifier: GPL-2.0-only
6 #define TRACE_SYSTEM jbd
8 #if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_JBD_H
11 #include <lttng/tracepoint-event.h>
12 #include <linux/jbd.h>
13 #include <lttng/kernel-version.h>
15 LTTNG_TRACEPOINT_EVENT(jbd_checkpoint
,
17 TP_PROTO(journal_t
*journal
, int result
),
19 TP_ARGS(journal
, result
),
22 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
23 ctf_integer(int, result
, result
)
27 LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit
,
29 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
31 TP_ARGS(journal
, commit_transaction
),
34 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
35 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
39 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_start_commit
,
41 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
43 TP_ARGS(journal
, commit_transaction
)
46 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_locking
,
48 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
50 TP_ARGS(journal
, commit_transaction
)
53 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_flushing
,
55 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
57 TP_ARGS(journal
, commit_transaction
)
60 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_logging
,
62 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
64 TP_ARGS(journal
, commit_transaction
)
67 LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction
,
69 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
71 TP_ARGS(journal
, commit_transaction
),
74 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
75 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
79 LTTNG_TRACEPOINT_EVENT(jbd_end_commit
,
80 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
82 TP_ARGS(journal
, commit_transaction
),
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
)
91 LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data
,
92 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
94 TP_ARGS(journal
, commit_transaction
),
97 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
98 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
102 LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail
,
104 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
105 unsigned long block_nr
, unsigned long freed
),
107 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
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
)
118 LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock
,
120 jbd_journal_write_superblock
,
122 TP_PROTO(journal_t
*journal
, int write_op
),
124 TP_ARGS(journal
, write_op
),
127 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
128 ctf_integer(int, write_op
, write_op
)
132 #endif /* LTTNG_TRACE_JBD_H */
134 /* This part must be outside protection */
135 #include <lttng/define_trace.h>