nilfs2: add a tracepoint for tracking stage transition of segment construction
[deliverable/linux.git] / include / trace / events / nilfs2.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM nilfs2
3
4 #if !defined(_TRACE_NILFS2_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_NILFS2_H
6
7 #include <linux/tracepoint.h>
8
9 struct nilfs_sc_info;
10
11 #define show_collection_stage(type) \
12 __print_symbolic(type, \
13 { NILFS_ST_INIT, "ST_INIT" }, \
14 { NILFS_ST_GC, "ST_GC" }, \
15 { NILFS_ST_FILE, "ST_FILE" }, \
16 { NILFS_ST_IFILE, "ST_IFILE" }, \
17 { NILFS_ST_CPFILE, "ST_CPFILE" }, \
18 { NILFS_ST_SUFILE, "ST_SUFILE" }, \
19 { NILFS_ST_DAT, "ST_DAT" }, \
20 { NILFS_ST_SR, "ST_SR" }, \
21 { NILFS_ST_DSYNC, "ST_DSYNC" }, \
22 { NILFS_ST_DONE, "ST_DONE"})
23
24 TRACE_EVENT(nilfs2_collection_stage_transition,
25
26 TP_PROTO(struct nilfs_sc_info *sci),
27
28 TP_ARGS(sci),
29
30 TP_STRUCT__entry(
31 __field(void *, sci)
32 __field(int, stage)
33 ),
34
35 TP_fast_assign(
36 __entry->sci = sci;
37 __entry->stage = sci->sc_stage.scnt;
38 ),
39
40 TP_printk("sci = %p stage = %s",
41 __entry->sci,
42 show_collection_stage(__entry->stage))
43 );
44
45 #endif /* _TRACE_NILFS2_H */
46
47 /* This part must be outside protection */
48 #undef TRACE_INCLUDE_FILE
49 #define TRACE_INCLUDE_FILE nilfs2
50 #include <trace/define_trace.h>
This page took 0.045587 seconds and 5 git commands to generate.