1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #define TRACE_SYSTEM jbd
5 #if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_JBD_H
8 #include <lttng/tracepoint-event.h>
10 #include <lttng/kernel-version.h>
12 LTTNG_TRACEPOINT_EVENT(jbd_checkpoint
,
14 TP_PROTO(journal_t
*journal
, int result
),
16 TP_ARGS(journal
, result
),
19 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
20 ctf_integer(int, result
, result
)
24 LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit
,
26 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
28 TP_ARGS(journal
, commit_transaction
),
31 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
32 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
36 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_start_commit
,
38 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
40 TP_ARGS(journal
, commit_transaction
)
43 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_locking
,
45 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
47 TP_ARGS(journal
, commit_transaction
)
50 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_flushing
,
52 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
54 TP_ARGS(journal
, commit_transaction
)
57 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_logging
,
59 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
61 TP_ARGS(journal
, commit_transaction
)
64 LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction
,
66 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
68 TP_ARGS(journal
, commit_transaction
),
71 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
72 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
76 LTTNG_TRACEPOINT_EVENT(jbd_end_commit
,
77 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
79 TP_ARGS(journal
, commit_transaction
),
82 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
83 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
84 ctf_integer(int, head
, journal
->j_tail_sequence
)
88 LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data
,
89 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
91 TP_ARGS(journal
, commit_transaction
),
94 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
95 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
99 LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail
,
101 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
102 unsigned long block_nr
, unsigned long freed
),
104 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
107 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
108 ctf_integer(tid_t
, tail_sequence
, journal
->j_tail_sequence
)
109 ctf_integer(tid_t
, first_tid
, first_tid
)
110 ctf_integer(unsigned long, block_nr
, block_nr
)
111 ctf_integer(unsigned long, freed
, freed
)
115 LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock
,
117 jbd_journal_write_superblock
,
119 TP_PROTO(journal_t
*journal
, int write_op
),
121 TP_ARGS(journal
, write_op
),
124 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
125 ctf_integer(int, write_op
, write_op
)
129 #endif /* LTTNG_TRACE_JBD_H */
131 /* This part must be outside protection */
132 #include <lttng/define_trace.h>