diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
| commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
| tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/trace | |
| parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) | |
Patched in Tegra support.
Diffstat (limited to 'include/trace')
31 files changed, 490 insertions, 2872 deletions
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h index 1905ca8dd39..da39b22636f 100644 --- a/include/trace/define_trace.h +++ b/include/trace/define_trace.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Trace files that want to automate creation of all tracepoints defined | 2 | * Trace files that want to automate creationg of all tracepoints defined |
| 3 | * in their file should include this file. The following are macros that the | 3 | * in their file should include this file. The following are macros that the |
| 4 | * trace file may define: | 4 | * trace file may define: |
| 5 | * | 5 | * |
| @@ -21,6 +21,16 @@ | |||
| 21 | #undef CREATE_TRACE_POINTS | 21 | #undef CREATE_TRACE_POINTS |
| 22 | 22 | ||
| 23 | #include <linux/stringify.h> | 23 | #include <linux/stringify.h> |
| 24 | /* | ||
| 25 | * module.h includes tracepoints, and because ftrace.h | ||
| 26 | * pulls in module.h: | ||
| 27 | * trace/ftrace.h -> linux/ftrace_event.h -> linux/perf_event.h -> | ||
| 28 | * linux/ftrace.h -> linux/module.h | ||
| 29 | * we must include module.h here before we play with any of | ||
| 30 | * the TRACE_EVENT() macros, otherwise the tracepoints included | ||
| 31 | * by module.h may break the build. | ||
| 32 | */ | ||
| 33 | #include <linux/module.h> | ||
| 24 | 34 | ||
| 25 | #undef TRACE_EVENT | 35 | #undef TRACE_EVENT |
| 26 | #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \ | 36 | #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \ |
diff --git a/include/trace/events/9p.h b/include/trace/events/9p.h deleted file mode 100644 index beeaed8398e..00000000000 --- a/include/trace/events/9p.h +++ /dev/null | |||
| @@ -1,176 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM 9p | ||
| 3 | |||
| 4 | #if !defined(_TRACE_9P_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_9P_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | #define show_9p_op(type) \ | ||
| 10 | __print_symbolic(type, \ | ||
| 11 | { P9_TLERROR, "P9_TLERROR" }, \ | ||
| 12 | { P9_RLERROR, "P9_RLERROR" }, \ | ||
| 13 | { P9_TSTATFS, "P9_TSTATFS" }, \ | ||
| 14 | { P9_RSTATFS, "P9_RSTATFS" }, \ | ||
| 15 | { P9_TLOPEN, "P9_TLOPEN" }, \ | ||
| 16 | { P9_RLOPEN, "P9_RLOPEN" }, \ | ||
| 17 | { P9_TLCREATE, "P9_TLCREATE" }, \ | ||
| 18 | { P9_RLCREATE, "P9_RLCREATE" }, \ | ||
| 19 | { P9_TSYMLINK, "P9_TSYMLINK" }, \ | ||
| 20 | { P9_RSYMLINK, "P9_RSYMLINK" }, \ | ||
| 21 | { P9_TMKNOD, "P9_TMKNOD" }, \ | ||
| 22 | { P9_RMKNOD, "P9_RMKNOD" }, \ | ||
| 23 | { P9_TRENAME, "P9_TRENAME" }, \ | ||
| 24 | { P9_RRENAME, "P9_RRENAME" }, \ | ||
| 25 | { P9_TREADLINK, "P9_TREADLINK" }, \ | ||
| 26 | { P9_RREADLINK, "P9_RREADLINK" }, \ | ||
| 27 | { P9_TGETATTR, "P9_TGETATTR" }, \ | ||
| 28 | { P9_RGETATTR, "P9_RGETATTR" }, \ | ||
| 29 | { P9_TSETATTR, "P9_TSETATTR" }, \ | ||
| 30 | { P9_RSETATTR, "P9_RSETATTR" }, \ | ||
| 31 | { P9_TXATTRWALK, "P9_TXATTRWALK" }, \ | ||
| 32 | { P9_RXATTRWALK, "P9_RXATTRWALK" }, \ | ||
| 33 | { P9_TXATTRCREATE, "P9_TXATTRCREATE" }, \ | ||
| 34 | { P9_RXATTRCREATE, "P9_RXATTRCREATE" }, \ | ||
| 35 | { P9_TREADDIR, "P9_TREADDIR" }, \ | ||
| 36 | { P9_RREADDIR, "P9_RREADDIR" }, \ | ||
| 37 | { P9_TFSYNC, "P9_TFSYNC" }, \ | ||
| 38 | { P9_RFSYNC, "P9_RFSYNC" }, \ | ||
| 39 | { P9_TLOCK, "P9_TLOCK" }, \ | ||
| 40 | { P9_RLOCK, "P9_RLOCK" }, \ | ||
| 41 | { P9_TGETLOCK, "P9_TGETLOCK" }, \ | ||
| 42 | { P9_RGETLOCK, "P9_RGETLOCK" }, \ | ||
| 43 | { P9_TLINK, "P9_TLINK" }, \ | ||
| 44 | { P9_RLINK, "P9_RLINK" }, \ | ||
| 45 | { P9_TMKDIR, "P9_TMKDIR" }, \ | ||
| 46 | { P9_RMKDIR, "P9_RMKDIR" }, \ | ||
| 47 | { P9_TRENAMEAT, "P9_TRENAMEAT" }, \ | ||
| 48 | { P9_RRENAMEAT, "P9_RRENAMEAT" }, \ | ||
| 49 | { P9_TUNLINKAT, "P9_TUNLINKAT" }, \ | ||
| 50 | { P9_RUNLINKAT, "P9_RUNLINKAT" }, \ | ||
| 51 | { P9_TVERSION, "P9_TVERSION" }, \ | ||
| 52 | { P9_RVERSION, "P9_RVERSION" }, \ | ||
| 53 | { P9_TAUTH, "P9_TAUTH" }, \ | ||
| 54 | { P9_RAUTH, "P9_RAUTH" }, \ | ||
| 55 | { P9_TATTACH, "P9_TATTACH" }, \ | ||
| 56 | { P9_RATTACH, "P9_RATTACH" }, \ | ||
| 57 | { P9_TERROR, "P9_TERROR" }, \ | ||
| 58 | { P9_RERROR, "P9_RERROR" }, \ | ||
| 59 | { P9_TFLUSH, "P9_TFLUSH" }, \ | ||
| 60 | { P9_RFLUSH, "P9_RFLUSH" }, \ | ||
| 61 | { P9_TWALK, "P9_TWALK" }, \ | ||
| 62 | { P9_RWALK, "P9_RWALK" }, \ | ||
| 63 | { P9_TOPEN, "P9_TOPEN" }, \ | ||
| 64 | { P9_ROPEN, "P9_ROPEN" }, \ | ||
| 65 | { P9_TCREATE, "P9_TCREATE" }, \ | ||
| 66 | { P9_RCREATE, "P9_RCREATE" }, \ | ||
| 67 | { P9_TREAD, "P9_TREAD" }, \ | ||
| 68 | { P9_RREAD, "P9_RREAD" }, \ | ||
| 69 | { P9_TWRITE, "P9_TWRITE" }, \ | ||
| 70 | { P9_RWRITE, "P9_RWRITE" }, \ | ||
| 71 | { P9_TCLUNK, "P9_TCLUNK" }, \ | ||
| 72 | { P9_RCLUNK, "P9_RCLUNK" }, \ | ||
| 73 | { P9_TREMOVE, "P9_TREMOVE" }, \ | ||
| 74 | { P9_RREMOVE, "P9_RREMOVE" }, \ | ||
| 75 | { P9_TSTAT, "P9_TSTAT" }, \ | ||
| 76 | { P9_RSTAT, "P9_RSTAT" }, \ | ||
| 77 | { P9_TWSTAT, "P9_TWSTAT" }, \ | ||
| 78 | { P9_RWSTAT, "P9_RWSTAT" }) | ||
| 79 | |||
| 80 | TRACE_EVENT(9p_client_req, | ||
| 81 | TP_PROTO(struct p9_client *clnt, int8_t type, int tag), | ||
| 82 | |||
| 83 | TP_ARGS(clnt, type, tag), | ||
| 84 | |||
| 85 | TP_STRUCT__entry( | ||
| 86 | __field( void *, clnt ) | ||
| 87 | __field( __u8, type ) | ||
| 88 | __field( __u32, tag ) | ||
| 89 | ), | ||
| 90 | |||
| 91 | TP_fast_assign( | ||
| 92 | __entry->clnt = clnt; | ||
| 93 | __entry->type = type; | ||
| 94 | __entry->tag = tag; | ||
| 95 | ), | ||
| 96 | |||
| 97 | TP_printk("client %lu request %s tag %d", | ||
| 98 | (long)__entry->clnt, show_9p_op(__entry->type), | ||
| 99 | __entry->tag) | ||
| 100 | ); | ||
| 101 | |||
| 102 | TRACE_EVENT(9p_client_res, | ||
| 103 | TP_PROTO(struct p9_client *clnt, int8_t type, int tag, int err), | ||
| 104 | |||
| 105 | TP_ARGS(clnt, type, tag, err), | ||
| 106 | |||
| 107 | TP_STRUCT__entry( | ||
| 108 | __field( void *, clnt ) | ||
| 109 | __field( __u8, type ) | ||
| 110 | __field( __u32, tag ) | ||
| 111 | __field( __u32, err ) | ||
| 112 | ), | ||
| 113 | |||
| 114 | TP_fast_assign( | ||
| 115 | __entry->clnt = clnt; | ||
| 116 | __entry->type = type; | ||
| 117 | __entry->tag = tag; | ||
| 118 | __entry->err = err; | ||
| 119 | ), | ||
| 120 | |||
| 121 | TP_printk("client %lu response %s tag %d err %d", | ||
| 122 | (long)__entry->clnt, show_9p_op(__entry->type), | ||
| 123 | __entry->tag, __entry->err) | ||
| 124 | ); | ||
| 125 | |||
| 126 | /* dump 32 bytes of protocol data */ | ||
| 127 | #define P9_PROTO_DUMP_SZ 32 | ||
| 128 | TRACE_EVENT(9p_protocol_dump, | ||
| 129 | TP_PROTO(struct p9_client *clnt, struct p9_fcall *pdu), | ||
| 130 | |||
| 131 | TP_ARGS(clnt, pdu), | ||
| 132 | |||
| 133 | TP_STRUCT__entry( | ||
| 134 | __field( void *, clnt ) | ||
| 135 | __field( __u8, type ) | ||
| 136 | __field( __u16, tag ) | ||
| 137 | __array( unsigned char, line, P9_PROTO_DUMP_SZ ) | ||
| 138 | ), | ||
| 139 | |||
| 140 | TP_fast_assign( | ||
| 141 | __entry->clnt = clnt; | ||
| 142 | __entry->type = pdu->id; | ||
| 143 | __entry->tag = pdu->tag; | ||
| 144 | memcpy(__entry->line, pdu->sdata, P9_PROTO_DUMP_SZ); | ||
| 145 | ), | ||
| 146 | TP_printk("clnt %lu %s(tag = %d)\n%.3x: " | ||
| 147 | "%02x %02x %02x %02x %02x %02x %02x %02x " | ||
| 148 | "%02x %02x %02x %02x %02x %02x %02x %02x\n" | ||
| 149 | "%.3x: " | ||
| 150 | "%02x %02x %02x %02x %02x %02x %02x %02x " | ||
| 151 | "%02x %02x %02x %02x %02x %02x %02x %02x\n", | ||
| 152 | (long)__entry->clnt, show_9p_op(__entry->type), | ||
| 153 | __entry->tag, 0, | ||
| 154 | __entry->line[0], __entry->line[1], | ||
| 155 | __entry->line[2], __entry->line[3], | ||
| 156 | __entry->line[4], __entry->line[5], | ||
| 157 | __entry->line[6], __entry->line[7], | ||
| 158 | __entry->line[8], __entry->line[9], | ||
| 159 | __entry->line[10], __entry->line[11], | ||
| 160 | __entry->line[12], __entry->line[13], | ||
| 161 | __entry->line[14], __entry->line[15], | ||
| 162 | 16, | ||
| 163 | __entry->line[16], __entry->line[17], | ||
| 164 | __entry->line[18], __entry->line[19], | ||
| 165 | __entry->line[20], __entry->line[21], | ||
| 166 | __entry->line[22], __entry->line[23], | ||
| 167 | __entry->line[24], __entry->line[25], | ||
| 168 | __entry->line[26], __entry->line[27], | ||
| 169 | __entry->line[28], __entry->line[29], | ||
| 170 | __entry->line[30], __entry->line[31]) | ||
| 171 | ); | ||
| 172 | |||
| 173 | #endif /* _TRACE_9P_H */ | ||
| 174 | |||
| 175 | /* This part must be outside protection */ | ||
| 176 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index 5fc2dcdd21c..603f5a0f036 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h | |||
| @@ -7,8 +7,6 @@ | |||
| 7 | #include <linux/ktime.h> | 7 | #include <linux/ktime.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | 9 | ||
| 10 | #define DAPM_DIRECT "(direct)" | ||
| 11 | |||
| 12 | struct snd_soc_jack; | 10 | struct snd_soc_jack; |
| 13 | struct snd_soc_codec; | 11 | struct snd_soc_codec; |
| 14 | struct snd_soc_platform; | 12 | struct snd_soc_platform; |
| @@ -218,109 +216,6 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done, | |||
| 218 | 216 | ||
| 219 | ); | 217 | ); |
| 220 | 218 | ||
| 221 | TRACE_EVENT(snd_soc_dapm_walk_done, | ||
| 222 | |||
| 223 | TP_PROTO(struct snd_soc_card *card), | ||
| 224 | |||
| 225 | TP_ARGS(card), | ||
| 226 | |||
| 227 | TP_STRUCT__entry( | ||
| 228 | __string( name, card->name ) | ||
| 229 | __field( int, power_checks ) | ||
| 230 | __field( int, path_checks ) | ||
| 231 | __field( int, neighbour_checks ) | ||
| 232 | ), | ||
| 233 | |||
| 234 | TP_fast_assign( | ||
| 235 | __assign_str(name, card->name); | ||
| 236 | __entry->power_checks = card->dapm_stats.power_checks; | ||
| 237 | __entry->path_checks = card->dapm_stats.path_checks; | ||
| 238 | __entry->neighbour_checks = card->dapm_stats.neighbour_checks; | ||
| 239 | ), | ||
| 240 | |||
| 241 | TP_printk("%s: checks %d power, %d path, %d neighbour", | ||
| 242 | __get_str(name), (int)__entry->power_checks, | ||
| 243 | (int)__entry->path_checks, (int)__entry->neighbour_checks) | ||
| 244 | ); | ||
| 245 | |||
| 246 | TRACE_EVENT(snd_soc_dapm_output_path, | ||
| 247 | |||
| 248 | TP_PROTO(struct snd_soc_dapm_widget *widget, | ||
| 249 | struct snd_soc_dapm_path *path), | ||
| 250 | |||
| 251 | TP_ARGS(widget, path), | ||
| 252 | |||
| 253 | TP_STRUCT__entry( | ||
| 254 | __string( wname, widget->name ) | ||
| 255 | __string( pname, path->name ? path->name : DAPM_DIRECT) | ||
| 256 | __string( psname, path->sink->name ) | ||
| 257 | __field( int, path_sink ) | ||
| 258 | __field( int, path_connect ) | ||
| 259 | ), | ||
| 260 | |||
| 261 | TP_fast_assign( | ||
| 262 | __assign_str(wname, widget->name); | ||
| 263 | __assign_str(pname, path->name ? path->name : DAPM_DIRECT); | ||
| 264 | __assign_str(psname, path->sink->name); | ||
| 265 | __entry->path_connect = path->connect; | ||
| 266 | __entry->path_sink = (long)path->sink; | ||
| 267 | ), | ||
| 268 | |||
| 269 | TP_printk("%c%s -> %s -> %s\n", | ||
| 270 | (int) __entry->path_sink && | ||
| 271 | (int) __entry->path_connect ? '*' : ' ', | ||
| 272 | __get_str(wname), __get_str(pname), __get_str(psname)) | ||
| 273 | ); | ||
| 274 | |||
| 275 | TRACE_EVENT(snd_soc_dapm_input_path, | ||
| 276 | |||
| 277 | TP_PROTO(struct snd_soc_dapm_widget *widget, | ||
| 278 | struct snd_soc_dapm_path *path), | ||
| 279 | |||
| 280 | TP_ARGS(widget, path), | ||
| 281 | |||
| 282 | TP_STRUCT__entry( | ||
| 283 | __string( wname, widget->name ) | ||
| 284 | __string( pname, path->name ? path->name : DAPM_DIRECT) | ||
| 285 | __string( psname, path->source->name ) | ||
| 286 | __field( int, path_source ) | ||
| 287 | __field( int, path_connect ) | ||
| 288 | ), | ||
| 289 | |||
| 290 | TP_fast_assign( | ||
| 291 | __assign_str(wname, widget->name); | ||
| 292 | __assign_str(pname, path->name ? path->name : DAPM_DIRECT); | ||
| 293 | __assign_str(psname, path->source->name); | ||
| 294 | __entry->path_connect = path->connect; | ||
| 295 | __entry->path_source = (long)path->source; | ||
| 296 | ), | ||
| 297 | |||
| 298 | TP_printk("%c%s <- %s <- %s\n", | ||
| 299 | (int) __entry->path_source && | ||
| 300 | (int) __entry->path_connect ? '*' : ' ', | ||
| 301 | __get_str(wname), __get_str(pname), __get_str(psname)) | ||
| 302 | ); | ||
| 303 | |||
| 304 | TRACE_EVENT(snd_soc_dapm_connected, | ||
| 305 | |||
| 306 | TP_PROTO(int paths, int stream), | ||
| 307 | |||
| 308 | TP_ARGS(paths, stream), | ||
| 309 | |||
| 310 | TP_STRUCT__entry( | ||
| 311 | __field( int, paths ) | ||
| 312 | __field( int, stream ) | ||
| 313 | ), | ||
| 314 | |||
| 315 | TP_fast_assign( | ||
| 316 | __entry->paths = paths; | ||
| 317 | __entry->stream = stream; | ||
| 318 | ), | ||
| 319 | |||
| 320 | TP_printk("%s: found %d paths\n", | ||
| 321 | __entry->stream ? "capture" : "playback", __entry->paths) | ||
| 322 | ); | ||
| 323 | |||
| 324 | TRACE_EVENT(snd_soc_jack_irq, | 219 | TRACE_EVENT(snd_soc_jack_irq, |
| 325 | 220 | ||
| 326 | TP_PROTO(const char *name), | 221 | TP_PROTO(const char *name), |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index ea546a4e960..b31702ac15b 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | #include <trace/events/gfpflags.h> | ||
| 10 | 9 | ||
| 11 | struct btrfs_root; | 10 | struct btrfs_root; |
| 12 | struct btrfs_fs_info; | 11 | struct btrfs_fs_info; |
| @@ -17,8 +16,6 @@ struct btrfs_delayed_ref_node; | |||
| 17 | struct btrfs_delayed_tree_ref; | 16 | struct btrfs_delayed_tree_ref; |
| 18 | struct btrfs_delayed_data_ref; | 17 | struct btrfs_delayed_data_ref; |
| 19 | struct btrfs_delayed_ref_head; | 18 | struct btrfs_delayed_ref_head; |
| 20 | struct btrfs_block_group_cache; | ||
| 21 | struct btrfs_free_cluster; | ||
| 22 | struct map_lookup; | 19 | struct map_lookup; |
| 23 | struct extent_buffer; | 20 | struct extent_buffer; |
| 24 | 21 | ||
| @@ -45,19 +42,7 @@ struct extent_buffer; | |||
| 45 | 42 | ||
| 46 | #define show_root_type(obj) \ | 43 | #define show_root_type(obj) \ |
| 47 | obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ | 44 | obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ |
| 48 | (obj >= BTRFS_ROOT_TREE_OBJECTID && \ | 45 | (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-" |
| 49 | obj <= BTRFS_CSUM_TREE_OBJECTID)) ? __show_root_type(obj) : "-" | ||
| 50 | |||
| 51 | #define BTRFS_GROUP_FLAGS \ | ||
| 52 | { BTRFS_BLOCK_GROUP_DATA, "DATA"}, \ | ||
| 53 | { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \ | ||
| 54 | { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \ | ||
| 55 | { BTRFS_BLOCK_GROUP_RAID0, "RAID0"}, \ | ||
| 56 | { BTRFS_BLOCK_GROUP_RAID1, "RAID1"}, \ | ||
| 57 | { BTRFS_BLOCK_GROUP_DUP, "DUP"}, \ | ||
| 58 | { BTRFS_BLOCK_GROUP_RAID10, "RAID10"} | ||
| 59 | |||
| 60 | #define BTRFS_UUID_SIZE 16 | ||
| 61 | 46 | ||
| 62 | TRACE_EVENT(btrfs_transaction_commit, | 47 | TRACE_EVENT(btrfs_transaction_commit, |
| 63 | 48 | ||
| @@ -446,7 +431,6 @@ TRACE_EVENT(btrfs_delayed_tree_ref, | |||
| 446 | __field( u64, ref_root ) | 431 | __field( u64, ref_root ) |
| 447 | __field( int, level ) | 432 | __field( int, level ) |
| 448 | __field( int, type ) | 433 | __field( int, type ) |
| 449 | __field( u64, seq ) | ||
| 450 | ), | 434 | ), |
| 451 | 435 | ||
| 452 | TP_fast_assign( | 436 | TP_fast_assign( |
| @@ -457,19 +441,17 @@ TRACE_EVENT(btrfs_delayed_tree_ref, | |||
| 457 | __entry->ref_root = full_ref->root; | 441 | __entry->ref_root = full_ref->root; |
| 458 | __entry->level = full_ref->level; | 442 | __entry->level = full_ref->level; |
| 459 | __entry->type = ref->type; | 443 | __entry->type = ref->type; |
| 460 | __entry->seq = ref->seq; | ||
| 461 | ), | 444 | ), |
| 462 | 445 | ||
| 463 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | 446 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " |
| 464 | "parent = %llu(%s), ref_root = %llu(%s), level = %d, " | 447 | "parent = %llu(%s), ref_root = %llu(%s), level = %d, " |
| 465 | "type = %s, seq = %llu", | 448 | "type = %s", |
| 466 | (unsigned long long)__entry->bytenr, | 449 | (unsigned long long)__entry->bytenr, |
| 467 | (unsigned long long)__entry->num_bytes, | 450 | (unsigned long long)__entry->num_bytes, |
| 468 | show_ref_action(__entry->action), | 451 | show_ref_action(__entry->action), |
| 469 | show_root_type(__entry->parent), | 452 | show_root_type(__entry->parent), |
| 470 | show_root_type(__entry->ref_root), | 453 | show_root_type(__entry->ref_root), |
| 471 | __entry->level, show_ref_type(__entry->type), | 454 | __entry->level, show_ref_type(__entry->type)) |
| 472 | (unsigned long long)__entry->seq) | ||
| 473 | ); | 455 | ); |
| 474 | 456 | ||
| 475 | TRACE_EVENT(btrfs_delayed_data_ref, | 457 | TRACE_EVENT(btrfs_delayed_data_ref, |
| @@ -489,7 +471,6 @@ TRACE_EVENT(btrfs_delayed_data_ref, | |||
| 489 | __field( u64, owner ) | 471 | __field( u64, owner ) |
| 490 | __field( u64, offset ) | 472 | __field( u64, offset ) |
| 491 | __field( int, type ) | 473 | __field( int, type ) |
| 492 | __field( u64, seq ) | ||
| 493 | ), | 474 | ), |
| 494 | 475 | ||
| 495 | TP_fast_assign( | 476 | TP_fast_assign( |
| @@ -501,12 +482,11 @@ TRACE_EVENT(btrfs_delayed_data_ref, | |||
| 501 | __entry->owner = full_ref->objectid; | 482 | __entry->owner = full_ref->objectid; |
| 502 | __entry->offset = full_ref->offset; | 483 | __entry->offset = full_ref->offset; |
| 503 | __entry->type = ref->type; | 484 | __entry->type = ref->type; |
| 504 | __entry->seq = ref->seq; | ||
| 505 | ), | 485 | ), |
| 506 | 486 | ||
| 507 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | 487 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " |
| 508 | "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, " | 488 | "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, " |
| 509 | "offset = %llu, type = %s, seq = %llu", | 489 | "offset = %llu, type = %s", |
| 510 | (unsigned long long)__entry->bytenr, | 490 | (unsigned long long)__entry->bytenr, |
| 511 | (unsigned long long)__entry->num_bytes, | 491 | (unsigned long long)__entry->num_bytes, |
| 512 | show_ref_action(__entry->action), | 492 | show_ref_action(__entry->action), |
| @@ -514,8 +494,7 @@ TRACE_EVENT(btrfs_delayed_data_ref, | |||
| 514 | show_root_type(__entry->ref_root), | 494 | show_root_type(__entry->ref_root), |
| 515 | (unsigned long long)__entry->owner, | 495 | (unsigned long long)__entry->owner, |
| 516 | (unsigned long long)__entry->offset, | 496 | (unsigned long long)__entry->offset, |
| 517 | show_ref_type(__entry->type), | 497 | show_ref_type(__entry->type)) |
| 518 | (unsigned long long)__entry->seq) | ||
| 519 | ); | 498 | ); |
| 520 | 499 | ||
| 521 | TRACE_EVENT(btrfs_delayed_ref_head, | 500 | TRACE_EVENT(btrfs_delayed_ref_head, |
| @@ -642,34 +621,6 @@ TRACE_EVENT(btrfs_cow_block, | |||
| 642 | __entry->cow_level) | 621 | __entry->cow_level) |
| 643 | ); | 622 | ); |
| 644 | 623 | ||
| 645 | TRACE_EVENT(btrfs_space_reservation, | ||
| 646 | |||
| 647 | TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val, | ||
| 648 | u64 bytes, int reserve), | ||
| 649 | |||
| 650 | TP_ARGS(fs_info, type, val, bytes, reserve), | ||
| 651 | |||
| 652 | TP_STRUCT__entry( | ||
| 653 | __array( u8, fsid, BTRFS_UUID_SIZE ) | ||
| 654 | __string( type, type ) | ||
| 655 | __field( u64, val ) | ||
| 656 | __field( u64, bytes ) | ||
| 657 | __field( int, reserve ) | ||
| 658 | ), | ||
| 659 | |||
| 660 | TP_fast_assign( | ||
| 661 | memcpy(__entry->fsid, fs_info->fsid, BTRFS_UUID_SIZE); | ||
| 662 | __assign_str(type, type); | ||
| 663 | __entry->val = val; | ||
| 664 | __entry->bytes = bytes; | ||
| 665 | __entry->reserve = reserve; | ||
| 666 | ), | ||
| 667 | |||
| 668 | TP_printk("%pU: %s: %Lu %s %Lu", __entry->fsid, __get_str(type), | ||
| 669 | __entry->val, __entry->reserve ? "reserve" : "release", | ||
| 670 | __entry->bytes) | ||
| 671 | ); | ||
| 672 | |||
| 673 | DECLARE_EVENT_CLASS(btrfs__reserved_extent, | 624 | DECLARE_EVENT_CLASS(btrfs__reserved_extent, |
| 674 | 625 | ||
| 675 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | 626 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), |
| @@ -708,211 +659,6 @@ DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_free, | |||
| 708 | TP_ARGS(root, start, len) | 659 | TP_ARGS(root, start, len) |
| 709 | ); | 660 | ); |
| 710 | 661 | ||
| 711 | TRACE_EVENT(find_free_extent, | ||
| 712 | |||
| 713 | TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size, | ||
| 714 | u64 data), | ||
| 715 | |||
| 716 | TP_ARGS(root, num_bytes, empty_size, data), | ||
| 717 | |||
| 718 | TP_STRUCT__entry( | ||
| 719 | __field( u64, root_objectid ) | ||
| 720 | __field( u64, num_bytes ) | ||
| 721 | __field( u64, empty_size ) | ||
| 722 | __field( u64, data ) | ||
| 723 | ), | ||
| 724 | |||
| 725 | TP_fast_assign( | ||
| 726 | __entry->root_objectid = root->root_key.objectid; | ||
| 727 | __entry->num_bytes = num_bytes; | ||
| 728 | __entry->empty_size = empty_size; | ||
| 729 | __entry->data = data; | ||
| 730 | ), | ||
| 731 | |||
| 732 | TP_printk("root = %Lu(%s), len = %Lu, empty_size = %Lu, " | ||
| 733 | "flags = %Lu(%s)", show_root_type(__entry->root_objectid), | ||
| 734 | __entry->num_bytes, __entry->empty_size, __entry->data, | ||
| 735 | __print_flags((unsigned long)__entry->data, "|", | ||
| 736 | BTRFS_GROUP_FLAGS)) | ||
| 737 | ); | ||
| 738 | |||
| 739 | DECLARE_EVENT_CLASS(btrfs__reserve_extent, | ||
| 740 | |||
| 741 | TP_PROTO(struct btrfs_root *root, | ||
| 742 | struct btrfs_block_group_cache *block_group, u64 start, | ||
| 743 | u64 len), | ||
| 744 | |||
| 745 | TP_ARGS(root, block_group, start, len), | ||
| 746 | |||
| 747 | TP_STRUCT__entry( | ||
| 748 | __field( u64, root_objectid ) | ||
| 749 | __field( u64, bg_objectid ) | ||
| 750 | __field( u64, flags ) | ||
| 751 | __field( u64, start ) | ||
| 752 | __field( u64, len ) | ||
| 753 | ), | ||
| 754 | |||
| 755 | TP_fast_assign( | ||
| 756 | __entry->root_objectid = root->root_key.objectid; | ||
| 757 | __entry->bg_objectid = block_group->key.objectid; | ||
| 758 | __entry->flags = block_group->flags; | ||
| 759 | __entry->start = start; | ||
| 760 | __entry->len = len; | ||
| 761 | ), | ||
| 762 | |||
| 763 | TP_printk("root = %Lu(%s), block_group = %Lu, flags = %Lu(%s), " | ||
| 764 | "start = %Lu, len = %Lu", | ||
| 765 | show_root_type(__entry->root_objectid), __entry->bg_objectid, | ||
| 766 | __entry->flags, __print_flags((unsigned long)__entry->flags, | ||
| 767 | "|", BTRFS_GROUP_FLAGS), | ||
| 768 | __entry->start, __entry->len) | ||
| 769 | ); | ||
| 770 | |||
| 771 | DEFINE_EVENT(btrfs__reserve_extent, btrfs_reserve_extent, | ||
| 772 | |||
| 773 | TP_PROTO(struct btrfs_root *root, | ||
| 774 | struct btrfs_block_group_cache *block_group, u64 start, | ||
| 775 | u64 len), | ||
| 776 | |||
| 777 | TP_ARGS(root, block_group, start, len) | ||
| 778 | ); | ||
| 779 | |||
| 780 | DEFINE_EVENT(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | ||
| 781 | |||
| 782 | TP_PROTO(struct btrfs_root *root, | ||
| 783 | struct btrfs_block_group_cache *block_group, u64 start, | ||
| 784 | u64 len), | ||
| 785 | |||
| 786 | TP_ARGS(root, block_group, start, len) | ||
| 787 | ); | ||
| 788 | |||
| 789 | TRACE_EVENT(btrfs_find_cluster, | ||
| 790 | |||
| 791 | TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start, | ||
| 792 | u64 bytes, u64 empty_size, u64 min_bytes), | ||
| 793 | |||
| 794 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | ||
| 795 | |||
| 796 | TP_STRUCT__entry( | ||
| 797 | __field( u64, bg_objectid ) | ||
| 798 | __field( u64, flags ) | ||
| 799 | __field( u64, start ) | ||
| 800 | __field( u64, bytes ) | ||
| 801 | __field( u64, empty_size ) | ||
| 802 | __field( u64, min_bytes ) | ||
| 803 | ), | ||
| 804 | |||
| 805 | TP_fast_assign( | ||
| 806 | __entry->bg_objectid = block_group->key.objectid; | ||
| 807 | __entry->flags = block_group->flags; | ||
| 808 | __entry->start = start; | ||
| 809 | __entry->bytes = bytes; | ||
| 810 | __entry->empty_size = empty_size; | ||
| 811 | __entry->min_bytes = min_bytes; | ||
| 812 | ), | ||
| 813 | |||
| 814 | TP_printk("block_group = %Lu, flags = %Lu(%s), start = %Lu, len = %Lu," | ||
| 815 | " empty_size = %Lu, min_bytes = %Lu", __entry->bg_objectid, | ||
| 816 | __entry->flags, | ||
| 817 | __print_flags((unsigned long)__entry->flags, "|", | ||
| 818 | BTRFS_GROUP_FLAGS), __entry->start, | ||
| 819 | __entry->bytes, __entry->empty_size, __entry->min_bytes) | ||
| 820 | ); | ||
| 821 | |||
| 822 | TRACE_EVENT(btrfs_failed_cluster_setup, | ||
| 823 | |||
| 824 | TP_PROTO(struct btrfs_block_group_cache *block_group), | ||
| 825 | |||
| 826 | TP_ARGS(block_group), | ||
| 827 | |||
| 828 | TP_STRUCT__entry( | ||
| 829 | __field( u64, bg_objectid ) | ||
| 830 | ), | ||
| 831 | |||
| 832 | TP_fast_assign( | ||
| 833 | __entry->bg_objectid = block_group->key.objectid; | ||
| 834 | ), | ||
| 835 | |||
| 836 | TP_printk("block_group = %Lu", __entry->bg_objectid) | ||
| 837 | ); | ||
| 838 | |||
| 839 | TRACE_EVENT(btrfs_setup_cluster, | ||
| 840 | |||
| 841 | TP_PROTO(struct btrfs_block_group_cache *block_group, | ||
| 842 | struct btrfs_free_cluster *cluster, u64 size, int bitmap), | ||
| 843 | |||
| 844 | TP_ARGS(block_group, cluster, size, bitmap), | ||
| 845 | |||
| 846 | TP_STRUCT__entry( | ||
| 847 | __field( u64, bg_objectid ) | ||
| 848 | __field( u64, flags ) | ||
| 849 | __field( u64, start ) | ||
| 850 | __field( u64, max_size ) | ||
| 851 | __field( u64, size ) | ||
| 852 | __field( int, bitmap ) | ||
| 853 | ), | ||
| 854 | |||
| 855 | TP_fast_assign( | ||
| 856 | __entry->bg_objectid = block_group->key.objectid; | ||
| 857 | __entry->flags = block_group->flags; | ||
| 858 | __entry->start = cluster->window_start; | ||
| 859 | __entry->max_size = cluster->max_size; | ||
| 860 | __entry->size = size; | ||
| 861 | __entry->bitmap = bitmap; | ||
| 862 | ), | ||
| 863 | |||
| 864 | TP_printk("block_group = %Lu, flags = %Lu(%s), window_start = %Lu, " | ||
| 865 | "size = %Lu, max_size = %Lu, bitmap = %d", | ||
| 866 | __entry->bg_objectid, | ||
| 867 | __entry->flags, | ||
| 868 | __print_flags((unsigned long)__entry->flags, "|", | ||
| 869 | BTRFS_GROUP_FLAGS), __entry->start, | ||
| 870 | __entry->size, __entry->max_size, __entry->bitmap) | ||
| 871 | ); | ||
| 872 | |||
| 873 | struct extent_state; | ||
| 874 | TRACE_EVENT(alloc_extent_state, | ||
| 875 | |||
| 876 | TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP), | ||
| 877 | |||
| 878 | TP_ARGS(state, mask, IP), | ||
| 879 | |||
| 880 | TP_STRUCT__entry( | ||
| 881 | __field(struct extent_state *, state) | ||
| 882 | __field(gfp_t, mask) | ||
| 883 | __field(unsigned long, ip) | ||
| 884 | ), | ||
| 885 | |||
| 886 | TP_fast_assign( | ||
| 887 | __entry->state = state, | ||
| 888 | __entry->mask = mask, | ||
| 889 | __entry->ip = IP | ||
| 890 | ), | ||
| 891 | |||
| 892 | TP_printk("state=%p; mask = %s; caller = %pF", __entry->state, | ||
| 893 | show_gfp_flags(__entry->mask), (void *)__entry->ip) | ||
| 894 | ); | ||
| 895 | |||
| 896 | TRACE_EVENT(free_extent_state, | ||
| 897 | |||
| 898 | TP_PROTO(struct extent_state *state, unsigned long IP), | ||
| 899 | |||
| 900 | TP_ARGS(state, IP), | ||
| 901 | |||
| 902 | TP_STRUCT__entry( | ||
| 903 | __field(struct extent_state *, state) | ||
| 904 | __field(unsigned long, ip) | ||
| 905 | ), | ||
| 906 | |||
| 907 | TP_fast_assign( | ||
| 908 | __entry->state = state, | ||
| 909 | __entry->ip = IP | ||
| 910 | ), | ||
| 911 | |||
| 912 | TP_printk(" state=%p; caller = %pF", __entry->state, | ||
| 913 | (void *)__entry->ip) | ||
| 914 | ); | ||
| 915 | |||
| 916 | #endif /* _TRACE_BTRFS_H */ | 662 | #endif /* _TRACE_BTRFS_H */ |
| 917 | 663 | ||
| 918 | /* This part must be outside protection */ | 664 | /* This part must be outside protection */ |
diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h index fde1b3e94c7..388bcdd26d4 100644 --- a/include/trace/events/compaction.h +++ b/include/trace/events/compaction.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | #include <trace/events/gfpflags.h> | 9 | #include "gfpflags.h" |
| 10 | 10 | ||
| 11 | DECLARE_EVENT_CLASS(mm_compaction_isolate_template, | 11 | DECLARE_EVENT_CLASS(mm_compaction_isolate_template, |
| 12 | 12 | ||
diff --git a/include/trace/events/ext3.h b/include/trace/events/ext3.h index 15d11a39be4..7b53c0573dc 100644 --- a/include/trace/events/ext3.h +++ b/include/trace/events/ext3.h | |||
| @@ -24,8 +24,8 @@ TRACE_EVENT(ext3_free_inode, | |||
| 24 | __entry->dev = inode->i_sb->s_dev; | 24 | __entry->dev = inode->i_sb->s_dev; |
| 25 | __entry->ino = inode->i_ino; | 25 | __entry->ino = inode->i_ino; |
| 26 | __entry->mode = inode->i_mode; | 26 | __entry->mode = inode->i_mode; |
| 27 | __entry->uid = i_uid_read(inode); | 27 | __entry->uid = inode->i_uid; |
| 28 | __entry->gid = i_gid_read(inode); | 28 | __entry->gid = inode->i_gid; |
| 29 | __entry->blocks = inode->i_blocks; | 29 | __entry->blocks = inode->i_blocks; |
| 30 | ), | 30 | ), |
| 31 | 31 | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 7e8c36bc708..b50a5473624 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
| @@ -9,13 +9,9 @@ | |||
| 9 | 9 | ||
| 10 | struct ext4_allocation_context; | 10 | struct ext4_allocation_context; |
| 11 | struct ext4_allocation_request; | 11 | struct ext4_allocation_request; |
| 12 | struct ext4_extent; | ||
| 13 | struct ext4_prealloc_space; | 12 | struct ext4_prealloc_space; |
| 14 | struct ext4_inode_info; | 13 | struct ext4_inode_info; |
| 15 | struct mpage_da_data; | 14 | struct mpage_da_data; |
| 16 | struct ext4_map_blocks; | ||
| 17 | struct ext4_extent; | ||
| 18 | struct extent_status; | ||
| 19 | 15 | ||
| 20 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) | 16 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
| 21 | 17 | ||
| @@ -27,19 +23,19 @@ TRACE_EVENT(ext4_free_inode, | |||
| 27 | TP_STRUCT__entry( | 23 | TP_STRUCT__entry( |
| 28 | __field( dev_t, dev ) | 24 | __field( dev_t, dev ) |
| 29 | __field( ino_t, ino ) | 25 | __field( ino_t, ino ) |
| 26 | __field( __u16, mode ) | ||
| 30 | __field( uid_t, uid ) | 27 | __field( uid_t, uid ) |
| 31 | __field( gid_t, gid ) | 28 | __field( gid_t, gid ) |
| 32 | __field( __u64, blocks ) | 29 | __field( __u64, blocks ) |
| 33 | __field( __u16, mode ) | ||
| 34 | ), | 30 | ), |
| 35 | 31 | ||
| 36 | TP_fast_assign( | 32 | TP_fast_assign( |
| 37 | __entry->dev = inode->i_sb->s_dev; | 33 | __entry->dev = inode->i_sb->s_dev; |
| 38 | __entry->ino = inode->i_ino; | 34 | __entry->ino = inode->i_ino; |
| 39 | __entry->uid = i_uid_read(inode); | ||
| 40 | __entry->gid = i_gid_read(inode); | ||
| 41 | __entry->blocks = inode->i_blocks; | ||
| 42 | __entry->mode = inode->i_mode; | 35 | __entry->mode = inode->i_mode; |
| 36 | __entry->uid = inode->i_uid; | ||
| 37 | __entry->gid = inode->i_gid; | ||
| 38 | __entry->blocks = inode->i_blocks; | ||
| 43 | ), | 39 | ), |
| 44 | 40 | ||
| 45 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", | 41 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", |
| @@ -301,10 +297,10 @@ TRACE_EVENT(ext4_da_writepages, | |||
| 301 | __field( long, pages_skipped ) | 297 | __field( long, pages_skipped ) |
| 302 | __field( loff_t, range_start ) | 298 | __field( loff_t, range_start ) |
| 303 | __field( loff_t, range_end ) | 299 | __field( loff_t, range_end ) |
| 304 | __field( pgoff_t, writeback_index ) | ||
| 305 | __field( int, sync_mode ) | 300 | __field( int, sync_mode ) |
| 306 | __field( char, for_kupdate ) | 301 | __field( char, for_kupdate ) |
| 307 | __field( char, range_cyclic ) | 302 | __field( char, range_cyclic ) |
| 303 | __field( pgoff_t, writeback_index ) | ||
| 308 | ), | 304 | ), |
| 309 | 305 | ||
| 310 | TP_fast_assign( | 306 | TP_fast_assign( |
| @@ -314,14 +310,14 @@ TRACE_EVENT(ext4_da_writepages, | |||
| 314 | __entry->pages_skipped = wbc->pages_skipped; | 310 | __entry->pages_skipped = wbc->pages_skipped; |
| 315 | __entry->range_start = wbc->range_start; | 311 | __entry->range_start = wbc->range_start; |
| 316 | __entry->range_end = wbc->range_end; | 312 | __entry->range_end = wbc->range_end; |
| 317 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
| 318 | __entry->sync_mode = wbc->sync_mode; | 313 | __entry->sync_mode = wbc->sync_mode; |
| 319 | __entry->for_kupdate = wbc->for_kupdate; | 314 | __entry->for_kupdate = wbc->for_kupdate; |
| 320 | __entry->range_cyclic = wbc->range_cyclic; | 315 | __entry->range_cyclic = wbc->range_cyclic; |
| 316 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
| 321 | ), | 317 | ), |
| 322 | 318 | ||
| 323 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " | 319 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " |
| 324 | "range_start %lld range_end %lld sync_mode %d " | 320 | "range_start %lld range_end %lld sync_mode %d" |
| 325 | "for_kupdate %d range_cyclic %d writeback_index %lu", | 321 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
| 326 | MAJOR(__entry->dev), MINOR(__entry->dev), | 322 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 327 | (unsigned long) __entry->ino, __entry->nr_to_write, | 323 | (unsigned long) __entry->ino, __entry->nr_to_write, |
| @@ -383,8 +379,8 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
| 383 | __field( int, ret ) | 379 | __field( int, ret ) |
| 384 | __field( int, pages_written ) | 380 | __field( int, pages_written ) |
| 385 | __field( long, pages_skipped ) | 381 | __field( long, pages_skipped ) |
| 386 | __field( pgoff_t, writeback_index ) | ||
| 387 | __field( int, sync_mode ) | 382 | __field( int, sync_mode ) |
| 383 | __field( pgoff_t, writeback_index ) | ||
| 388 | ), | 384 | ), |
| 389 | 385 | ||
| 390 | TP_fast_assign( | 386 | TP_fast_assign( |
| @@ -393,8 +389,8 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
| 393 | __entry->ret = ret; | 389 | __entry->ret = ret; |
| 394 | __entry->pages_written = pages_written; | 390 | __entry->pages_written = pages_written; |
| 395 | __entry->pages_skipped = wbc->pages_skipped; | 391 | __entry->pages_skipped = wbc->pages_skipped; |
| 396 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
| 397 | __entry->sync_mode = wbc->sync_mode; | 392 | __entry->sync_mode = wbc->sync_mode; |
| 393 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
| 398 | ), | 394 | ), |
| 399 | 395 | ||
| 400 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " | 396 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " |
| @@ -412,16 +408,16 @@ DECLARE_EVENT_CLASS(ext4__page_op, | |||
| 412 | TP_ARGS(page), | 408 | TP_ARGS(page), |
| 413 | 409 | ||
| 414 | TP_STRUCT__entry( | 410 | TP_STRUCT__entry( |
| 415 | __field( dev_t, dev ) | ||
| 416 | __field( ino_t, ino ) | ||
| 417 | __field( pgoff_t, index ) | 411 | __field( pgoff_t, index ) |
| 412 | __field( ino_t, ino ) | ||
| 413 | __field( dev_t, dev ) | ||
| 418 | 414 | ||
| 419 | ), | 415 | ), |
| 420 | 416 | ||
| 421 | TP_fast_assign( | 417 | TP_fast_assign( |
| 422 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
| 423 | __entry->ino = page->mapping->host->i_ino; | ||
| 424 | __entry->index = page->index; | 418 | __entry->index = page->index; |
| 419 | __entry->ino = page->mapping->host->i_ino; | ||
| 420 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
| 425 | ), | 421 | ), |
| 426 | 422 | ||
| 427 | TP_printk("dev %d,%d ino %lu page_index %lu", | 423 | TP_printk("dev %d,%d ino %lu page_index %lu", |
| @@ -451,24 +447,24 @@ DEFINE_EVENT(ext4__page_op, ext4_releasepage, | |||
| 451 | TP_ARGS(page) | 447 | TP_ARGS(page) |
| 452 | ); | 448 | ); |
| 453 | 449 | ||
| 454 | DECLARE_EVENT_CLASS(ext4_invalidatepage_op, | 450 | TRACE_EVENT(ext4_invalidatepage, |
| 455 | TP_PROTO(struct page *page, unsigned long offset), | 451 | TP_PROTO(struct page *page, unsigned long offset), |
| 456 | 452 | ||
| 457 | TP_ARGS(page, offset), | 453 | TP_ARGS(page, offset), |
| 458 | 454 | ||
| 459 | TP_STRUCT__entry( | 455 | TP_STRUCT__entry( |
| 460 | __field( dev_t, dev ) | ||
| 461 | __field( ino_t, ino ) | ||
| 462 | __field( pgoff_t, index ) | 456 | __field( pgoff_t, index ) |
| 463 | __field( unsigned long, offset ) | 457 | __field( unsigned long, offset ) |
| 458 | __field( ino_t, ino ) | ||
| 459 | __field( dev_t, dev ) | ||
| 464 | 460 | ||
| 465 | ), | 461 | ), |
| 466 | 462 | ||
| 467 | TP_fast_assign( | 463 | TP_fast_assign( |
| 468 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
| 469 | __entry->ino = page->mapping->host->i_ino; | ||
| 470 | __entry->index = page->index; | 464 | __entry->index = page->index; |
| 471 | __entry->offset = offset; | 465 | __entry->offset = offset; |
| 466 | __entry->ino = page->mapping->host->i_ino; | ||
| 467 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
| 472 | ), | 468 | ), |
| 473 | 469 | ||
| 474 | TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", | 470 | TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", |
| @@ -477,18 +473,6 @@ DECLARE_EVENT_CLASS(ext4_invalidatepage_op, | |||
| 477 | (unsigned long) __entry->index, __entry->offset) | 473 | (unsigned long) __entry->index, __entry->offset) |
| 478 | ); | 474 | ); |
| 479 | 475 | ||
| 480 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage, | ||
| 481 | TP_PROTO(struct page *page, unsigned long offset), | ||
| 482 | |||
| 483 | TP_ARGS(page, offset) | ||
| 484 | ); | ||
| 485 | |||
| 486 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage, | ||
| 487 | TP_PROTO(struct page *page, unsigned long offset), | ||
| 488 | |||
| 489 | TP_ARGS(page, offset) | ||
| 490 | ); | ||
| 491 | |||
| 492 | TRACE_EVENT(ext4_discard_blocks, | 476 | TRACE_EVENT(ext4_discard_blocks, |
| 493 | TP_PROTO(struct super_block *sb, unsigned long long blk, | 477 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 494 | unsigned long long count), | 478 | unsigned long long count), |
| @@ -523,8 +507,8 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
| 523 | __field( dev_t, dev ) | 507 | __field( dev_t, dev ) |
| 524 | __field( ino_t, ino ) | 508 | __field( ino_t, ino ) |
| 525 | __field( __u64, pa_pstart ) | 509 | __field( __u64, pa_pstart ) |
| 526 | __field( __u64, pa_lstart ) | ||
| 527 | __field( __u32, pa_len ) | 510 | __field( __u32, pa_len ) |
| 511 | __field( __u64, pa_lstart ) | ||
| 528 | 512 | ||
| 529 | ), | 513 | ), |
| 530 | 514 | ||
| @@ -532,8 +516,8 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
| 532 | __entry->dev = ac->ac_sb->s_dev; | 516 | __entry->dev = ac->ac_sb->s_dev; |
| 533 | __entry->ino = ac->ac_inode->i_ino; | 517 | __entry->ino = ac->ac_inode->i_ino; |
| 534 | __entry->pa_pstart = pa->pa_pstart; | 518 | __entry->pa_pstart = pa->pa_pstart; |
| 535 | __entry->pa_lstart = pa->pa_lstart; | ||
| 536 | __entry->pa_len = pa->pa_len; | 519 | __entry->pa_len = pa->pa_len; |
| 520 | __entry->pa_lstart = pa->pa_lstart; | ||
| 537 | ), | 521 | ), |
| 538 | 522 | ||
| 539 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", | 523 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", |
| @@ -586,9 +570,9 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
| 586 | ); | 570 | ); |
| 587 | 571 | ||
| 588 | TRACE_EVENT(ext4_mb_release_group_pa, | 572 | TRACE_EVENT(ext4_mb_release_group_pa, |
| 589 | TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa), | 573 | TP_PROTO(struct ext4_prealloc_space *pa), |
| 590 | 574 | ||
| 591 | TP_ARGS(sb, pa), | 575 | TP_ARGS(pa), |
| 592 | 576 | ||
| 593 | TP_STRUCT__entry( | 577 | TP_STRUCT__entry( |
| 594 | __field( dev_t, dev ) | 578 | __field( dev_t, dev ) |
| @@ -598,7 +582,7 @@ TRACE_EVENT(ext4_mb_release_group_pa, | |||
| 598 | ), | 582 | ), |
| 599 | 583 | ||
| 600 | TP_fast_assign( | 584 | TP_fast_assign( |
| 601 | __entry->dev = sb->s_dev; | 585 | __entry->dev = pa->pa_inode->i_sb->s_dev; |
| 602 | __entry->pa_pstart = pa->pa_pstart; | 586 | __entry->pa_pstart = pa->pa_pstart; |
| 603 | __entry->pa_len = pa->pa_len; | 587 | __entry->pa_len = pa->pa_len; |
| 604 | ), | 588 | ), |
| @@ -658,6 +642,7 @@ TRACE_EVENT(ext4_request_blocks, | |||
| 658 | TP_STRUCT__entry( | 642 | TP_STRUCT__entry( |
| 659 | __field( dev_t, dev ) | 643 | __field( dev_t, dev ) |
| 660 | __field( ino_t, ino ) | 644 | __field( ino_t, ino ) |
| 645 | __field( unsigned int, flags ) | ||
| 661 | __field( unsigned int, len ) | 646 | __field( unsigned int, len ) |
| 662 | __field( __u32, logical ) | 647 | __field( __u32, logical ) |
| 663 | __field( __u32, lleft ) | 648 | __field( __u32, lleft ) |
| @@ -665,12 +650,12 @@ TRACE_EVENT(ext4_request_blocks, | |||
| 665 | __field( __u64, goal ) | 650 | __field( __u64, goal ) |
| 666 | __field( __u64, pleft ) | 651 | __field( __u64, pleft ) |
| 667 | __field( __u64, pright ) | 652 | __field( __u64, pright ) |
| 668 | __field( unsigned int, flags ) | ||
| 669 | ), | 653 | ), |
| 670 | 654 | ||
| 671 | TP_fast_assign( | 655 | TP_fast_assign( |
| 672 | __entry->dev = ar->inode->i_sb->s_dev; | 656 | __entry->dev = ar->inode->i_sb->s_dev; |
| 673 | __entry->ino = ar->inode->i_ino; | 657 | __entry->ino = ar->inode->i_ino; |
| 658 | __entry->flags = ar->flags; | ||
| 674 | __entry->len = ar->len; | 659 | __entry->len = ar->len; |
| 675 | __entry->logical = ar->logical; | 660 | __entry->logical = ar->logical; |
| 676 | __entry->goal = ar->goal; | 661 | __entry->goal = ar->goal; |
| @@ -678,7 +663,6 @@ TRACE_EVENT(ext4_request_blocks, | |||
| 678 | __entry->lright = ar->lright; | 663 | __entry->lright = ar->lright; |
| 679 | __entry->pleft = ar->pleft; | 664 | __entry->pleft = ar->pleft; |
| 680 | __entry->pright = ar->pright; | 665 | __entry->pright = ar->pright; |
| 681 | __entry->flags = ar->flags; | ||
| 682 | ), | 666 | ), |
| 683 | 667 | ||
| 684 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu " | 668 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu " |
| @@ -699,6 +683,7 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
| 699 | __field( dev_t, dev ) | 683 | __field( dev_t, dev ) |
| 700 | __field( ino_t, ino ) | 684 | __field( ino_t, ino ) |
| 701 | __field( __u64, block ) | 685 | __field( __u64, block ) |
| 686 | __field( unsigned int, flags ) | ||
| 702 | __field( unsigned int, len ) | 687 | __field( unsigned int, len ) |
| 703 | __field( __u32, logical ) | 688 | __field( __u32, logical ) |
| 704 | __field( __u32, lleft ) | 689 | __field( __u32, lleft ) |
| @@ -706,13 +691,13 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
| 706 | __field( __u64, goal ) | 691 | __field( __u64, goal ) |
| 707 | __field( __u64, pleft ) | 692 | __field( __u64, pleft ) |
| 708 | __field( __u64, pright ) | 693 | __field( __u64, pright ) |
| 709 | __field( unsigned int, flags ) | ||
| 710 | ), | 694 | ), |
| 711 | 695 | ||
| 712 | TP_fast_assign( | 696 | TP_fast_assign( |
| 713 | __entry->dev = ar->inode->i_sb->s_dev; | 697 | __entry->dev = ar->inode->i_sb->s_dev; |
| 714 | __entry->ino = ar->inode->i_ino; | 698 | __entry->ino = ar->inode->i_ino; |
| 715 | __entry->block = block; | 699 | __entry->block = block; |
| 700 | __entry->flags = ar->flags; | ||
| 716 | __entry->len = ar->len; | 701 | __entry->len = ar->len; |
| 717 | __entry->logical = ar->logical; | 702 | __entry->logical = ar->logical; |
| 718 | __entry->goal = ar->goal; | 703 | __entry->goal = ar->goal; |
| @@ -720,7 +705,6 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
| 720 | __entry->lright = ar->lright; | 705 | __entry->lright = ar->lright; |
| 721 | __entry->pleft = ar->pleft; | 706 | __entry->pleft = ar->pleft; |
| 722 | __entry->pright = ar->pright; | 707 | __entry->pright = ar->pright; |
| 723 | __entry->flags = ar->flags; | ||
| 724 | ), | 708 | ), |
| 725 | 709 | ||
| 726 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u " | 710 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u " |
| @@ -741,19 +725,19 @@ TRACE_EVENT(ext4_free_blocks, | |||
| 741 | TP_STRUCT__entry( | 725 | TP_STRUCT__entry( |
| 742 | __field( dev_t, dev ) | 726 | __field( dev_t, dev ) |
| 743 | __field( ino_t, ino ) | 727 | __field( ino_t, ino ) |
| 728 | __field( __u16, mode ) | ||
| 744 | __field( __u64, block ) | 729 | __field( __u64, block ) |
| 745 | __field( unsigned long, count ) | 730 | __field( unsigned long, count ) |
| 746 | __field( int, flags ) | 731 | __field( int, flags ) |
| 747 | __field( __u16, mode ) | ||
| 748 | ), | 732 | ), |
| 749 | 733 | ||
| 750 | TP_fast_assign( | 734 | TP_fast_assign( |
| 751 | __entry->dev = inode->i_sb->s_dev; | 735 | __entry->dev = inode->i_sb->s_dev; |
| 752 | __entry->ino = inode->i_ino; | 736 | __entry->ino = inode->i_ino; |
| 737 | __entry->mode = inode->i_mode; | ||
| 753 | __entry->block = block; | 738 | __entry->block = block; |
| 754 | __entry->count = count; | 739 | __entry->count = count; |
| 755 | __entry->flags = flags; | 740 | __entry->flags = flags; |
| 756 | __entry->mode = inode->i_mode; | ||
| 757 | ), | 741 | ), |
| 758 | 742 | ||
| 759 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", | 743 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", |
| @@ -796,15 +780,15 @@ TRACE_EVENT(ext4_sync_file_exit, | |||
| 796 | TP_ARGS(inode, ret), | 780 | TP_ARGS(inode, ret), |
| 797 | 781 | ||
| 798 | TP_STRUCT__entry( | 782 | TP_STRUCT__entry( |
| 799 | __field( dev_t, dev ) | ||
| 800 | __field( ino_t, ino ) | ||
| 801 | __field( int, ret ) | 783 | __field( int, ret ) |
| 784 | __field( ino_t, ino ) | ||
| 785 | __field( dev_t, dev ) | ||
| 802 | ), | 786 | ), |
| 803 | 787 | ||
| 804 | TP_fast_assign( | 788 | TP_fast_assign( |
| 805 | __entry->dev = inode->i_sb->s_dev; | ||
| 806 | __entry->ino = inode->i_ino; | ||
| 807 | __entry->ret = ret; | 789 | __entry->ret = ret; |
| 790 | __entry->ino = inode->i_ino; | ||
| 791 | __entry->dev = inode->i_sb->s_dev; | ||
| 808 | ), | 792 | ), |
| 809 | 793 | ||
| 810 | TP_printk("dev %d,%d ino %lu ret %d", | 794 | TP_printk("dev %d,%d ino %lu ret %d", |
| @@ -867,6 +851,12 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
| 867 | TP_STRUCT__entry( | 851 | TP_STRUCT__entry( |
| 868 | __field( dev_t, dev ) | 852 | __field( dev_t, dev ) |
| 869 | __field( ino_t, ino ) | 853 | __field( ino_t, ino ) |
| 854 | __field( __u16, found ) | ||
| 855 | __field( __u16, groups ) | ||
| 856 | __field( __u16, buddy ) | ||
| 857 | __field( __u16, flags ) | ||
| 858 | __field( __u16, tail ) | ||
| 859 | __field( __u8, cr ) | ||
| 870 | __field( __u32, orig_logical ) | 860 | __field( __u32, orig_logical ) |
| 871 | __field( int, orig_start ) | 861 | __field( int, orig_start ) |
| 872 | __field( __u32, orig_group ) | 862 | __field( __u32, orig_group ) |
| @@ -879,17 +869,17 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
| 879 | __field( int, result_start ) | 869 | __field( int, result_start ) |
| 880 | __field( __u32, result_group ) | 870 | __field( __u32, result_group ) |
| 881 | __field( int, result_len ) | 871 | __field( int, result_len ) |
| 882 | __field( __u16, found ) | ||
| 883 | __field( __u16, groups ) | ||
| 884 | __field( __u16, buddy ) | ||
| 885 | __field( __u16, flags ) | ||
| 886 | __field( __u16, tail ) | ||
| 887 | __field( __u8, cr ) | ||
| 888 | ), | 872 | ), |
| 889 | 873 | ||
| 890 | TP_fast_assign( | 874 | TP_fast_assign( |
| 891 | __entry->dev = ac->ac_inode->i_sb->s_dev; | 875 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
| 892 | __entry->ino = ac->ac_inode->i_ino; | 876 | __entry->ino = ac->ac_inode->i_ino; |
| 877 | __entry->found = ac->ac_found; | ||
| 878 | __entry->flags = ac->ac_flags; | ||
| 879 | __entry->groups = ac->ac_groups_scanned; | ||
| 880 | __entry->buddy = ac->ac_buddy; | ||
| 881 | __entry->tail = ac->ac_tail; | ||
| 882 | __entry->cr = ac->ac_criteria; | ||
| 893 | __entry->orig_logical = ac->ac_o_ex.fe_logical; | 883 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 894 | __entry->orig_start = ac->ac_o_ex.fe_start; | 884 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 895 | __entry->orig_group = ac->ac_o_ex.fe_group; | 885 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| @@ -902,12 +892,6 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
| 902 | __entry->result_start = ac->ac_f_ex.fe_start; | 892 | __entry->result_start = ac->ac_f_ex.fe_start; |
| 903 | __entry->result_group = ac->ac_f_ex.fe_group; | 893 | __entry->result_group = ac->ac_f_ex.fe_group; |
| 904 | __entry->result_len = ac->ac_f_ex.fe_len; | 894 | __entry->result_len = ac->ac_f_ex.fe_len; |
| 905 | __entry->found = ac->ac_found; | ||
| 906 | __entry->flags = ac->ac_flags; | ||
| 907 | __entry->groups = ac->ac_groups_scanned; | ||
| 908 | __entry->buddy = ac->ac_buddy; | ||
| 909 | __entry->tail = ac->ac_tail; | ||
| 910 | __entry->cr = ac->ac_criteria; | ||
| 911 | ), | 895 | ), |
| 912 | 896 | ||
| 913 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " | 897 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
| @@ -1028,17 +1012,17 @@ TRACE_EVENT(ext4_forget, | |||
| 1028 | TP_STRUCT__entry( | 1012 | TP_STRUCT__entry( |
| 1029 | __field( dev_t, dev ) | 1013 | __field( dev_t, dev ) |
| 1030 | __field( ino_t, ino ) | 1014 | __field( ino_t, ino ) |
| 1031 | __field( __u64, block ) | ||
| 1032 | __field( int, is_metadata ) | ||
| 1033 | __field( __u16, mode ) | 1015 | __field( __u16, mode ) |
| 1016 | __field( int, is_metadata ) | ||
| 1017 | __field( __u64, block ) | ||
| 1034 | ), | 1018 | ), |
| 1035 | 1019 | ||
| 1036 | TP_fast_assign( | 1020 | TP_fast_assign( |
| 1037 | __entry->dev = inode->i_sb->s_dev; | 1021 | __entry->dev = inode->i_sb->s_dev; |
| 1038 | __entry->ino = inode->i_ino; | 1022 | __entry->ino = inode->i_ino; |
| 1039 | __entry->block = block; | ||
| 1040 | __entry->is_metadata = is_metadata; | ||
| 1041 | __entry->mode = inode->i_mode; | 1023 | __entry->mode = inode->i_mode; |
| 1024 | __entry->is_metadata = is_metadata; | ||
| 1025 | __entry->block = block; | ||
| 1042 | ), | 1026 | ), |
| 1043 | 1027 | ||
| 1044 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", | 1028 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", |
| @@ -1048,46 +1032,40 @@ TRACE_EVENT(ext4_forget, | |||
| 1048 | ); | 1032 | ); |
| 1049 | 1033 | ||
| 1050 | TRACE_EVENT(ext4_da_update_reserve_space, | 1034 | TRACE_EVENT(ext4_da_update_reserve_space, |
| 1051 | TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), | 1035 | TP_PROTO(struct inode *inode, int used_blocks), |
| 1052 | 1036 | ||
| 1053 | TP_ARGS(inode, used_blocks, quota_claim), | 1037 | TP_ARGS(inode, used_blocks), |
| 1054 | 1038 | ||
| 1055 | TP_STRUCT__entry( | 1039 | TP_STRUCT__entry( |
| 1056 | __field( dev_t, dev ) | 1040 | __field( dev_t, dev ) |
| 1057 | __field( ino_t, ino ) | 1041 | __field( ino_t, ino ) |
| 1042 | __field( __u16, mode ) | ||
| 1058 | __field( __u64, i_blocks ) | 1043 | __field( __u64, i_blocks ) |
| 1059 | __field( int, used_blocks ) | 1044 | __field( int, used_blocks ) |
| 1060 | __field( int, reserved_data_blocks ) | 1045 | __field( int, reserved_data_blocks ) |
| 1061 | __field( int, reserved_meta_blocks ) | 1046 | __field( int, reserved_meta_blocks ) |
| 1062 | __field( int, allocated_meta_blocks ) | 1047 | __field( int, allocated_meta_blocks ) |
| 1063 | __field( int, quota_claim ) | ||
| 1064 | __field( __u16, mode ) | ||
| 1065 | ), | 1048 | ), |
| 1066 | 1049 | ||
| 1067 | TP_fast_assign( | 1050 | TP_fast_assign( |
| 1068 | __entry->dev = inode->i_sb->s_dev; | 1051 | __entry->dev = inode->i_sb->s_dev; |
| 1069 | __entry->ino = inode->i_ino; | 1052 | __entry->ino = inode->i_ino; |
| 1053 | __entry->mode = inode->i_mode; | ||
| 1070 | __entry->i_blocks = inode->i_blocks; | 1054 | __entry->i_blocks = inode->i_blocks; |
| 1071 | __entry->used_blocks = used_blocks; | 1055 | __entry->used_blocks = used_blocks; |
| 1072 | __entry->reserved_data_blocks = | 1056 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1073 | EXT4_I(inode)->i_reserved_data_blocks; | 1057 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1074 | __entry->reserved_meta_blocks = | 1058 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
| 1075 | EXT4_I(inode)->i_reserved_meta_blocks; | ||
| 1076 | __entry->allocated_meta_blocks = | ||
| 1077 | EXT4_I(inode)->i_allocated_meta_blocks; | ||
| 1078 | __entry->quota_claim = quota_claim; | ||
| 1079 | __entry->mode = inode->i_mode; | ||
| 1080 | ), | 1059 | ), |
| 1081 | 1060 | ||
| 1082 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " | 1061 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
| 1083 | "reserved_data_blocks %d reserved_meta_blocks %d " | 1062 | "reserved_data_blocks %d reserved_meta_blocks %d " |
| 1084 | "allocated_meta_blocks %d quota_claim %d", | 1063 | "allocated_meta_blocks %d", |
| 1085 | MAJOR(__entry->dev), MINOR(__entry->dev), | 1064 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1086 | (unsigned long) __entry->ino, | 1065 | (unsigned long) __entry->ino, |
| 1087 | __entry->mode, __entry->i_blocks, | 1066 | __entry->mode, __entry->i_blocks, |
| 1088 | __entry->used_blocks, __entry->reserved_data_blocks, | 1067 | __entry->used_blocks, __entry->reserved_data_blocks, |
| 1089 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks, | 1068 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
| 1090 | __entry->quota_claim) | ||
| 1091 | ); | 1069 | ); |
| 1092 | 1070 | ||
| 1093 | TRACE_EVENT(ext4_da_reserve_space, | 1071 | TRACE_EVENT(ext4_da_reserve_space, |
| @@ -1098,21 +1076,21 @@ TRACE_EVENT(ext4_da_reserve_space, | |||
| 1098 | TP_STRUCT__entry( | 1076 | TP_STRUCT__entry( |
| 1099 | __field( dev_t, dev ) | 1077 | __field( dev_t, dev ) |
| 1100 | __field( ino_t, ino ) | 1078 | __field( ino_t, ino ) |
| 1079 | __field( __u16, mode ) | ||
| 1101 | __field( __u64, i_blocks ) | 1080 | __field( __u64, i_blocks ) |
| 1102 | __field( int, md_needed ) | 1081 | __field( int, md_needed ) |
| 1103 | __field( int, reserved_data_blocks ) | 1082 | __field( int, reserved_data_blocks ) |
| 1104 | __field( int, reserved_meta_blocks ) | 1083 | __field( int, reserved_meta_blocks ) |
| 1105 | __field( __u16, mode ) | ||
| 1106 | ), | 1084 | ), |
| 1107 | 1085 | ||
| 1108 | TP_fast_assign( | 1086 | TP_fast_assign( |
| 1109 | __entry->dev = inode->i_sb->s_dev; | 1087 | __entry->dev = inode->i_sb->s_dev; |
| 1110 | __entry->ino = inode->i_ino; | 1088 | __entry->ino = inode->i_ino; |
| 1089 | __entry->mode = inode->i_mode; | ||
| 1111 | __entry->i_blocks = inode->i_blocks; | 1090 | __entry->i_blocks = inode->i_blocks; |
| 1112 | __entry->md_needed = md_needed; | 1091 | __entry->md_needed = md_needed; |
| 1113 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | 1092 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1114 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | 1093 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1115 | __entry->mode = inode->i_mode; | ||
| 1116 | ), | 1094 | ), |
| 1117 | 1095 | ||
| 1118 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " | 1096 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " |
| @@ -1132,23 +1110,23 @@ TRACE_EVENT(ext4_da_release_space, | |||
| 1132 | TP_STRUCT__entry( | 1110 | TP_STRUCT__entry( |
| 1133 | __field( dev_t, dev ) | 1111 | __field( dev_t, dev ) |
| 1134 | __field( ino_t, ino ) | 1112 | __field( ino_t, ino ) |
| 1113 | __field( __u16, mode ) | ||
| 1135 | __field( __u64, i_blocks ) | 1114 | __field( __u64, i_blocks ) |
| 1136 | __field( int, freed_blocks ) | 1115 | __field( int, freed_blocks ) |
| 1137 | __field( int, reserved_data_blocks ) | 1116 | __field( int, reserved_data_blocks ) |
| 1138 | __field( int, reserved_meta_blocks ) | 1117 | __field( int, reserved_meta_blocks ) |
| 1139 | __field( int, allocated_meta_blocks ) | 1118 | __field( int, allocated_meta_blocks ) |
| 1140 | __field( __u16, mode ) | ||
| 1141 | ), | 1119 | ), |
| 1142 | 1120 | ||
| 1143 | TP_fast_assign( | 1121 | TP_fast_assign( |
| 1144 | __entry->dev = inode->i_sb->s_dev; | 1122 | __entry->dev = inode->i_sb->s_dev; |
| 1145 | __entry->ino = inode->i_ino; | 1123 | __entry->ino = inode->i_ino; |
| 1124 | __entry->mode = inode->i_mode; | ||
| 1146 | __entry->i_blocks = inode->i_blocks; | 1125 | __entry->i_blocks = inode->i_blocks; |
| 1147 | __entry->freed_blocks = freed_blocks; | 1126 | __entry->freed_blocks = freed_blocks; |
| 1148 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | 1127 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1149 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | 1128 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1150 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | 1129 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
| 1151 | __entry->mode = inode->i_mode; | ||
| 1152 | ), | 1130 | ), |
| 1153 | 1131 | ||
| 1154 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " | 1132 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
| @@ -1216,16 +1194,16 @@ TRACE_EVENT(ext4_direct_IO_enter, | |||
| 1216 | TP_ARGS(inode, offset, len, rw), | 1194 | TP_ARGS(inode, offset, len, rw), |
| 1217 | 1195 | ||
| 1218 | TP_STRUCT__entry( | 1196 | TP_STRUCT__entry( |
| 1219 | __field( dev_t, dev ) | ||
| 1220 | __field( ino_t, ino ) | 1197 | __field( ino_t, ino ) |
| 1198 | __field( dev_t, dev ) | ||
| 1221 | __field( loff_t, pos ) | 1199 | __field( loff_t, pos ) |
| 1222 | __field( unsigned long, len ) | 1200 | __field( unsigned long, len ) |
| 1223 | __field( int, rw ) | 1201 | __field( int, rw ) |
| 1224 | ), | 1202 | ), |
| 1225 | 1203 | ||
| 1226 | TP_fast_assign( | 1204 | TP_fast_assign( |
| 1227 | __entry->dev = inode->i_sb->s_dev; | ||
| 1228 | __entry->ino = inode->i_ino; | 1205 | __entry->ino = inode->i_ino; |
| 1206 | __entry->dev = inode->i_sb->s_dev; | ||
| 1229 | __entry->pos = offset; | 1207 | __entry->pos = offset; |
| 1230 | __entry->len = len; | 1208 | __entry->len = len; |
| 1231 | __entry->rw = rw; | 1209 | __entry->rw = rw; |
| @@ -1244,8 +1222,8 @@ TRACE_EVENT(ext4_direct_IO_exit, | |||
| 1244 | TP_ARGS(inode, offset, len, rw, ret), | 1222 | TP_ARGS(inode, offset, len, rw, ret), |
| 1245 | 1223 | ||
| 1246 | TP_STRUCT__entry( | 1224 | TP_STRUCT__entry( |
| 1247 | __field( dev_t, dev ) | ||
| 1248 | __field( ino_t, ino ) | 1225 | __field( ino_t, ino ) |
| 1226 | __field( dev_t, dev ) | ||
| 1249 | __field( loff_t, pos ) | 1227 | __field( loff_t, pos ) |
| 1250 | __field( unsigned long, len ) | 1228 | __field( unsigned long, len ) |
| 1251 | __field( int, rw ) | 1229 | __field( int, rw ) |
| @@ -1253,8 +1231,8 @@ TRACE_EVENT(ext4_direct_IO_exit, | |||
| 1253 | ), | 1231 | ), |
| 1254 | 1232 | ||
| 1255 | TP_fast_assign( | 1233 | TP_fast_assign( |
| 1256 | __entry->dev = inode->i_sb->s_dev; | ||
| 1257 | __entry->ino = inode->i_ino; | 1234 | __entry->ino = inode->i_ino; |
| 1235 | __entry->dev = inode->i_sb->s_dev; | ||
| 1258 | __entry->pos = offset; | 1236 | __entry->pos = offset; |
| 1259 | __entry->len = len; | 1237 | __entry->len = len; |
| 1260 | __entry->rw = rw; | 1238 | __entry->rw = rw; |
| @@ -1274,16 +1252,16 @@ TRACE_EVENT(ext4_fallocate_enter, | |||
| 1274 | TP_ARGS(inode, offset, len, mode), | 1252 | TP_ARGS(inode, offset, len, mode), |
| 1275 | 1253 | ||
| 1276 | TP_STRUCT__entry( | 1254 | TP_STRUCT__entry( |
| 1277 | __field( dev_t, dev ) | ||
| 1278 | __field( ino_t, ino ) | 1255 | __field( ino_t, ino ) |
| 1256 | __field( dev_t, dev ) | ||
| 1279 | __field( loff_t, pos ) | 1257 | __field( loff_t, pos ) |
| 1280 | __field( loff_t, len ) | 1258 | __field( loff_t, len ) |
| 1281 | __field( int, mode ) | 1259 | __field( int, mode ) |
| 1282 | ), | 1260 | ), |
| 1283 | 1261 | ||
| 1284 | TP_fast_assign( | 1262 | TP_fast_assign( |
| 1285 | __entry->dev = inode->i_sb->s_dev; | ||
| 1286 | __entry->ino = inode->i_ino; | 1263 | __entry->ino = inode->i_ino; |
| 1264 | __entry->dev = inode->i_sb->s_dev; | ||
| 1287 | __entry->pos = offset; | 1265 | __entry->pos = offset; |
| 1288 | __entry->len = len; | 1266 | __entry->len = len; |
| 1289 | __entry->mode = mode; | 1267 | __entry->mode = mode; |
| @@ -1302,16 +1280,16 @@ TRACE_EVENT(ext4_fallocate_exit, | |||
| 1302 | TP_ARGS(inode, offset, max_blocks, ret), | 1280 | TP_ARGS(inode, offset, max_blocks, ret), |
| 1303 | 1281 | ||
| 1304 | TP_STRUCT__entry( | 1282 | TP_STRUCT__entry( |
| 1305 | __field( dev_t, dev ) | ||
| 1306 | __field( ino_t, ino ) | 1283 | __field( ino_t, ino ) |
| 1284 | __field( dev_t, dev ) | ||
| 1307 | __field( loff_t, pos ) | 1285 | __field( loff_t, pos ) |
| 1308 | __field( unsigned int, blocks ) | 1286 | __field( unsigned int, blocks ) |
| 1309 | __field( int, ret ) | 1287 | __field( int, ret ) |
| 1310 | ), | 1288 | ), |
| 1311 | 1289 | ||
| 1312 | TP_fast_assign( | 1290 | TP_fast_assign( |
| 1313 | __entry->dev = inode->i_sb->s_dev; | ||
| 1314 | __entry->ino = inode->i_ino; | 1291 | __entry->ino = inode->i_ino; |
| 1292 | __entry->dev = inode->i_sb->s_dev; | ||
| 1315 | __entry->pos = offset; | 1293 | __entry->pos = offset; |
| 1316 | __entry->blocks = max_blocks; | 1294 | __entry->blocks = max_blocks; |
| 1317 | __entry->ret = ret; | 1295 | __entry->ret = ret; |
| @@ -1330,17 +1308,17 @@ TRACE_EVENT(ext4_unlink_enter, | |||
| 1330 | TP_ARGS(parent, dentry), | 1308 | TP_ARGS(parent, dentry), |
| 1331 | 1309 | ||
| 1332 | TP_STRUCT__entry( | 1310 | TP_STRUCT__entry( |
| 1333 | __field( dev_t, dev ) | ||
| 1334 | __field( ino_t, ino ) | ||
| 1335 | __field( ino_t, parent ) | 1311 | __field( ino_t, parent ) |
| 1312 | __field( ino_t, ino ) | ||
| 1336 | __field( loff_t, size ) | 1313 | __field( loff_t, size ) |
| 1314 | __field( dev_t, dev ) | ||
| 1337 | ), | 1315 | ), |
| 1338 | 1316 | ||
| 1339 | TP_fast_assign( | 1317 | TP_fast_assign( |
| 1340 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
| 1341 | __entry->ino = dentry->d_inode->i_ino; | ||
| 1342 | __entry->parent = parent->i_ino; | 1318 | __entry->parent = parent->i_ino; |
| 1319 | __entry->ino = dentry->d_inode->i_ino; | ||
| 1343 | __entry->size = dentry->d_inode->i_size; | 1320 | __entry->size = dentry->d_inode->i_size; |
| 1321 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
| 1344 | ), | 1322 | ), |
| 1345 | 1323 | ||
| 1346 | TP_printk("dev %d,%d ino %lu size %lld parent %lu", | 1324 | TP_printk("dev %d,%d ino %lu size %lld parent %lu", |
| @@ -1355,14 +1333,14 @@ TRACE_EVENT(ext4_unlink_exit, | |||
| 1355 | TP_ARGS(dentry, ret), | 1333 | TP_ARGS(dentry, ret), |
| 1356 | 1334 | ||
| 1357 | TP_STRUCT__entry( | 1335 | TP_STRUCT__entry( |
| 1358 | __field( dev_t, dev ) | ||
| 1359 | __field( ino_t, ino ) | 1336 | __field( ino_t, ino ) |
| 1337 | __field( dev_t, dev ) | ||
| 1360 | __field( int, ret ) | 1338 | __field( int, ret ) |
| 1361 | ), | 1339 | ), |
| 1362 | 1340 | ||
| 1363 | TP_fast_assign( | 1341 | TP_fast_assign( |
| 1364 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
| 1365 | __entry->ino = dentry->d_inode->i_ino; | 1342 | __entry->ino = dentry->d_inode->i_ino; |
| 1343 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
| 1366 | __entry->ret = ret; | 1344 | __entry->ret = ret; |
| 1367 | ), | 1345 | ), |
| 1368 | 1346 | ||
| @@ -1378,14 +1356,14 @@ DECLARE_EVENT_CLASS(ext4__truncate, | |||
| 1378 | TP_ARGS(inode), | 1356 | TP_ARGS(inode), |
| 1379 | 1357 | ||
| 1380 | TP_STRUCT__entry( | 1358 | TP_STRUCT__entry( |
| 1381 | __field( dev_t, dev ) | 1359 | __field( ino_t, ino ) |
| 1382 | __field( ino_t, ino ) | 1360 | __field( dev_t, dev ) |
| 1383 | __field( __u64, blocks ) | 1361 | __field( __u64, blocks ) |
| 1384 | ), | 1362 | ), |
| 1385 | 1363 | ||
| 1386 | TP_fast_assign( | 1364 | TP_fast_assign( |
| 1387 | __entry->dev = inode->i_sb->s_dev; | ||
| 1388 | __entry->ino = inode->i_ino; | 1365 | __entry->ino = inode->i_ino; |
| 1366 | __entry->dev = inode->i_sb->s_dev; | ||
| 1389 | __entry->blocks = inode->i_blocks; | 1367 | __entry->blocks = inode->i_blocks; |
| 1390 | ), | 1368 | ), |
| 1391 | 1369 | ||
| @@ -1408,87 +1386,6 @@ DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, | |||
| 1408 | TP_ARGS(inode) | 1386 | TP_ARGS(inode) |
| 1409 | ); | 1387 | ); |
| 1410 | 1388 | ||
| 1411 | /* 'ux' is the uninitialized extent. */ | ||
| 1412 | TRACE_EVENT(ext4_ext_convert_to_initialized_enter, | ||
| 1413 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, | ||
| 1414 | struct ext4_extent *ux), | ||
| 1415 | |||
| 1416 | TP_ARGS(inode, map, ux), | ||
| 1417 | |||
| 1418 | TP_STRUCT__entry( | ||
| 1419 | __field( dev_t, dev ) | ||
| 1420 | __field( ino_t, ino ) | ||
| 1421 | __field( ext4_lblk_t, m_lblk ) | ||
| 1422 | __field( unsigned, m_len ) | ||
| 1423 | __field( ext4_lblk_t, u_lblk ) | ||
| 1424 | __field( unsigned, u_len ) | ||
| 1425 | __field( ext4_fsblk_t, u_pblk ) | ||
| 1426 | ), | ||
| 1427 | |||
| 1428 | TP_fast_assign( | ||
| 1429 | __entry->dev = inode->i_sb->s_dev; | ||
| 1430 | __entry->ino = inode->i_ino; | ||
| 1431 | __entry->m_lblk = map->m_lblk; | ||
| 1432 | __entry->m_len = map->m_len; | ||
| 1433 | __entry->u_lblk = le32_to_cpu(ux->ee_block); | ||
| 1434 | __entry->u_len = ext4_ext_get_actual_len(ux); | ||
| 1435 | __entry->u_pblk = ext4_ext_pblock(ux); | ||
| 1436 | ), | ||
| 1437 | |||
| 1438 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u " | ||
| 1439 | "u_pblk %llu", | ||
| 1440 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1441 | (unsigned long) __entry->ino, | ||
| 1442 | __entry->m_lblk, __entry->m_len, | ||
| 1443 | __entry->u_lblk, __entry->u_len, __entry->u_pblk) | ||
| 1444 | ); | ||
| 1445 | |||
| 1446 | /* | ||
| 1447 | * 'ux' is the uninitialized extent. | ||
| 1448 | * 'ix' is the initialized extent to which blocks are transferred. | ||
| 1449 | */ | ||
| 1450 | TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath, | ||
| 1451 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, | ||
| 1452 | struct ext4_extent *ux, struct ext4_extent *ix), | ||
| 1453 | |||
| 1454 | TP_ARGS(inode, map, ux, ix), | ||
| 1455 | |||
| 1456 | TP_STRUCT__entry( | ||
| 1457 | __field( dev_t, dev ) | ||
| 1458 | __field( ino_t, ino ) | ||
| 1459 | __field( ext4_lblk_t, m_lblk ) | ||
| 1460 | __field( unsigned, m_len ) | ||
| 1461 | __field( ext4_lblk_t, u_lblk ) | ||
| 1462 | __field( unsigned, u_len ) | ||
| 1463 | __field( ext4_fsblk_t, u_pblk ) | ||
| 1464 | __field( ext4_lblk_t, i_lblk ) | ||
| 1465 | __field( unsigned, i_len ) | ||
| 1466 | __field( ext4_fsblk_t, i_pblk ) | ||
| 1467 | ), | ||
| 1468 | |||
| 1469 | TP_fast_assign( | ||
| 1470 | __entry->dev = inode->i_sb->s_dev; | ||
| 1471 | __entry->ino = inode->i_ino; | ||
| 1472 | __entry->m_lblk = map->m_lblk; | ||
| 1473 | __entry->m_len = map->m_len; | ||
| 1474 | __entry->u_lblk = le32_to_cpu(ux->ee_block); | ||
| 1475 | __entry->u_len = ext4_ext_get_actual_len(ux); | ||
| 1476 | __entry->u_pblk = ext4_ext_pblock(ux); | ||
| 1477 | __entry->i_lblk = le32_to_cpu(ix->ee_block); | ||
| 1478 | __entry->i_len = ext4_ext_get_actual_len(ix); | ||
| 1479 | __entry->i_pblk = ext4_ext_pblock(ix); | ||
| 1480 | ), | ||
| 1481 | |||
| 1482 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u " | ||
| 1483 | "u_lblk %u u_len %u u_pblk %llu " | ||
| 1484 | "i_lblk %u i_len %u i_pblk %llu ", | ||
| 1485 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1486 | (unsigned long) __entry->ino, | ||
| 1487 | __entry->m_lblk, __entry->m_len, | ||
| 1488 | __entry->u_lblk, __entry->u_len, __entry->u_pblk, | ||
| 1489 | __entry->i_lblk, __entry->i_len, __entry->i_pblk) | ||
| 1490 | ); | ||
| 1491 | |||
| 1492 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, | 1389 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, |
| 1493 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | 1390 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1494 | unsigned int len, unsigned int flags), | 1391 | unsigned int len, unsigned int flags), |
| @@ -1496,16 +1393,16 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_enter, | |||
| 1496 | TP_ARGS(inode, lblk, len, flags), | 1393 | TP_ARGS(inode, lblk, len, flags), |
| 1497 | 1394 | ||
| 1498 | TP_STRUCT__entry( | 1395 | TP_STRUCT__entry( |
| 1499 | __field( dev_t, dev ) | 1396 | __field( ino_t, ino ) |
| 1500 | __field( ino_t, ino ) | 1397 | __field( dev_t, dev ) |
| 1501 | __field( ext4_lblk_t, lblk ) | 1398 | __field( ext4_lblk_t, lblk ) |
| 1502 | __field( unsigned int, len ) | 1399 | __field( unsigned int, len ) |
| 1503 | __field( unsigned int, flags ) | 1400 | __field( unsigned int, flags ) |
| 1504 | ), | 1401 | ), |
| 1505 | 1402 | ||
| 1506 | TP_fast_assign( | 1403 | TP_fast_assign( |
| 1507 | __entry->dev = inode->i_sb->s_dev; | ||
| 1508 | __entry->ino = inode->i_ino; | 1404 | __entry->ino = inode->i_ino; |
| 1405 | __entry->dev = inode->i_sb->s_dev; | ||
| 1509 | __entry->lblk = lblk; | 1406 | __entry->lblk = lblk; |
| 1510 | __entry->len = len; | 1407 | __entry->len = len; |
| 1511 | __entry->flags = flags; | 1408 | __entry->flags = flags; |
| @@ -1532,47 +1429,48 @@ DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, | |||
| 1532 | ); | 1429 | ); |
| 1533 | 1430 | ||
| 1534 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, | 1431 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, |
| 1535 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), | 1432 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1433 | ext4_fsblk_t pblk, unsigned int len, int ret), | ||
| 1536 | 1434 | ||
| 1537 | TP_ARGS(inode, map, ret), | 1435 | TP_ARGS(inode, lblk, pblk, len, ret), |
| 1538 | 1436 | ||
| 1539 | TP_STRUCT__entry( | 1437 | TP_STRUCT__entry( |
| 1540 | __field( dev_t, dev ) | ||
| 1541 | __field( ino_t, ino ) | 1438 | __field( ino_t, ino ) |
| 1542 | __field( ext4_fsblk_t, pblk ) | 1439 | __field( dev_t, dev ) |
| 1543 | __field( ext4_lblk_t, lblk ) | 1440 | __field( ext4_lblk_t, lblk ) |
| 1441 | __field( ext4_fsblk_t, pblk ) | ||
| 1544 | __field( unsigned int, len ) | 1442 | __field( unsigned int, len ) |
| 1545 | __field( unsigned int, flags ) | ||
| 1546 | __field( int, ret ) | 1443 | __field( int, ret ) |
| 1547 | ), | 1444 | ), |
| 1548 | 1445 | ||
| 1549 | TP_fast_assign( | 1446 | TP_fast_assign( |
| 1550 | __entry->dev = inode->i_sb->s_dev; | ||
| 1551 | __entry->ino = inode->i_ino; | 1447 | __entry->ino = inode->i_ino; |
| 1552 | __entry->pblk = map->m_pblk; | 1448 | __entry->dev = inode->i_sb->s_dev; |
| 1553 | __entry->lblk = map->m_lblk; | 1449 | __entry->lblk = lblk; |
| 1554 | __entry->len = map->m_len; | 1450 | __entry->pblk = pblk; |
| 1555 | __entry->flags = map->m_flags; | 1451 | __entry->len = len; |
| 1556 | __entry->ret = ret; | 1452 | __entry->ret = ret; |
| 1557 | ), | 1453 | ), |
| 1558 | 1454 | ||
| 1559 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u flags %x ret %d", | 1455 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", |
| 1560 | MAJOR(__entry->dev), MINOR(__entry->dev), | 1456 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1561 | (unsigned long) __entry->ino, | 1457 | (unsigned long) __entry->ino, |
| 1562 | __entry->lblk, __entry->pblk, | 1458 | __entry->lblk, __entry->pblk, |
| 1563 | __entry->len, __entry->flags, __entry->ret) | 1459 | __entry->len, __entry->ret) |
| 1564 | ); | 1460 | ); |
| 1565 | 1461 | ||
| 1566 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, | 1462 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
| 1567 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), | 1463 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1464 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
| 1568 | 1465 | ||
| 1569 | TP_ARGS(inode, map, ret) | 1466 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1570 | ); | 1467 | ); |
| 1571 | 1468 | ||
| 1572 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, | 1469 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
| 1573 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), | 1470 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1471 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
| 1574 | 1472 | ||
| 1575 | TP_ARGS(inode, map, ret) | 1473 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1576 | ); | 1474 | ); |
| 1577 | 1475 | ||
| 1578 | TRACE_EVENT(ext4_ext_load_extent, | 1476 | TRACE_EVENT(ext4_ext_load_extent, |
| @@ -1581,17 +1479,17 @@ TRACE_EVENT(ext4_ext_load_extent, | |||
| 1581 | TP_ARGS(inode, lblk, pblk), | 1479 | TP_ARGS(inode, lblk, pblk), |
| 1582 | 1480 | ||
| 1583 | TP_STRUCT__entry( | 1481 | TP_STRUCT__entry( |
| 1584 | __field( dev_t, dev ) | ||
| 1585 | __field( ino_t, ino ) | 1482 | __field( ino_t, ino ) |
| 1586 | __field( ext4_fsblk_t, pblk ) | 1483 | __field( dev_t, dev ) |
| 1587 | __field( ext4_lblk_t, lblk ) | 1484 | __field( ext4_lblk_t, lblk ) |
| 1485 | __field( ext4_fsblk_t, pblk ) | ||
| 1588 | ), | 1486 | ), |
| 1589 | 1487 | ||
| 1590 | TP_fast_assign( | 1488 | TP_fast_assign( |
| 1591 | __entry->dev = inode->i_sb->s_dev; | ||
| 1592 | __entry->ino = inode->i_ino; | 1489 | __entry->ino = inode->i_ino; |
| 1593 | __entry->pblk = pblk; | 1490 | __entry->dev = inode->i_sb->s_dev; |
| 1594 | __entry->lblk = lblk; | 1491 | __entry->lblk = lblk; |
| 1492 | __entry->pblk = pblk; | ||
| 1595 | ), | 1493 | ), |
| 1596 | 1494 | ||
| 1597 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", | 1495 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", |
| @@ -1606,13 +1504,13 @@ TRACE_EVENT(ext4_load_inode, | |||
| 1606 | TP_ARGS(inode), | 1504 | TP_ARGS(inode), |
| 1607 | 1505 | ||
| 1608 | TP_STRUCT__entry( | 1506 | TP_STRUCT__entry( |
| 1609 | __field( dev_t, dev ) | ||
| 1610 | __field( ino_t, ino ) | 1507 | __field( ino_t, ino ) |
| 1508 | __field( dev_t, dev ) | ||
| 1611 | ), | 1509 | ), |
| 1612 | 1510 | ||
| 1613 | TP_fast_assign( | 1511 | TP_fast_assign( |
| 1614 | __entry->dev = inode->i_sb->s_dev; | ||
| 1615 | __entry->ino = inode->i_ino; | 1512 | __entry->ino = inode->i_ino; |
| 1513 | __entry->dev = inode->i_sb->s_dev; | ||
| 1616 | ), | 1514 | ), |
| 1617 | 1515 | ||
| 1618 | TP_printk("dev %d,%d ino %ld", | 1516 | TP_printk("dev %d,%d ino %ld", |
| @@ -1627,14 +1525,14 @@ TRACE_EVENT(ext4_journal_start, | |||
| 1627 | 1525 | ||
| 1628 | TP_STRUCT__entry( | 1526 | TP_STRUCT__entry( |
| 1629 | __field( dev_t, dev ) | 1527 | __field( dev_t, dev ) |
| 1528 | __field( int, nblocks ) | ||
| 1630 | __field(unsigned long, ip ) | 1529 | __field(unsigned long, ip ) |
| 1631 | __field( int, nblocks ) | ||
| 1632 | ), | 1530 | ), |
| 1633 | 1531 | ||
| 1634 | TP_fast_assign( | 1532 | TP_fast_assign( |
| 1635 | __entry->dev = sb->s_dev; | 1533 | __entry->dev = sb->s_dev; |
| 1636 | __entry->ip = IP; | ||
| 1637 | __entry->nblocks = nblocks; | 1534 | __entry->nblocks = nblocks; |
| 1535 | __entry->ip = IP; | ||
| 1638 | ), | 1536 | ), |
| 1639 | 1537 | ||
| 1640 | TP_printk("dev %d,%d nblocks %d caller %pF", | 1538 | TP_printk("dev %d,%d nblocks %d caller %pF", |
| @@ -1691,482 +1589,6 @@ DEFINE_EVENT(ext4__trim, ext4_trim_all_free, | |||
| 1691 | TP_ARGS(sb, group, start, len) | 1589 | TP_ARGS(sb, group, start, len) |
| 1692 | ); | 1590 | ); |
| 1693 | 1591 | ||
| 1694 | TRACE_EVENT(ext4_ext_handle_uninitialized_extents, | ||
| 1695 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags, | ||
| 1696 | unsigned int allocated, ext4_fsblk_t newblock), | ||
| 1697 | |||
| 1698 | TP_ARGS(inode, map, flags, allocated, newblock), | ||
| 1699 | |||
| 1700 | TP_STRUCT__entry( | ||
| 1701 | __field( dev_t, dev ) | ||
| 1702 | __field( ino_t, ino ) | ||
| 1703 | __field( int, flags ) | ||
| 1704 | __field( ext4_lblk_t, lblk ) | ||
| 1705 | __field( ext4_fsblk_t, pblk ) | ||
| 1706 | __field( unsigned int, len ) | ||
| 1707 | __field( unsigned int, allocated ) | ||
| 1708 | __field( ext4_fsblk_t, newblk ) | ||
| 1709 | ), | ||
| 1710 | |||
| 1711 | TP_fast_assign( | ||
| 1712 | __entry->dev = inode->i_sb->s_dev; | ||
| 1713 | __entry->ino = inode->i_ino; | ||
| 1714 | __entry->flags = flags; | ||
| 1715 | __entry->lblk = map->m_lblk; | ||
| 1716 | __entry->pblk = map->m_pblk; | ||
| 1717 | __entry->len = map->m_len; | ||
| 1718 | __entry->allocated = allocated; | ||
| 1719 | __entry->newblk = newblock; | ||
| 1720 | ), | ||
| 1721 | |||
| 1722 | TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %x " | ||
| 1723 | "allocated %d newblock %llu", | ||
| 1724 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1725 | (unsigned long) __entry->ino, | ||
| 1726 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, | ||
| 1727 | __entry->len, __entry->flags, | ||
| 1728 | (unsigned int) __entry->allocated, | ||
| 1729 | (unsigned long long) __entry->newblk) | ||
| 1730 | ); | ||
| 1731 | |||
| 1732 | TRACE_EVENT(ext4_get_implied_cluster_alloc_exit, | ||
| 1733 | TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), | ||
| 1734 | |||
| 1735 | TP_ARGS(sb, map, ret), | ||
| 1736 | |||
| 1737 | TP_STRUCT__entry( | ||
| 1738 | __field( dev_t, dev ) | ||
| 1739 | __field( unsigned int, flags ) | ||
| 1740 | __field( ext4_lblk_t, lblk ) | ||
| 1741 | __field( ext4_fsblk_t, pblk ) | ||
| 1742 | __field( unsigned int, len ) | ||
| 1743 | __field( int, ret ) | ||
| 1744 | ), | ||
| 1745 | |||
| 1746 | TP_fast_assign( | ||
| 1747 | __entry->dev = sb->s_dev; | ||
| 1748 | __entry->flags = map->m_flags; | ||
| 1749 | __entry->lblk = map->m_lblk; | ||
| 1750 | __entry->pblk = map->m_pblk; | ||
| 1751 | __entry->len = map->m_len; | ||
| 1752 | __entry->ret = ret; | ||
| 1753 | ), | ||
| 1754 | |||
| 1755 | TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d", | ||
| 1756 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1757 | __entry->lblk, (unsigned long long) __entry->pblk, | ||
| 1758 | __entry->len, __entry->flags, __entry->ret) | ||
| 1759 | ); | ||
| 1760 | |||
| 1761 | TRACE_EVENT(ext4_ext_put_in_cache, | ||
| 1762 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, | ||
| 1763 | ext4_fsblk_t start), | ||
| 1764 | |||
| 1765 | TP_ARGS(inode, lblk, len, start), | ||
| 1766 | |||
| 1767 | TP_STRUCT__entry( | ||
| 1768 | __field( dev_t, dev ) | ||
| 1769 | __field( ino_t, ino ) | ||
| 1770 | __field( ext4_lblk_t, lblk ) | ||
| 1771 | __field( unsigned int, len ) | ||
| 1772 | __field( ext4_fsblk_t, start ) | ||
| 1773 | ), | ||
| 1774 | |||
| 1775 | TP_fast_assign( | ||
| 1776 | __entry->dev = inode->i_sb->s_dev; | ||
| 1777 | __entry->ino = inode->i_ino; | ||
| 1778 | __entry->lblk = lblk; | ||
| 1779 | __entry->len = len; | ||
| 1780 | __entry->start = start; | ||
| 1781 | ), | ||
| 1782 | |||
| 1783 | TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu", | ||
| 1784 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1785 | (unsigned long) __entry->ino, | ||
| 1786 | (unsigned) __entry->lblk, | ||
| 1787 | __entry->len, | ||
| 1788 | (unsigned long long) __entry->start) | ||
| 1789 | ); | ||
| 1790 | |||
| 1791 | TRACE_EVENT(ext4_ext_in_cache, | ||
| 1792 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), | ||
| 1793 | |||
| 1794 | TP_ARGS(inode, lblk, ret), | ||
| 1795 | |||
| 1796 | TP_STRUCT__entry( | ||
| 1797 | __field( dev_t, dev ) | ||
| 1798 | __field( ino_t, ino ) | ||
| 1799 | __field( ext4_lblk_t, lblk ) | ||
| 1800 | __field( int, ret ) | ||
| 1801 | ), | ||
| 1802 | |||
| 1803 | TP_fast_assign( | ||
| 1804 | __entry->dev = inode->i_sb->s_dev; | ||
| 1805 | __entry->ino = inode->i_ino; | ||
| 1806 | __entry->lblk = lblk; | ||
| 1807 | __entry->ret = ret; | ||
| 1808 | ), | ||
| 1809 | |||
| 1810 | TP_printk("dev %d,%d ino %lu lblk %u ret %d", | ||
| 1811 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1812 | (unsigned long) __entry->ino, | ||
| 1813 | (unsigned) __entry->lblk, | ||
| 1814 | __entry->ret) | ||
| 1815 | |||
| 1816 | ); | ||
| 1817 | |||
| 1818 | TRACE_EVENT(ext4_find_delalloc_range, | ||
| 1819 | TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, | ||
| 1820 | int reverse, int found, ext4_lblk_t found_blk), | ||
| 1821 | |||
| 1822 | TP_ARGS(inode, from, to, reverse, found, found_blk), | ||
| 1823 | |||
| 1824 | TP_STRUCT__entry( | ||
| 1825 | __field( dev_t, dev ) | ||
| 1826 | __field( ino_t, ino ) | ||
| 1827 | __field( ext4_lblk_t, from ) | ||
| 1828 | __field( ext4_lblk_t, to ) | ||
| 1829 | __field( int, reverse ) | ||
| 1830 | __field( int, found ) | ||
| 1831 | __field( ext4_lblk_t, found_blk ) | ||
| 1832 | ), | ||
| 1833 | |||
| 1834 | TP_fast_assign( | ||
| 1835 | __entry->dev = inode->i_sb->s_dev; | ||
| 1836 | __entry->ino = inode->i_ino; | ||
| 1837 | __entry->from = from; | ||
| 1838 | __entry->to = to; | ||
| 1839 | __entry->reverse = reverse; | ||
| 1840 | __entry->found = found; | ||
| 1841 | __entry->found_blk = found_blk; | ||
| 1842 | ), | ||
| 1843 | |||
| 1844 | TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d " | ||
| 1845 | "(blk = %u)", | ||
| 1846 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1847 | (unsigned long) __entry->ino, | ||
| 1848 | (unsigned) __entry->from, (unsigned) __entry->to, | ||
| 1849 | __entry->reverse, __entry->found, | ||
| 1850 | (unsigned) __entry->found_blk) | ||
| 1851 | ); | ||
| 1852 | |||
| 1853 | TRACE_EVENT(ext4_get_reserved_cluster_alloc, | ||
| 1854 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), | ||
| 1855 | |||
| 1856 | TP_ARGS(inode, lblk, len), | ||
| 1857 | |||
| 1858 | TP_STRUCT__entry( | ||
| 1859 | __field( dev_t, dev ) | ||
| 1860 | __field( ino_t, ino ) | ||
| 1861 | __field( ext4_lblk_t, lblk ) | ||
| 1862 | __field( unsigned int, len ) | ||
| 1863 | ), | ||
| 1864 | |||
| 1865 | TP_fast_assign( | ||
| 1866 | __entry->dev = inode->i_sb->s_dev; | ||
| 1867 | __entry->ino = inode->i_ino; | ||
| 1868 | __entry->lblk = lblk; | ||
| 1869 | __entry->len = len; | ||
| 1870 | ), | ||
| 1871 | |||
| 1872 | TP_printk("dev %d,%d ino %lu lblk %u len %u", | ||
| 1873 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1874 | (unsigned long) __entry->ino, | ||
| 1875 | (unsigned) __entry->lblk, | ||
| 1876 | __entry->len) | ||
| 1877 | ); | ||
| 1878 | |||
| 1879 | TRACE_EVENT(ext4_ext_show_extent, | ||
| 1880 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, | ||
| 1881 | unsigned short len), | ||
| 1882 | |||
| 1883 | TP_ARGS(inode, lblk, pblk, len), | ||
| 1884 | |||
| 1885 | TP_STRUCT__entry( | ||
| 1886 | __field( dev_t, dev ) | ||
| 1887 | __field( ino_t, ino ) | ||
| 1888 | __field( ext4_fsblk_t, pblk ) | ||
| 1889 | __field( ext4_lblk_t, lblk ) | ||
| 1890 | __field( unsigned short, len ) | ||
| 1891 | ), | ||
| 1892 | |||
| 1893 | TP_fast_assign( | ||
| 1894 | __entry->dev = inode->i_sb->s_dev; | ||
| 1895 | __entry->ino = inode->i_ino; | ||
| 1896 | __entry->pblk = pblk; | ||
| 1897 | __entry->lblk = lblk; | ||
| 1898 | __entry->len = len; | ||
| 1899 | ), | ||
| 1900 | |||
| 1901 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u", | ||
| 1902 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1903 | (unsigned long) __entry->ino, | ||
| 1904 | (unsigned) __entry->lblk, | ||
| 1905 | (unsigned long long) __entry->pblk, | ||
| 1906 | (unsigned short) __entry->len) | ||
| 1907 | ); | ||
| 1908 | |||
| 1909 | TRACE_EVENT(ext4_remove_blocks, | ||
| 1910 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, | ||
| 1911 | ext4_lblk_t from, ext4_fsblk_t to, | ||
| 1912 | ext4_fsblk_t partial_cluster), | ||
| 1913 | |||
| 1914 | TP_ARGS(inode, ex, from, to, partial_cluster), | ||
| 1915 | |||
| 1916 | TP_STRUCT__entry( | ||
| 1917 | __field( dev_t, dev ) | ||
| 1918 | __field( ino_t, ino ) | ||
| 1919 | __field( ext4_lblk_t, from ) | ||
| 1920 | __field( ext4_lblk_t, to ) | ||
| 1921 | __field( ext4_fsblk_t, partial ) | ||
| 1922 | __field( ext4_fsblk_t, ee_pblk ) | ||
| 1923 | __field( ext4_lblk_t, ee_lblk ) | ||
| 1924 | __field( unsigned short, ee_len ) | ||
| 1925 | ), | ||
| 1926 | |||
| 1927 | TP_fast_assign( | ||
| 1928 | __entry->dev = inode->i_sb->s_dev; | ||
| 1929 | __entry->ino = inode->i_ino; | ||
| 1930 | __entry->from = from; | ||
| 1931 | __entry->to = to; | ||
| 1932 | __entry->partial = partial_cluster; | ||
| 1933 | __entry->ee_pblk = ext4_ext_pblock(ex); | ||
| 1934 | __entry->ee_lblk = cpu_to_le32(ex->ee_block); | ||
| 1935 | __entry->ee_len = ext4_ext_get_actual_len(ex); | ||
| 1936 | ), | ||
| 1937 | |||
| 1938 | TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" | ||
| 1939 | "from %u to %u partial_cluster %u", | ||
| 1940 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1941 | (unsigned long) __entry->ino, | ||
| 1942 | (unsigned) __entry->ee_lblk, | ||
| 1943 | (unsigned long long) __entry->ee_pblk, | ||
| 1944 | (unsigned short) __entry->ee_len, | ||
| 1945 | (unsigned) __entry->from, | ||
| 1946 | (unsigned) __entry->to, | ||
| 1947 | (unsigned) __entry->partial) | ||
| 1948 | ); | ||
| 1949 | |||
| 1950 | TRACE_EVENT(ext4_ext_rm_leaf, | ||
| 1951 | TP_PROTO(struct inode *inode, ext4_lblk_t start, | ||
| 1952 | struct ext4_extent *ex, ext4_fsblk_t partial_cluster), | ||
| 1953 | |||
| 1954 | TP_ARGS(inode, start, ex, partial_cluster), | ||
| 1955 | |||
| 1956 | TP_STRUCT__entry( | ||
| 1957 | __field( dev_t, dev ) | ||
| 1958 | __field( ino_t, ino ) | ||
| 1959 | __field( ext4_fsblk_t, partial ) | ||
| 1960 | __field( ext4_lblk_t, start ) | ||
| 1961 | __field( ext4_lblk_t, ee_lblk ) | ||
| 1962 | __field( ext4_fsblk_t, ee_pblk ) | ||
| 1963 | __field( short, ee_len ) | ||
| 1964 | ), | ||
| 1965 | |||
| 1966 | TP_fast_assign( | ||
| 1967 | __entry->dev = inode->i_sb->s_dev; | ||
| 1968 | __entry->ino = inode->i_ino; | ||
| 1969 | __entry->partial = partial_cluster; | ||
| 1970 | __entry->start = start; | ||
| 1971 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); | ||
| 1972 | __entry->ee_pblk = ext4_ext_pblock(ex); | ||
| 1973 | __entry->ee_len = ext4_ext_get_actual_len(ex); | ||
| 1974 | ), | ||
| 1975 | |||
| 1976 | TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" | ||
| 1977 | "partial_cluster %u", | ||
| 1978 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1979 | (unsigned long) __entry->ino, | ||
| 1980 | (unsigned) __entry->start, | ||
| 1981 | (unsigned) __entry->ee_lblk, | ||
| 1982 | (unsigned long long) __entry->ee_pblk, | ||
| 1983 | (unsigned short) __entry->ee_len, | ||
| 1984 | (unsigned) __entry->partial) | ||
| 1985 | ); | ||
| 1986 | |||
| 1987 | TRACE_EVENT(ext4_ext_rm_idx, | ||
| 1988 | TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), | ||
| 1989 | |||
| 1990 | TP_ARGS(inode, pblk), | ||
| 1991 | |||
| 1992 | TP_STRUCT__entry( | ||
| 1993 | __field( dev_t, dev ) | ||
| 1994 | __field( ino_t, ino ) | ||
| 1995 | __field( ext4_fsblk_t, pblk ) | ||
| 1996 | ), | ||
| 1997 | |||
| 1998 | TP_fast_assign( | ||
| 1999 | __entry->dev = inode->i_sb->s_dev; | ||
| 2000 | __entry->ino = inode->i_ino; | ||
| 2001 | __entry->pblk = pblk; | ||
| 2002 | ), | ||
| 2003 | |||
| 2004 | TP_printk("dev %d,%d ino %lu index_pblk %llu", | ||
| 2005 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 2006 | (unsigned long) __entry->ino, | ||
| 2007 | (unsigned long long) __entry->pblk) | ||
| 2008 | ); | ||
| 2009 | |||
| 2010 | TRACE_EVENT(ext4_ext_remove_space, | ||
| 2011 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth), | ||
| 2012 | |||
| 2013 | TP_ARGS(inode, start, depth), | ||
| 2014 | |||
| 2015 | TP_STRUCT__entry( | ||
| 2016 | __field( dev_t, dev ) | ||
| 2017 | __field( ino_t, ino ) | ||
| 2018 | __field( ext4_lblk_t, start ) | ||
| 2019 | __field( int, depth ) | ||
| 2020 | ), | ||
| 2021 | |||
| 2022 | TP_fast_assign( | ||
| 2023 | __entry->dev = inode->i_sb->s_dev; | ||
| 2024 | __entry->ino = inode->i_ino; | ||
| 2025 | __entry->start = start; | ||
| 2026 | __entry->depth = depth; | ||
| 2027 | ), | ||
| 2028 | |||
| 2029 | TP_printk("dev %d,%d ino %lu since %u depth %d", | ||
| 2030 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 2031 | (unsigned long) __entry->ino, | ||
| 2032 | (unsigned) __entry->start, | ||
| 2033 | __entry->depth) | ||
| 2034 | ); | ||
| 2035 | |||
| 2036 | TRACE_EVENT(ext4_ext_remove_space_done, | ||
| 2037 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, | ||
| 2038 | ext4_lblk_t partial, unsigned short eh_entries), | ||
| 2039 | |||
| 2040 | TP_ARGS(inode, start, depth, partial, eh_entries), | ||
| 2041 | |||
| 2042 | TP_STRUCT__entry( | ||
| 2043 | __field( dev_t, dev ) | ||
| 2044 | __field( ino_t, ino ) | ||
| 2045 | __field( ext4_lblk_t, start ) | ||
| 2046 | __field( int, depth ) | ||
| 2047 | __field( ext4_lblk_t, partial ) | ||
| 2048 | __field( unsigned short, eh_entries ) | ||
| 2049 | ), | ||
| 2050 | |||
| 2051 | TP_fast_assign( | ||
| 2052 | __entry->dev = inode->i_sb->s_dev; | ||
| 2053 | __entry->ino = inode->i_ino; | ||
| 2054 | __entry->start = start; | ||
| 2055 | __entry->depth = depth; | ||
| 2056 | __entry->partial = partial; | ||
| 2057 | __entry->eh_entries = eh_entries; | ||
| 2058 | ), | ||
| 2059 | |||
| 2060 | TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " | ||
| 2061 | "remaining_entries %u", | ||
| 2062 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 2063 | (unsigned long) __entry->ino, | ||
| 2064 | (unsigned) __entry->start, | ||
| 2065 | __entry->depth, | ||
| 2066 | (unsigned) __entry->partial, | ||
| 2067 | (unsigned short) __entry->eh_entries) | ||
| 2068 | ); | ||
| 2069 | |||
| 2070 | TRACE_EVENT(ext4_es_insert_extent, | ||
| 2071 | TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t len), | ||
| 2072 | |||
| 2073 | TP_ARGS(inode, start, len), | ||
| 2074 | |||
| 2075 | TP_STRUCT__entry( | ||
| 2076 | __field( dev_t, dev ) | ||
| 2077 | __field( ino_t, ino ) | ||
| 2078 | __field( loff_t, start ) | ||
| 2079 | __field( loff_t, len ) | ||
| 2080 | ), | ||
| 2081 | |||
| 2082 | TP_fast_assign( | ||
| 2083 | __entry->dev = inode->i_sb->s_dev; | ||
| 2084 | __entry->ino = inode->i_ino; | ||
| 2085 | __entry->start = start; | ||
| 2086 | __entry->len = len; | ||
| 2087 | ), | ||
| 2088 | |||
| 2089 | TP_printk("dev %d,%d ino %lu es [%lld/%lld)", | ||
| 2090 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 2091 | (unsigned long) __entry->ino, | ||
| 2092 | __entry->start, __entry->len) | ||
| 2093 | ); | ||
| 2094 | |||
| 2095 | TRACE_EVENT(ext4_es_remove_extent, | ||
| 2096 | TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t len), | ||
| 2097 | |||
| 2098 | TP_ARGS(inode, start, len), | ||
| 2099 | |||
| 2100 | TP_STRUCT__entry( | ||
| 2101 | __field( dev_t, dev ) | ||
| 2102 | __field( ino_t, ino ) | ||
| 2103 | __field( loff_t, start ) | ||
| 2104 | __field( loff_t, len ) | ||
| 2105 | ), | ||
| 2106 | |||
| 2107 | TP_fast_assign( | ||
| 2108 | __entry->dev = inode->i_sb->s_dev; | ||
| 2109 | __entry->ino = inode->i_ino; | ||
| 2110 | __entry->start = start; | ||
| 2111 | __entry->len = len; | ||
| 2112 | ), | ||
| 2113 | |||
| 2114 | TP_printk("dev %d,%d ino %lu es [%lld/%lld)", | ||
| 2115 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 2116 | (unsigned long) __entry->ino, | ||
| 2117 | __entry->start, __entry->len) | ||
| 2118 | ); | ||
| 2119 | |||
| 2120 | TRACE_EVENT(ext4_es_find_extent_enter, | ||
| 2121 | TP_PROTO(struct inode *inode, ext4_lblk_t start), | ||
| 2122 | |||
| 2123 | TP_ARGS(inode, start), | ||
| 2124 | |||
| 2125 | TP_STRUCT__entry( | ||
| 2126 | __field( dev_t, dev ) | ||
| 2127 | __field( ino_t, ino ) | ||
| 2128 | __field( ext4_lblk_t, start ) | ||
| 2129 | ), | ||
| 2130 | |||
| 2131 | TP_fast_assign( | ||
| 2132 | __entry->dev = inode->i_sb->s_dev; | ||
| 2133 | __entry->ino = inode->i_ino; | ||
| 2134 | __entry->start = start; | ||
| 2135 | ), | ||
| 2136 | |||
| 2137 | TP_printk("dev %d,%d ino %lu start %u", | ||
| 2138 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 2139 | (unsigned long) __entry->ino, __entry->start) | ||
| 2140 | ); | ||
| 2141 | |||
| 2142 | TRACE_EVENT(ext4_es_find_extent_exit, | ||
| 2143 | TP_PROTO(struct inode *inode, struct extent_status *es, | ||
| 2144 | ext4_lblk_t ret), | ||
| 2145 | |||
| 2146 | TP_ARGS(inode, es, ret), | ||
| 2147 | |||
| 2148 | TP_STRUCT__entry( | ||
| 2149 | __field( dev_t, dev ) | ||
| 2150 | __field( ino_t, ino ) | ||
| 2151 | __field( ext4_lblk_t, start ) | ||
| 2152 | __field( ext4_lblk_t, len ) | ||
| 2153 | __field( ext4_lblk_t, ret ) | ||
| 2154 | ), | ||
| 2155 | |||
| 2156 | TP_fast_assign( | ||
| 2157 | __entry->dev = inode->i_sb->s_dev; | ||
| 2158 | __entry->ino = inode->i_ino; | ||
| 2159 | __entry->start = es->start; | ||
| 2160 | __entry->len = es->len; | ||
| 2161 | __entry->ret = ret; | ||
| 2162 | ), | ||
| 2163 | |||
| 2164 | TP_printk("dev %d,%d ino %lu es [%u/%u) ret %u", | ||
| 2165 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 2166 | (unsigned long) __entry->ino, | ||
| 2167 | __entry->start, __entry->len, __entry->ret) | ||
| 2168 | ); | ||
| 2169 | |||
| 2170 | #endif /* _TRACE_EXT4_H */ | 1592 | #endif /* _TRACE_EXT4_H */ |
| 2171 | 1593 | ||
| 2172 | /* This part must be outside protection */ | 1594 | /* This part must be outside protection */ |
diff --git a/include/trace/events/gfpflags.h b/include/trace/events/gfpflags.h index 1eddbf1557f..9fe3a36646e 100644 --- a/include/trace/events/gfpflags.h +++ b/include/trace/events/gfpflags.h | |||
| @@ -30,11 +30,9 @@ | |||
| 30 | {(unsigned long)__GFP_COMP, "GFP_COMP"}, \ | 30 | {(unsigned long)__GFP_COMP, "GFP_COMP"}, \ |
| 31 | {(unsigned long)__GFP_ZERO, "GFP_ZERO"}, \ | 31 | {(unsigned long)__GFP_ZERO, "GFP_ZERO"}, \ |
| 32 | {(unsigned long)__GFP_NOMEMALLOC, "GFP_NOMEMALLOC"}, \ | 32 | {(unsigned long)__GFP_NOMEMALLOC, "GFP_NOMEMALLOC"}, \ |
| 33 | {(unsigned long)__GFP_MEMALLOC, "GFP_MEMALLOC"}, \ | ||
| 34 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ | 33 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ |
| 35 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ | 34 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ |
| 36 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ | 35 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ |
| 37 | {(unsigned long)__GFP_KMEMCG, "GFP_KMEMCG"}, \ | ||
| 38 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"}, \ | 36 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"}, \ |
| 39 | {(unsigned long)__GFP_NOTRACK, "GFP_NOTRACK"}, \ | 37 | {(unsigned long)__GFP_NOTRACK, "GFP_NOTRACK"}, \ |
| 40 | {(unsigned long)__GFP_NO_KSWAPD, "GFP_NO_KSWAPD"}, \ | 38 | {(unsigned long)__GFP_NO_KSWAPD, "GFP_NO_KSWAPD"}, \ |
diff --git a/include/trace/events/jbd.h b/include/trace/events/jbd.h index da6f2591c25..aff64d82d71 100644 --- a/include/trace/events/jbd.h +++ b/include/trace/events/jbd.h | |||
| @@ -36,17 +36,19 @@ DECLARE_EVENT_CLASS(jbd_commit, | |||
| 36 | 36 | ||
| 37 | TP_STRUCT__entry( | 37 | TP_STRUCT__entry( |
| 38 | __field( dev_t, dev ) | 38 | __field( dev_t, dev ) |
| 39 | __field( char, sync_commit ) | ||
| 39 | __field( int, transaction ) | 40 | __field( int, transaction ) |
| 40 | ), | 41 | ), |
| 41 | 42 | ||
| 42 | TP_fast_assign( | 43 | TP_fast_assign( |
| 43 | __entry->dev = journal->j_fs_dev->bd_dev; | 44 | __entry->dev = journal->j_fs_dev->bd_dev; |
| 45 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
| 44 | __entry->transaction = commit_transaction->t_tid; | 46 | __entry->transaction = commit_transaction->t_tid; |
| 45 | ), | 47 | ), |
| 46 | 48 | ||
| 47 | TP_printk("dev %d,%d transaction %d", | 49 | TP_printk("dev %d,%d transaction %d sync %d", |
| 48 | MAJOR(__entry->dev), MINOR(__entry->dev), | 50 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 49 | __entry->transaction) | 51 | __entry->transaction, __entry->sync_commit) |
| 50 | ); | 52 | ); |
| 51 | 53 | ||
| 52 | DEFINE_EVENT(jbd_commit, jbd_start_commit, | 54 | DEFINE_EVENT(jbd_commit, jbd_start_commit, |
| @@ -85,17 +87,19 @@ TRACE_EVENT(jbd_drop_transaction, | |||
| 85 | 87 | ||
| 86 | TP_STRUCT__entry( | 88 | TP_STRUCT__entry( |
| 87 | __field( dev_t, dev ) | 89 | __field( dev_t, dev ) |
| 90 | __field( char, sync_commit ) | ||
| 88 | __field( int, transaction ) | 91 | __field( int, transaction ) |
| 89 | ), | 92 | ), |
| 90 | 93 | ||
| 91 | TP_fast_assign( | 94 | TP_fast_assign( |
| 92 | __entry->dev = journal->j_fs_dev->bd_dev; | 95 | __entry->dev = journal->j_fs_dev->bd_dev; |
| 96 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
| 93 | __entry->transaction = commit_transaction->t_tid; | 97 | __entry->transaction = commit_transaction->t_tid; |
| 94 | ), | 98 | ), |
| 95 | 99 | ||
| 96 | TP_printk("dev %d,%d transaction %d", | 100 | TP_printk("dev %d,%d transaction %d sync %d", |
| 97 | MAJOR(__entry->dev), MINOR(__entry->dev), | 101 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 98 | __entry->transaction) | 102 | __entry->transaction, __entry->sync_commit) |
| 99 | ); | 103 | ); |
| 100 | 104 | ||
| 101 | TRACE_EVENT(jbd_end_commit, | 105 | TRACE_EVENT(jbd_end_commit, |
| @@ -105,19 +109,21 @@ TRACE_EVENT(jbd_end_commit, | |||
| 105 | 109 | ||
| 106 | TP_STRUCT__entry( | 110 | TP_STRUCT__entry( |
| 107 | __field( dev_t, dev ) | 111 | __field( dev_t, dev ) |
| 112 | __field( char, sync_commit ) | ||
| 108 | __field( int, transaction ) | 113 | __field( int, transaction ) |
| 109 | __field( int, head ) | 114 | __field( int, head ) |
| 110 | ), | 115 | ), |
| 111 | 116 | ||
| 112 | TP_fast_assign( | 117 | TP_fast_assign( |
| 113 | __entry->dev = journal->j_fs_dev->bd_dev; | 118 | __entry->dev = journal->j_fs_dev->bd_dev; |
| 119 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
| 114 | __entry->transaction = commit_transaction->t_tid; | 120 | __entry->transaction = commit_transaction->t_tid; |
| 115 | __entry->head = journal->j_tail_sequence; | 121 | __entry->head = journal->j_tail_sequence; |
| 116 | ), | 122 | ), |
| 117 | 123 | ||
| 118 | TP_printk("dev %d,%d transaction %d head %d", | 124 | TP_printk("dev %d,%d transaction %d sync %d head %d", |
| 119 | MAJOR(__entry->dev), MINOR(__entry->dev), | 125 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 120 | __entry->transaction, __entry->head) | 126 | __entry->transaction, __entry->sync_commit, __entry->head) |
| 121 | ); | 127 | ); |
| 122 | 128 | ||
| 123 | TRACE_EVENT(jbd_do_submit_data, | 129 | TRACE_EVENT(jbd_do_submit_data, |
| @@ -127,17 +133,19 @@ TRACE_EVENT(jbd_do_submit_data, | |||
| 127 | 133 | ||
| 128 | TP_STRUCT__entry( | 134 | TP_STRUCT__entry( |
| 129 | __field( dev_t, dev ) | 135 | __field( dev_t, dev ) |
| 136 | __field( char, sync_commit ) | ||
| 130 | __field( int, transaction ) | 137 | __field( int, transaction ) |
| 131 | ), | 138 | ), |
| 132 | 139 | ||
| 133 | TP_fast_assign( | 140 | TP_fast_assign( |
| 134 | __entry->dev = journal->j_fs_dev->bd_dev; | 141 | __entry->dev = journal->j_fs_dev->bd_dev; |
| 142 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
| 135 | __entry->transaction = commit_transaction->t_tid; | 143 | __entry->transaction = commit_transaction->t_tid; |
| 136 | ), | 144 | ), |
| 137 | 145 | ||
| 138 | TP_printk("dev %d,%d transaction %d", | 146 | TP_printk("dev %d,%d transaction %d sync %d", |
| 139 | MAJOR(__entry->dev), MINOR(__entry->dev), | 147 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 140 | __entry->transaction) | 148 | __entry->transaction, __entry->sync_commit) |
| 141 | ); | 149 | ); |
| 142 | 150 | ||
| 143 | TRACE_EVENT(jbd_cleanup_journal_tail, | 151 | TRACE_EVENT(jbd_cleanup_journal_tail, |
| @@ -169,23 +177,24 @@ TRACE_EVENT(jbd_cleanup_journal_tail, | |||
| 169 | __entry->block_nr, __entry->freed) | 177 | __entry->block_nr, __entry->freed) |
| 170 | ); | 178 | ); |
| 171 | 179 | ||
| 172 | TRACE_EVENT(journal_write_superblock, | 180 | TRACE_EVENT(jbd_update_superblock_end, |
| 173 | TP_PROTO(journal_t *journal, int write_op), | 181 | TP_PROTO(journal_t *journal, int wait), |
| 174 | 182 | ||
| 175 | TP_ARGS(journal, write_op), | 183 | TP_ARGS(journal, wait), |
| 176 | 184 | ||
| 177 | TP_STRUCT__entry( | 185 | TP_STRUCT__entry( |
| 178 | __field( dev_t, dev ) | 186 | __field( dev_t, dev ) |
| 179 | __field( int, write_op ) | 187 | __field( int, wait ) |
| 180 | ), | 188 | ), |
| 181 | 189 | ||
| 182 | TP_fast_assign( | 190 | TP_fast_assign( |
| 183 | __entry->dev = journal->j_fs_dev->bd_dev; | 191 | __entry->dev = journal->j_fs_dev->bd_dev; |
| 184 | __entry->write_op = write_op; | 192 | __entry->wait = wait; |
| 185 | ), | 193 | ), |
| 186 | 194 | ||
| 187 | TP_printk("dev %d,%d write_op %x", MAJOR(__entry->dev), | 195 | TP_printk("dev %d,%d wait %d", |
| 188 | MINOR(__entry->dev), __entry->write_op) | 196 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 197 | __entry->wait) | ||
| 189 | ); | 198 | ); |
| 190 | 199 | ||
| 191 | #endif /* _TRACE_JBD_H */ | 200 | #endif /* _TRACE_JBD_H */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 127993dbf32..75964412ddb 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
| @@ -81,13 +81,6 @@ DEFINE_EVENT(jbd2_commit, jbd2_commit_logging, | |||
| 81 | TP_ARGS(journal, commit_transaction) | 81 | TP_ARGS(journal, commit_transaction) |
| 82 | ); | 82 | ); |
| 83 | 83 | ||
| 84 | DEFINE_EVENT(jbd2_commit, jbd2_drop_transaction, | ||
| 85 | |||
| 86 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
| 87 | |||
| 88 | TP_ARGS(journal, commit_transaction) | ||
| 89 | ); | ||
| 90 | |||
| 91 | TRACE_EVENT(jbd2_end_commit, | 84 | TRACE_EVENT(jbd2_end_commit, |
| 92 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | 85 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 93 | 86 | ||
| @@ -207,7 +200,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
| 207 | __entry->forced_to_close, __entry->written, __entry->dropped) | 200 | __entry->forced_to_close, __entry->written, __entry->dropped) |
| 208 | ); | 201 | ); |
| 209 | 202 | ||
| 210 | TRACE_EVENT(jbd2_update_log_tail, | 203 | TRACE_EVENT(jbd2_cleanup_journal_tail, |
| 211 | 204 | ||
| 212 | TP_PROTO(journal_t *journal, tid_t first_tid, | 205 | TP_PROTO(journal_t *journal, tid_t first_tid, |
| 213 | unsigned long block_nr, unsigned long freed), | 206 | unsigned long block_nr, unsigned long freed), |
| @@ -236,26 +229,6 @@ TRACE_EVENT(jbd2_update_log_tail, | |||
| 236 | __entry->block_nr, __entry->freed) | 229 | __entry->block_nr, __entry->freed) |
| 237 | ); | 230 | ); |
| 238 | 231 | ||
| 239 | TRACE_EVENT(jbd2_write_superblock, | ||
| 240 | |||
| 241 | TP_PROTO(journal_t *journal, int write_op), | ||
| 242 | |||
| 243 | TP_ARGS(journal, write_op), | ||
| 244 | |||
| 245 | TP_STRUCT__entry( | ||
| 246 | __field( dev_t, dev ) | ||
| 247 | __field( int, write_op ) | ||
| 248 | ), | ||
| 249 | |||
| 250 | TP_fast_assign( | ||
| 251 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
| 252 | __entry->write_op = write_op; | ||
| 253 | ), | ||
| 254 | |||
| 255 | TP_printk("dev %d,%d write_op %x", MAJOR(__entry->dev), | ||
| 256 | MINOR(__entry->dev), __entry->write_op) | ||
| 257 | ); | ||
| 258 | |||
| 259 | #endif /* _TRACE_JBD2_H */ | 232 | #endif /* _TRACE_JBD2_H */ |
| 260 | 233 | ||
| 261 | /* This part must be outside protection */ | 234 | /* This part must be outside protection */ |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 6bc943ecb84..a9c87ad8331 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | #include <trace/events/gfpflags.h> | 9 | #include "gfpflags.h" |
| 10 | 10 | ||
| 11 | DECLARE_EVENT_CLASS(kmem_alloc, | 11 | DECLARE_EVENT_CLASS(kmem_alloc, |
| 12 | 12 | ||
| @@ -147,7 +147,7 @@ DEFINE_EVENT(kmem_free, kmem_cache_free, | |||
| 147 | TP_ARGS(call_site, ptr) | 147 | TP_ARGS(call_site, ptr) |
| 148 | ); | 148 | ); |
| 149 | 149 | ||
| 150 | TRACE_EVENT(mm_page_free, | 150 | TRACE_EVENT(mm_page_free_direct, |
| 151 | 151 | ||
| 152 | TP_PROTO(struct page *page, unsigned int order), | 152 | TP_PROTO(struct page *page, unsigned int order), |
| 153 | 153 | ||
| @@ -169,7 +169,7 @@ TRACE_EVENT(mm_page_free, | |||
| 169 | __entry->order) | 169 | __entry->order) |
| 170 | ); | 170 | ); |
| 171 | 171 | ||
| 172 | TRACE_EVENT(mm_page_free_batched, | 172 | TRACE_EVENT(mm_pagevec_free, |
| 173 | 173 | ||
| 174 | TP_PROTO(struct page *page, int cold), | 174 | TP_PROTO(struct page *page, int cold), |
| 175 | 175 | ||
| @@ -214,7 +214,7 @@ TRACE_EVENT(mm_page_alloc, | |||
| 214 | 214 | ||
| 215 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s", | 215 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s", |
| 216 | __entry->page, | 216 | __entry->page, |
| 217 | __entry->page ? page_to_pfn(__entry->page) : 0, | 217 | page_to_pfn(__entry->page), |
| 218 | __entry->order, | 218 | __entry->order, |
| 219 | __entry->migratetype, | 219 | __entry->migratetype, |
| 220 | show_gfp_flags(__entry->gfp_flags)) | 220 | show_gfp_flags(__entry->gfp_flags)) |
| @@ -240,7 +240,7 @@ DECLARE_EVENT_CLASS(mm_page, | |||
| 240 | 240 | ||
| 241 | TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d", | 241 | TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d", |
| 242 | __entry->page, | 242 | __entry->page, |
| 243 | __entry->page ? page_to_pfn(__entry->page) : 0, | 243 | page_to_pfn(__entry->page), |
| 244 | __entry->order, | 244 | __entry->order, |
| 245 | __entry->migratetype, | 245 | __entry->migratetype, |
| 246 | __entry->order == 0) | 246 | __entry->order == 0) |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index 7ef9e759f49..46e3cd8e197 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
| @@ -13,8 +13,7 @@ | |||
| 13 | ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN), \ | 13 | ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN), \ |
| 14 | ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR), \ | 14 | ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR), \ |
| 15 | ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\ | 15 | ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\ |
| 16 | ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL), \ | 16 | ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI) |
| 17 | ERSN(S390_UCONTROL) | ||
| 18 | 17 | ||
| 19 | TRACE_EVENT(kvm_userspace_exit, | 18 | TRACE_EVENT(kvm_userspace_exit, |
| 20 | TP_PROTO(__u32 reason, int errno), | 19 | TP_PROTO(__u32 reason, int errno), |
| @@ -37,7 +36,7 @@ TRACE_EVENT(kvm_userspace_exit, | |||
| 37 | __entry->errno < 0 ? -__entry->errno : __entry->reason) | 36 | __entry->errno < 0 ? -__entry->errno : __entry->reason) |
| 38 | ); | 37 | ); |
| 39 | 38 | ||
| 40 | #if defined(__KVM_HAVE_IRQ_LINE) | 39 | #if defined(__KVM_HAVE_IOAPIC) |
| 41 | TRACE_EVENT(kvm_set_irq, | 40 | TRACE_EVENT(kvm_set_irq, |
| 42 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), | 41 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), |
| 43 | TP_ARGS(gsi, level, irq_source_id), | 42 | TP_ARGS(gsi, level, irq_source_id), |
| @@ -57,9 +56,7 @@ TRACE_EVENT(kvm_set_irq, | |||
| 57 | TP_printk("gsi %u level %d source %d", | 56 | TP_printk("gsi %u level %d source %d", |
| 58 | __entry->gsi, __entry->level, __entry->irq_source_id) | 57 | __entry->gsi, __entry->level, __entry->irq_source_id) |
| 59 | ); | 58 | ); |
| 60 | #endif | ||
| 61 | 59 | ||
| 62 | #if defined(__KVM_HAVE_IOAPIC) | ||
| 63 | #define kvm_deliver_mode \ | 60 | #define kvm_deliver_mode \ |
| 64 | {0x0, "Fixed"}, \ | 61 | {0x0, "Fixed"}, \ |
| 65 | {0x1, "LowPrio"}, \ | 62 | {0x1, "LowPrio"}, \ |
diff --git a/include/trace/events/migrate.h b/include/trace/events/migrate.h deleted file mode 100644 index ec2a6ccfd7e..00000000000 --- a/include/trace/events/migrate.h +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM migrate | ||
| 3 | |||
| 4 | #if !defined(_TRACE_MIGRATE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_MIGRATE_H | ||
| 6 | |||
| 7 | #define MIGRATE_MODE \ | ||
| 8 | {MIGRATE_ASYNC, "MIGRATE_ASYNC"}, \ | ||
| 9 | {MIGRATE_SYNC_LIGHT, "MIGRATE_SYNC_LIGHT"}, \ | ||
| 10 | {MIGRATE_SYNC, "MIGRATE_SYNC"} | ||
| 11 | |||
| 12 | #define MIGRATE_REASON \ | ||
| 13 | {MR_COMPACTION, "compaction"}, \ | ||
| 14 | {MR_MEMORY_FAILURE, "memory_failure"}, \ | ||
| 15 | {MR_MEMORY_HOTPLUG, "memory_hotplug"}, \ | ||
| 16 | {MR_SYSCALL, "syscall_or_cpuset"}, \ | ||
| 17 | {MR_MEMPOLICY_MBIND, "mempolicy_mbind"}, \ | ||
| 18 | {MR_CMA, "cma"} | ||
| 19 | |||
| 20 | TRACE_EVENT(mm_migrate_pages, | ||
| 21 | |||
| 22 | TP_PROTO(unsigned long succeeded, unsigned long failed, | ||
| 23 | enum migrate_mode mode, int reason), | ||
| 24 | |||
| 25 | TP_ARGS(succeeded, failed, mode, reason), | ||
| 26 | |||
| 27 | TP_STRUCT__entry( | ||
| 28 | __field( unsigned long, succeeded) | ||
| 29 | __field( unsigned long, failed) | ||
| 30 | __field( enum migrate_mode, mode) | ||
| 31 | __field( int, reason) | ||
| 32 | ), | ||
| 33 | |||
| 34 | TP_fast_assign( | ||
| 35 | __entry->succeeded = succeeded; | ||
| 36 | __entry->failed = failed; | ||
| 37 | __entry->mode = mode; | ||
| 38 | __entry->reason = reason; | ||
| 39 | ), | ||
| 40 | |||
| 41 | TP_printk("nr_succeeded=%lu nr_failed=%lu mode=%s reason=%s", | ||
| 42 | __entry->succeeded, | ||
| 43 | __entry->failed, | ||
| 44 | __print_symbolic(__entry->mode, MIGRATE_MODE), | ||
| 45 | __print_symbolic(__entry->reason, MIGRATE_REASON)) | ||
| 46 | ); | ||
| 47 | |||
| 48 | #endif /* _TRACE_MIGRATE_H */ | ||
| 49 | |||
| 50 | /* This part must be outside protection */ | ||
| 51 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index 16193273741..21a546d27c0 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Because linux/module.h has tracepoints in the header, and ftrace.h | 2 | * Because linux/module.h has tracepoints in the header, and ftrace.h |
| 3 | * used to include this file, define_trace.h includes linux/module.h | 3 | * eventually includes this file, define_trace.h includes linux/module.h |
| 4 | * But we do not want the module.h to override the TRACE_SYSTEM macro | 4 | * But we do not want the module.h to override the TRACE_SYSTEM macro |
| 5 | * variable that define_trace.h is processing, so we only set it | 5 | * variable that define_trace.h is processing, so we only set it |
| 6 | * when module events are being processed, which would happen when | 6 | * when module events are being processed, which would happen when |
diff --git a/include/trace/events/oom.h b/include/trace/events/oom.h deleted file mode 100644 index 1e974983757..00000000000 --- a/include/trace/events/oom.h +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM oom | ||
| 3 | |||
| 4 | #if !defined(_TRACE_OOM_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_OOM_H | ||
| 6 | #include <linux/tracepoint.h> | ||
| 7 | |||
| 8 | TRACE_EVENT(oom_score_adj_update, | ||
| 9 | |||
| 10 | TP_PROTO(struct task_struct *task), | ||
| 11 | |||
| 12 | TP_ARGS(task), | ||
| 13 | |||
| 14 | TP_STRUCT__entry( | ||
| 15 | __field( pid_t, pid) | ||
| 16 | __array( char, comm, TASK_COMM_LEN ) | ||
| 17 | __field( short, oom_score_adj) | ||
| 18 | ), | ||
| 19 | |||
| 20 | TP_fast_assign( | ||
| 21 | __entry->pid = task->pid; | ||
| 22 | memcpy(__entry->comm, task->comm, TASK_COMM_LEN); | ||
| 23 | __entry->oom_score_adj = task->signal->oom_score_adj; | ||
| 24 | ), | ||
| 25 | |||
| 26 | TP_printk("pid=%d comm=%s oom_score_adj=%hd", | ||
| 27 | __entry->pid, __entry->comm, __entry->oom_score_adj) | ||
| 28 | ); | ||
| 29 | |||
| 30 | #endif | ||
| 31 | |||
| 32 | /* This part must be outside protection */ | ||
| 33 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 0c9783841a3..1bcc2a8c00e 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h | |||
| @@ -65,40 +65,7 @@ TRACE_EVENT(machine_suspend, | |||
| 65 | TP_printk("state=%lu", (unsigned long)__entry->state) | 65 | TP_printk("state=%lu", (unsigned long)__entry->state) |
| 66 | ); | 66 | ); |
| 67 | 67 | ||
| 68 | DECLARE_EVENT_CLASS(wakeup_source, | 68 | /* This code will be removed after deprecation time exceeded (2.6.41) */ |
| 69 | |||
| 70 | TP_PROTO(const char *name, unsigned int state), | ||
| 71 | |||
| 72 | TP_ARGS(name, state), | ||
| 73 | |||
| 74 | TP_STRUCT__entry( | ||
| 75 | __string( name, name ) | ||
| 76 | __field( u64, state ) | ||
| 77 | ), | ||
| 78 | |||
| 79 | TP_fast_assign( | ||
| 80 | __assign_str(name, name); | ||
| 81 | __entry->state = state; | ||
| 82 | ), | ||
| 83 | |||
| 84 | TP_printk("%s state=0x%lx", __get_str(name), | ||
| 85 | (unsigned long)__entry->state) | ||
| 86 | ); | ||
| 87 | |||
| 88 | DEFINE_EVENT(wakeup_source, wakeup_source_activate, | ||
| 89 | |||
| 90 | TP_PROTO(const char *name, unsigned int state), | ||
| 91 | |||
| 92 | TP_ARGS(name, state) | ||
| 93 | ); | ||
| 94 | |||
| 95 | DEFINE_EVENT(wakeup_source, wakeup_source_deactivate, | ||
| 96 | |||
| 97 | TP_PROTO(const char *name, unsigned int state), | ||
| 98 | |||
| 99 | TP_ARGS(name, state) | ||
| 100 | ); | ||
| 101 | |||
| 102 | #ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED | 69 | #ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED |
| 103 | 70 | ||
| 104 | /* | 71 | /* |
| @@ -184,8 +151,6 @@ enum { | |||
| 184 | events get removed */ | 151 | events get removed */ |
| 185 | static inline void trace_power_start(u64 type, u64 state, u64 cpuid) {}; | 152 | static inline void trace_power_start(u64 type, u64 state, u64 cpuid) {}; |
| 186 | static inline void trace_power_end(u64 cpuid) {}; | 153 | static inline void trace_power_end(u64 cpuid) {}; |
| 187 | static inline void trace_power_start_rcuidle(u64 type, u64 state, u64 cpuid) {}; | ||
| 188 | static inline void trace_power_end_rcuidle(u64 cpuid) {}; | ||
| 189 | static inline void trace_power_frequency(u64 type, u64 state, u64 cpuid) {}; | 154 | static inline void trace_power_frequency(u64 type, u64 state, u64 cpuid) {}; |
| 190 | #endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ | 155 | #endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ |
| 191 | 156 | ||
diff --git a/include/trace/events/printk.h b/include/trace/events/printk.h deleted file mode 100644 index 94ec79cc011..00000000000 --- a/include/trace/events/printk.h +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM printk | ||
| 3 | |||
| 4 | #if !defined(_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_PRINTK_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | TRACE_EVENT_CONDITION(console, | ||
| 10 | TP_PROTO(const char *log_buf, unsigned start, unsigned end, | ||
| 11 | unsigned log_buf_len), | ||
| 12 | |||
| 13 | TP_ARGS(log_buf, start, end, log_buf_len), | ||
| 14 | |||
| 15 | TP_CONDITION(start != end), | ||
| 16 | |||
| 17 | TP_STRUCT__entry( | ||
| 18 | __dynamic_array(char, msg, end - start + 1) | ||
| 19 | ), | ||
| 20 | |||
| 21 | TP_fast_assign( | ||
| 22 | if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) { | ||
| 23 | memcpy(__get_dynamic_array(msg), | ||
| 24 | log_buf + (start & (log_buf_len - 1)), | ||
| 25 | log_buf_len - (start & (log_buf_len - 1))); | ||
| 26 | memcpy((char *)__get_dynamic_array(msg) + | ||
| 27 | log_buf_len - (start & (log_buf_len - 1)), | ||
| 28 | log_buf, end & (log_buf_len - 1)); | ||
| 29 | } else | ||
| 30 | memcpy(__get_dynamic_array(msg), | ||
| 31 | log_buf + (start & (log_buf_len - 1)), | ||
| 32 | end - start); | ||
| 33 | ((char *)__get_dynamic_array(msg))[end - start] = 0; | ||
| 34 | ), | ||
| 35 | |||
| 36 | TP_printk("%s", __get_str(msg)) | ||
| 37 | ); | ||
| 38 | #endif /* _TRACE_PRINTK_H */ | ||
| 39 | |||
| 40 | /* This part must be outside protection */ | ||
| 41 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/random.h b/include/trace/events/random.h deleted file mode 100644 index 422df19de73..00000000000 --- a/include/trace/events/random.h +++ /dev/null | |||
| @@ -1,134 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM random | ||
| 3 | |||
| 4 | #if !defined(_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_RANDOM_H | ||
| 6 | |||
| 7 | #include <linux/writeback.h> | ||
| 8 | #include <linux/tracepoint.h> | ||
| 9 | |||
| 10 | DECLARE_EVENT_CLASS(random__mix_pool_bytes, | ||
| 11 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), | ||
| 12 | |||
| 13 | TP_ARGS(pool_name, bytes, IP), | ||
| 14 | |||
| 15 | TP_STRUCT__entry( | ||
| 16 | __field( const char *, pool_name ) | ||
| 17 | __field( int, bytes ) | ||
| 18 | __field(unsigned long, IP ) | ||
| 19 | ), | ||
| 20 | |||
| 21 | TP_fast_assign( | ||
| 22 | __entry->pool_name = pool_name; | ||
| 23 | __entry->bytes = bytes; | ||
| 24 | __entry->IP = IP; | ||
| 25 | ), | ||
| 26 | |||
| 27 | TP_printk("%s pool: bytes %d caller %pF", | ||
| 28 | __entry->pool_name, __entry->bytes, (void *)__entry->IP) | ||
| 29 | ); | ||
| 30 | |||
| 31 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes, | ||
| 32 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), | ||
| 33 | |||
| 34 | TP_ARGS(pool_name, bytes, IP) | ||
| 35 | ); | ||
| 36 | |||
| 37 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock, | ||
| 38 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), | ||
| 39 | |||
| 40 | TP_ARGS(pool_name, bytes, IP) | ||
| 41 | ); | ||
| 42 | |||
| 43 | TRACE_EVENT(credit_entropy_bits, | ||
| 44 | TP_PROTO(const char *pool_name, int bits, int entropy_count, | ||
| 45 | int entropy_total, unsigned long IP), | ||
| 46 | |||
| 47 | TP_ARGS(pool_name, bits, entropy_count, entropy_total, IP), | ||
| 48 | |||
| 49 | TP_STRUCT__entry( | ||
| 50 | __field( const char *, pool_name ) | ||
| 51 | __field( int, bits ) | ||
| 52 | __field( int, entropy_count ) | ||
| 53 | __field( int, entropy_total ) | ||
| 54 | __field(unsigned long, IP ) | ||
| 55 | ), | ||
| 56 | |||
| 57 | TP_fast_assign( | ||
| 58 | __entry->pool_name = pool_name; | ||
| 59 | __entry->bits = bits; | ||
| 60 | __entry->entropy_count = entropy_count; | ||
| 61 | __entry->entropy_total = entropy_total; | ||
| 62 | __entry->IP = IP; | ||
| 63 | ), | ||
| 64 | |||
| 65 | TP_printk("%s pool: bits %d entropy_count %d entropy_total %d " | ||
| 66 | "caller %pF", __entry->pool_name, __entry->bits, | ||
| 67 | __entry->entropy_count, __entry->entropy_total, | ||
| 68 | (void *)__entry->IP) | ||
| 69 | ); | ||
| 70 | |||
| 71 | TRACE_EVENT(get_random_bytes, | ||
| 72 | TP_PROTO(int nbytes, unsigned long IP), | ||
| 73 | |||
| 74 | TP_ARGS(nbytes, IP), | ||
| 75 | |||
| 76 | TP_STRUCT__entry( | ||
| 77 | __field( int, nbytes ) | ||
| 78 | __field(unsigned long, IP ) | ||
| 79 | ), | ||
| 80 | |||
| 81 | TP_fast_assign( | ||
| 82 | __entry->nbytes = nbytes; | ||
| 83 | __entry->IP = IP; | ||
| 84 | ), | ||
| 85 | |||
| 86 | TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP) | ||
| 87 | ); | ||
| 88 | |||
| 89 | DECLARE_EVENT_CLASS(random__extract_entropy, | ||
| 90 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, | ||
| 91 | unsigned long IP), | ||
| 92 | |||
| 93 | TP_ARGS(pool_name, nbytes, entropy_count, IP), | ||
| 94 | |||
| 95 | TP_STRUCT__entry( | ||
| 96 | __field( const char *, pool_name ) | ||
| 97 | __field( int, nbytes ) | ||
| 98 | __field( int, entropy_count ) | ||
| 99 | __field(unsigned long, IP ) | ||
| 100 | ), | ||
| 101 | |||
| 102 | TP_fast_assign( | ||
| 103 | __entry->pool_name = pool_name; | ||
| 104 | __entry->nbytes = nbytes; | ||
| 105 | __entry->entropy_count = entropy_count; | ||
| 106 | __entry->IP = IP; | ||
| 107 | ), | ||
| 108 | |||
| 109 | TP_printk("%s pool: nbytes %d entropy_count %d caller %pF", | ||
| 110 | __entry->pool_name, __entry->nbytes, __entry->entropy_count, | ||
| 111 | (void *)__entry->IP) | ||
| 112 | ); | ||
| 113 | |||
| 114 | |||
| 115 | DEFINE_EVENT(random__extract_entropy, extract_entropy, | ||
| 116 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, | ||
| 117 | unsigned long IP), | ||
| 118 | |||
| 119 | TP_ARGS(pool_name, nbytes, entropy_count, IP) | ||
| 120 | ); | ||
| 121 | |||
| 122 | DEFINE_EVENT(random__extract_entropy, extract_entropy_user, | ||
| 123 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, | ||
| 124 | unsigned long IP), | ||
| 125 | |||
| 126 | TP_ARGS(pool_name, nbytes, entropy_count, IP) | ||
| 127 | ); | ||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | #endif /* _TRACE_RANDOM_H */ | ||
| 132 | |||
| 133 | /* This part must be outside protection */ | ||
| 134 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h deleted file mode 100644 index d4f559b1ec3..00000000000 --- a/include/trace/events/rcu.h +++ /dev/null | |||
| @@ -1,619 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM rcu | ||
| 3 | |||
| 4 | #if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_RCU_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | /* | ||
| 10 | * Tracepoint for start/end markers used for utilization calculations. | ||
| 11 | * By convention, the string is of the following forms: | ||
| 12 | * | ||
| 13 | * "Start <activity>" -- Mark the start of the specified activity, | ||
| 14 | * such as "context switch". Nesting is permitted. | ||
| 15 | * "End <activity>" -- Mark the end of the specified activity. | ||
| 16 | * | ||
| 17 | * An "@" character within "<activity>" is a comment character: Data | ||
| 18 | * reduction scripts will ignore the "@" and the remainder of the line. | ||
| 19 | */ | ||
| 20 | TRACE_EVENT(rcu_utilization, | ||
| 21 | |||
| 22 | TP_PROTO(char *s), | ||
| 23 | |||
| 24 | TP_ARGS(s), | ||
| 25 | |||
| 26 | TP_STRUCT__entry( | ||
| 27 | __field(char *, s) | ||
| 28 | ), | ||
| 29 | |||
| 30 | TP_fast_assign( | ||
| 31 | __entry->s = s; | ||
| 32 | ), | ||
| 33 | |||
| 34 | TP_printk("%s", __entry->s) | ||
| 35 | ); | ||
| 36 | |||
| 37 | #ifdef CONFIG_RCU_TRACE | ||
| 38 | |||
| 39 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Tracepoint for grace-period events: starting and ending a grace | ||
| 43 | * period ("start" and "end", respectively), a CPU noting the start | ||
| 44 | * of a new grace period or the end of an old grace period ("cpustart" | ||
| 45 | * and "cpuend", respectively), a CPU passing through a quiescent | ||
| 46 | * state ("cpuqs"), a CPU coming online or going offline ("cpuonl" | ||
| 47 | * and "cpuofl", respectively), and a CPU being kicked for being too | ||
| 48 | * long in dyntick-idle mode ("kick"). | ||
| 49 | */ | ||
| 50 | TRACE_EVENT(rcu_grace_period, | ||
| 51 | |||
| 52 | TP_PROTO(char *rcuname, unsigned long gpnum, char *gpevent), | ||
| 53 | |||
| 54 | TP_ARGS(rcuname, gpnum, gpevent), | ||
| 55 | |||
| 56 | TP_STRUCT__entry( | ||
| 57 | __field(char *, rcuname) | ||
| 58 | __field(unsigned long, gpnum) | ||
| 59 | __field(char *, gpevent) | ||
| 60 | ), | ||
| 61 | |||
| 62 | TP_fast_assign( | ||
| 63 | __entry->rcuname = rcuname; | ||
| 64 | __entry->gpnum = gpnum; | ||
| 65 | __entry->gpevent = gpevent; | ||
| 66 | ), | ||
| 67 | |||
| 68 | TP_printk("%s %lu %s", | ||
| 69 | __entry->rcuname, __entry->gpnum, __entry->gpevent) | ||
| 70 | ); | ||
| 71 | |||
| 72 | /* | ||
| 73 | * Tracepoint for grace-period-initialization events. These are | ||
| 74 | * distinguished by the type of RCU, the new grace-period number, the | ||
| 75 | * rcu_node structure level, the starting and ending CPU covered by the | ||
| 76 | * rcu_node structure, and the mask of CPUs that will be waited for. | ||
| 77 | * All but the type of RCU are extracted from the rcu_node structure. | ||
| 78 | */ | ||
| 79 | TRACE_EVENT(rcu_grace_period_init, | ||
| 80 | |||
| 81 | TP_PROTO(char *rcuname, unsigned long gpnum, u8 level, | ||
| 82 | int grplo, int grphi, unsigned long qsmask), | ||
| 83 | |||
| 84 | TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), | ||
| 85 | |||
| 86 | TP_STRUCT__entry( | ||
| 87 | __field(char *, rcuname) | ||
| 88 | __field(unsigned long, gpnum) | ||
| 89 | __field(u8, level) | ||
| 90 | __field(int, grplo) | ||
| 91 | __field(int, grphi) | ||
| 92 | __field(unsigned long, qsmask) | ||
| 93 | ), | ||
| 94 | |||
| 95 | TP_fast_assign( | ||
| 96 | __entry->rcuname = rcuname; | ||
| 97 | __entry->gpnum = gpnum; | ||
| 98 | __entry->level = level; | ||
| 99 | __entry->grplo = grplo; | ||
| 100 | __entry->grphi = grphi; | ||
| 101 | __entry->qsmask = qsmask; | ||
| 102 | ), | ||
| 103 | |||
| 104 | TP_printk("%s %lu %u %d %d %lx", | ||
| 105 | __entry->rcuname, __entry->gpnum, __entry->level, | ||
| 106 | __entry->grplo, __entry->grphi, __entry->qsmask) | ||
| 107 | ); | ||
| 108 | |||
| 109 | /* | ||
| 110 | * Tracepoint for tasks blocking within preemptible-RCU read-side | ||
| 111 | * critical sections. Track the type of RCU (which one day might | ||
| 112 | * include SRCU), the grace-period number that the task is blocking | ||
| 113 | * (the current or the next), and the task's PID. | ||
| 114 | */ | ||
| 115 | TRACE_EVENT(rcu_preempt_task, | ||
| 116 | |||
| 117 | TP_PROTO(char *rcuname, int pid, unsigned long gpnum), | ||
| 118 | |||
| 119 | TP_ARGS(rcuname, pid, gpnum), | ||
| 120 | |||
| 121 | TP_STRUCT__entry( | ||
| 122 | __field(char *, rcuname) | ||
| 123 | __field(unsigned long, gpnum) | ||
| 124 | __field(int, pid) | ||
| 125 | ), | ||
| 126 | |||
| 127 | TP_fast_assign( | ||
| 128 | __entry->rcuname = rcuname; | ||
| 129 | __entry->gpnum = gpnum; | ||
| 130 | __entry->pid = pid; | ||
| 131 | ), | ||
| 132 | |||
| 133 | TP_printk("%s %lu %d", | ||
| 134 | __entry->rcuname, __entry->gpnum, __entry->pid) | ||
| 135 | ); | ||
| 136 | |||
| 137 | /* | ||
| 138 | * Tracepoint for tasks that blocked within a given preemptible-RCU | ||
| 139 | * read-side critical section exiting that critical section. Track the | ||
| 140 | * type of RCU (which one day might include SRCU) and the task's PID. | ||
| 141 | */ | ||
| 142 | TRACE_EVENT(rcu_unlock_preempted_task, | ||
| 143 | |||
| 144 | TP_PROTO(char *rcuname, unsigned long gpnum, int pid), | ||
| 145 | |||
| 146 | TP_ARGS(rcuname, gpnum, pid), | ||
| 147 | |||
| 148 | TP_STRUCT__entry( | ||
| 149 | __field(char *, rcuname) | ||
| 150 | __field(unsigned long, gpnum) | ||
| 151 | __field(int, pid) | ||
| 152 | ), | ||
| 153 | |||
| 154 | TP_fast_assign( | ||
| 155 | __entry->rcuname = rcuname; | ||
| 156 | __entry->gpnum = gpnum; | ||
| 157 | __entry->pid = pid; | ||
| 158 | ), | ||
| 159 | |||
| 160 | TP_printk("%s %lu %d", __entry->rcuname, __entry->gpnum, __entry->pid) | ||
| 161 | ); | ||
| 162 | |||
| 163 | /* | ||
| 164 | * Tracepoint for quiescent-state-reporting events. These are | ||
| 165 | * distinguished by the type of RCU, the grace-period number, the | ||
| 166 | * mask of quiescent lower-level entities, the rcu_node structure level, | ||
| 167 | * the starting and ending CPU covered by the rcu_node structure, and | ||
| 168 | * whether there are any blocked tasks blocking the current grace period. | ||
| 169 | * All but the type of RCU are extracted from the rcu_node structure. | ||
| 170 | */ | ||
| 171 | TRACE_EVENT(rcu_quiescent_state_report, | ||
| 172 | |||
| 173 | TP_PROTO(char *rcuname, unsigned long gpnum, | ||
| 174 | unsigned long mask, unsigned long qsmask, | ||
| 175 | u8 level, int grplo, int grphi, int gp_tasks), | ||
| 176 | |||
| 177 | TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), | ||
| 178 | |||
| 179 | TP_STRUCT__entry( | ||
| 180 | __field(char *, rcuname) | ||
| 181 | __field(unsigned long, gpnum) | ||
| 182 | __field(unsigned long, mask) | ||
| 183 | __field(unsigned long, qsmask) | ||
| 184 | __field(u8, level) | ||
| 185 | __field(int, grplo) | ||
| 186 | __field(int, grphi) | ||
| 187 | __field(u8, gp_tasks) | ||
| 188 | ), | ||
| 189 | |||
| 190 | TP_fast_assign( | ||
| 191 | __entry->rcuname = rcuname; | ||
| 192 | __entry->gpnum = gpnum; | ||
| 193 | __entry->mask = mask; | ||
| 194 | __entry->qsmask = qsmask; | ||
| 195 | __entry->level = level; | ||
| 196 | __entry->grplo = grplo; | ||
| 197 | __entry->grphi = grphi; | ||
| 198 | __entry->gp_tasks = gp_tasks; | ||
| 199 | ), | ||
| 200 | |||
| 201 | TP_printk("%s %lu %lx>%lx %u %d %d %u", | ||
| 202 | __entry->rcuname, __entry->gpnum, | ||
| 203 | __entry->mask, __entry->qsmask, __entry->level, | ||
| 204 | __entry->grplo, __entry->grphi, __entry->gp_tasks) | ||
| 205 | ); | ||
| 206 | |||
| 207 | /* | ||
| 208 | * Tracepoint for quiescent states detected by force_quiescent_state(). | ||
| 209 | * These trace events include the type of RCU, the grace-period number | ||
| 210 | * that was blocked by the CPU, the CPU itself, and the type of quiescent | ||
| 211 | * state, which can be "dti" for dyntick-idle mode, "ofl" for CPU offline, | ||
| 212 | * or "kick" when kicking a CPU that has been in dyntick-idle mode for | ||
| 213 | * too long. | ||
| 214 | */ | ||
| 215 | TRACE_EVENT(rcu_fqs, | ||
| 216 | |||
| 217 | TP_PROTO(char *rcuname, unsigned long gpnum, int cpu, char *qsevent), | ||
| 218 | |||
| 219 | TP_ARGS(rcuname, gpnum, cpu, qsevent), | ||
| 220 | |||
| 221 | TP_STRUCT__entry( | ||
| 222 | __field(char *, rcuname) | ||
| 223 | __field(unsigned long, gpnum) | ||
| 224 | __field(int, cpu) | ||
| 225 | __field(char *, qsevent) | ||
| 226 | ), | ||
| 227 | |||
| 228 | TP_fast_assign( | ||
| 229 | __entry->rcuname = rcuname; | ||
| 230 | __entry->gpnum = gpnum; | ||
| 231 | __entry->cpu = cpu; | ||
| 232 | __entry->qsevent = qsevent; | ||
| 233 | ), | ||
| 234 | |||
| 235 | TP_printk("%s %lu %d %s", | ||
| 236 | __entry->rcuname, __entry->gpnum, | ||
| 237 | __entry->cpu, __entry->qsevent) | ||
| 238 | ); | ||
| 239 | |||
| 240 | #endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) */ | ||
| 241 | |||
| 242 | /* | ||
| 243 | * Tracepoint for dyntick-idle entry/exit events. These take a string | ||
| 244 | * as argument: "Start" for entering dyntick-idle mode, "End" for | ||
| 245 | * leaving it, "--=" for events moving towards idle, and "++=" for events | ||
| 246 | * moving away from idle. "Error on entry: not idle task" and "Error on | ||
| 247 | * exit: not idle task" indicate that a non-idle task is erroneously | ||
| 248 | * toying with the idle loop. | ||
| 249 | * | ||
| 250 | * These events also take a pair of numbers, which indicate the nesting | ||
| 251 | * depth before and after the event of interest. Note that task-related | ||
| 252 | * events use the upper bits of each number, while interrupt-related | ||
| 253 | * events use the lower bits. | ||
| 254 | */ | ||
| 255 | TRACE_EVENT(rcu_dyntick, | ||
| 256 | |||
| 257 | TP_PROTO(char *polarity, long long oldnesting, long long newnesting), | ||
| 258 | |||
| 259 | TP_ARGS(polarity, oldnesting, newnesting), | ||
| 260 | |||
| 261 | TP_STRUCT__entry( | ||
| 262 | __field(char *, polarity) | ||
| 263 | __field(long long, oldnesting) | ||
| 264 | __field(long long, newnesting) | ||
| 265 | ), | ||
| 266 | |||
| 267 | TP_fast_assign( | ||
| 268 | __entry->polarity = polarity; | ||
| 269 | __entry->oldnesting = oldnesting; | ||
| 270 | __entry->newnesting = newnesting; | ||
| 271 | ), | ||
| 272 | |||
| 273 | TP_printk("%s %llx %llx", __entry->polarity, | ||
| 274 | __entry->oldnesting, __entry->newnesting) | ||
| 275 | ); | ||
| 276 | |||
| 277 | /* | ||
| 278 | * Tracepoint for RCU preparation for idle, the goal being to get RCU | ||
| 279 | * processing done so that the current CPU can shut off its scheduling | ||
| 280 | * clock and enter dyntick-idle mode. One way to accomplish this is | ||
| 281 | * to drain all RCU callbacks from this CPU, and the other is to have | ||
| 282 | * done everything RCU requires for the current grace period. In this | ||
| 283 | * latter case, the CPU will be awakened at the end of the current grace | ||
| 284 | * period in order to process the remainder of its callbacks. | ||
| 285 | * | ||
| 286 | * These tracepoints take a string as argument: | ||
| 287 | * | ||
| 288 | * "No callbacks": Nothing to do, no callbacks on this CPU. | ||
| 289 | * "In holdoff": Nothing to do, holding off after unsuccessful attempt. | ||
| 290 | * "Begin holdoff": Attempt failed, don't retry until next jiffy. | ||
| 291 | * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. | ||
| 292 | * "Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks. | ||
| 293 | * "More callbacks": Still more callbacks, try again to clear them out. | ||
| 294 | * "Callbacks drained": All callbacks processed, off to dyntick idle! | ||
| 295 | * "Timer": Timer fired to cause CPU to continue processing callbacks. | ||
| 296 | * "Demigrate": Timer fired on wrong CPU, woke up correct CPU. | ||
| 297 | * "Cleanup after idle": Idle exited, timer canceled. | ||
| 298 | */ | ||
| 299 | TRACE_EVENT(rcu_prep_idle, | ||
| 300 | |||
| 301 | TP_PROTO(char *reason), | ||
| 302 | |||
| 303 | TP_ARGS(reason), | ||
| 304 | |||
| 305 | TP_STRUCT__entry( | ||
| 306 | __field(char *, reason) | ||
| 307 | ), | ||
| 308 | |||
| 309 | TP_fast_assign( | ||
| 310 | __entry->reason = reason; | ||
| 311 | ), | ||
| 312 | |||
| 313 | TP_printk("%s", __entry->reason) | ||
| 314 | ); | ||
| 315 | |||
| 316 | /* | ||
| 317 | * Tracepoint for the registration of a single RCU callback function. | ||
| 318 | * The first argument is the type of RCU, the second argument is | ||
| 319 | * a pointer to the RCU callback itself, the third element is the | ||
| 320 | * number of lazy callbacks queued, and the fourth element is the | ||
| 321 | * total number of callbacks queued. | ||
| 322 | */ | ||
| 323 | TRACE_EVENT(rcu_callback, | ||
| 324 | |||
| 325 | TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy, | ||
| 326 | long qlen), | ||
| 327 | |||
| 328 | TP_ARGS(rcuname, rhp, qlen_lazy, qlen), | ||
| 329 | |||
| 330 | TP_STRUCT__entry( | ||
| 331 | __field(char *, rcuname) | ||
| 332 | __field(void *, rhp) | ||
| 333 | __field(void *, func) | ||
| 334 | __field(long, qlen_lazy) | ||
| 335 | __field(long, qlen) | ||
| 336 | ), | ||
| 337 | |||
| 338 | TP_fast_assign( | ||
| 339 | __entry->rcuname = rcuname; | ||
| 340 | __entry->rhp = rhp; | ||
| 341 | __entry->func = rhp->func; | ||
| 342 | __entry->qlen_lazy = qlen_lazy; | ||
| 343 | __entry->qlen = qlen; | ||
| 344 | ), | ||
| 345 | |||
| 346 | TP_printk("%s rhp=%p func=%pf %ld/%ld", | ||
| 347 | __entry->rcuname, __entry->rhp, __entry->func, | ||
| 348 | __entry->qlen_lazy, __entry->qlen) | ||
| 349 | ); | ||
| 350 | |||
| 351 | /* | ||
| 352 | * Tracepoint for the registration of a single RCU callback of the special | ||
| 353 | * kfree() form. The first argument is the RCU type, the second argument | ||
| 354 | * is a pointer to the RCU callback, the third argument is the offset | ||
| 355 | * of the callback within the enclosing RCU-protected data structure, | ||
| 356 | * the fourth argument is the number of lazy callbacks queued, and the | ||
| 357 | * fifth argument is the total number of callbacks queued. | ||
| 358 | */ | ||
| 359 | TRACE_EVENT(rcu_kfree_callback, | ||
| 360 | |||
| 361 | TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, | ||
| 362 | long qlen_lazy, long qlen), | ||
| 363 | |||
| 364 | TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), | ||
| 365 | |||
| 366 | TP_STRUCT__entry( | ||
| 367 | __field(char *, rcuname) | ||
| 368 | __field(void *, rhp) | ||
| 369 | __field(unsigned long, offset) | ||
| 370 | __field(long, qlen_lazy) | ||
| 371 | __field(long, qlen) | ||
| 372 | ), | ||
| 373 | |||
| 374 | TP_fast_assign( | ||
| 375 | __entry->rcuname = rcuname; | ||
| 376 | __entry->rhp = rhp; | ||
| 377 | __entry->offset = offset; | ||
| 378 | __entry->qlen_lazy = qlen_lazy; | ||
| 379 | __entry->qlen = qlen; | ||
| 380 | ), | ||
| 381 | |||
| 382 | TP_printk("%s rhp=%p func=%ld %ld/%ld", | ||
| 383 | __entry->rcuname, __entry->rhp, __entry->offset, | ||
| 384 | __entry->qlen_lazy, __entry->qlen) | ||
| 385 | ); | ||
| 386 | |||
| 387 | /* | ||
| 388 | * Tracepoint for marking the beginning rcu_do_batch, performed to start | ||
| 389 | * RCU callback invocation. The first argument is the RCU flavor, | ||
| 390 | * the second is the number of lazy callbacks queued, the third is | ||
| 391 | * the total number of callbacks queued, and the fourth argument is | ||
| 392 | * the current RCU-callback batch limit. | ||
| 393 | */ | ||
| 394 | TRACE_EVENT(rcu_batch_start, | ||
| 395 | |||
| 396 | TP_PROTO(char *rcuname, long qlen_lazy, long qlen, int blimit), | ||
| 397 | |||
| 398 | TP_ARGS(rcuname, qlen_lazy, qlen, blimit), | ||
| 399 | |||
| 400 | TP_STRUCT__entry( | ||
| 401 | __field(char *, rcuname) | ||
| 402 | __field(long, qlen_lazy) | ||
| 403 | __field(long, qlen) | ||
| 404 | __field(int, blimit) | ||
| 405 | ), | ||
| 406 | |||
| 407 | TP_fast_assign( | ||
| 408 | __entry->rcuname = rcuname; | ||
| 409 | __entry->qlen_lazy = qlen_lazy; | ||
| 410 | __entry->qlen = qlen; | ||
| 411 | __entry->blimit = blimit; | ||
| 412 | ), | ||
| 413 | |||
| 414 | TP_printk("%s CBs=%ld/%ld bl=%d", | ||
| 415 | __entry->rcuname, __entry->qlen_lazy, __entry->qlen, | ||
| 416 | __entry->blimit) | ||
| 417 | ); | ||
| 418 | |||
| 419 | /* | ||
| 420 | * Tracepoint for the invocation of a single RCU callback function. | ||
| 421 | * The first argument is the type of RCU, and the second argument is | ||
| 422 | * a pointer to the RCU callback itself. | ||
| 423 | */ | ||
| 424 | TRACE_EVENT(rcu_invoke_callback, | ||
| 425 | |||
| 426 | TP_PROTO(char *rcuname, struct rcu_head *rhp), | ||
| 427 | |||
| 428 | TP_ARGS(rcuname, rhp), | ||
| 429 | |||
| 430 | TP_STRUCT__entry( | ||
| 431 | __field(char *, rcuname) | ||
| 432 | __field(void *, rhp) | ||
| 433 | __field(void *, func) | ||
| 434 | ), | ||
| 435 | |||
| 436 | TP_fast_assign( | ||
| 437 | __entry->rcuname = rcuname; | ||
| 438 | __entry->rhp = rhp; | ||
| 439 | __entry->func = rhp->func; | ||
| 440 | ), | ||
| 441 | |||
| 442 | TP_printk("%s rhp=%p func=%pf", | ||
| 443 | __entry->rcuname, __entry->rhp, __entry->func) | ||
| 444 | ); | ||
| 445 | |||
| 446 | /* | ||
| 447 | * Tracepoint for the invocation of a single RCU callback of the special | ||
| 448 | * kfree() form. The first argument is the RCU flavor, the second | ||
| 449 | * argument is a pointer to the RCU callback, and the third argument | ||
| 450 | * is the offset of the callback within the enclosing RCU-protected | ||
| 451 | * data structure. | ||
| 452 | */ | ||
| 453 | TRACE_EVENT(rcu_invoke_kfree_callback, | ||
| 454 | |||
| 455 | TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset), | ||
| 456 | |||
| 457 | TP_ARGS(rcuname, rhp, offset), | ||
| 458 | |||
| 459 | TP_STRUCT__entry( | ||
| 460 | __field(char *, rcuname) | ||
| 461 | __field(void *, rhp) | ||
| 462 | __field(unsigned long, offset) | ||
| 463 | ), | ||
| 464 | |||
| 465 | TP_fast_assign( | ||
| 466 | __entry->rcuname = rcuname; | ||
| 467 | __entry->rhp = rhp; | ||
| 468 | __entry->offset = offset; | ||
| 469 | ), | ||
| 470 | |||
| 471 | TP_printk("%s rhp=%p func=%ld", | ||
| 472 | __entry->rcuname, __entry->rhp, __entry->offset) | ||
| 473 | ); | ||
| 474 | |||
| 475 | /* | ||
| 476 | * Tracepoint for exiting rcu_do_batch after RCU callbacks have been | ||
| 477 | * invoked. The first argument is the name of the RCU flavor, | ||
| 478 | * the second argument is number of callbacks actually invoked, | ||
| 479 | * the third argument (cb) is whether or not any of the callbacks that | ||
| 480 | * were ready to invoke at the beginning of this batch are still | ||
| 481 | * queued, the fourth argument (nr) is the return value of need_resched(), | ||
| 482 | * the fifth argument (iit) is 1 if the current task is the idle task, | ||
| 483 | * and the sixth argument (risk) is the return value from | ||
| 484 | * rcu_is_callbacks_kthread(). | ||
| 485 | */ | ||
| 486 | TRACE_EVENT(rcu_batch_end, | ||
| 487 | |||
| 488 | TP_PROTO(char *rcuname, int callbacks_invoked, | ||
| 489 | bool cb, bool nr, bool iit, bool risk), | ||
| 490 | |||
| 491 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), | ||
| 492 | |||
| 493 | TP_STRUCT__entry( | ||
| 494 | __field(char *, rcuname) | ||
| 495 | __field(int, callbacks_invoked) | ||
| 496 | __field(bool, cb) | ||
| 497 | __field(bool, nr) | ||
| 498 | __field(bool, iit) | ||
| 499 | __field(bool, risk) | ||
| 500 | ), | ||
| 501 | |||
| 502 | TP_fast_assign( | ||
| 503 | __entry->rcuname = rcuname; | ||
| 504 | __entry->callbacks_invoked = callbacks_invoked; | ||
| 505 | __entry->cb = cb; | ||
| 506 | __entry->nr = nr; | ||
| 507 | __entry->iit = iit; | ||
| 508 | __entry->risk = risk; | ||
| 509 | ), | ||
| 510 | |||
| 511 | TP_printk("%s CBs-invoked=%d idle=%c%c%c%c", | ||
| 512 | __entry->rcuname, __entry->callbacks_invoked, | ||
| 513 | __entry->cb ? 'C' : '.', | ||
| 514 | __entry->nr ? 'S' : '.', | ||
| 515 | __entry->iit ? 'I' : '.', | ||
| 516 | __entry->risk ? 'R' : '.') | ||
| 517 | ); | ||
| 518 | |||
| 519 | /* | ||
| 520 | * Tracepoint for rcutorture readers. The first argument is the name | ||
| 521 | * of the RCU flavor from rcutorture's viewpoint and the second argument | ||
| 522 | * is the callback address. | ||
| 523 | */ | ||
| 524 | TRACE_EVENT(rcu_torture_read, | ||
| 525 | |||
| 526 | TP_PROTO(char *rcutorturename, struct rcu_head *rhp), | ||
| 527 | |||
| 528 | TP_ARGS(rcutorturename, rhp), | ||
| 529 | |||
| 530 | TP_STRUCT__entry( | ||
| 531 | __field(char *, rcutorturename) | ||
| 532 | __field(struct rcu_head *, rhp) | ||
| 533 | ), | ||
| 534 | |||
| 535 | TP_fast_assign( | ||
| 536 | __entry->rcutorturename = rcutorturename; | ||
| 537 | __entry->rhp = rhp; | ||
| 538 | ), | ||
| 539 | |||
| 540 | TP_printk("%s torture read %p", | ||
| 541 | __entry->rcutorturename, __entry->rhp) | ||
| 542 | ); | ||
| 543 | |||
| 544 | /* | ||
| 545 | * Tracepoint for _rcu_barrier() execution. The string "s" describes | ||
| 546 | * the _rcu_barrier phase: | ||
| 547 | * "Begin": rcu_barrier_callback() started. | ||
| 548 | * "Check": rcu_barrier_callback() checking for piggybacking. | ||
| 549 | * "EarlyExit": rcu_barrier_callback() piggybacked, thus early exit. | ||
| 550 | * "Inc1": rcu_barrier_callback() piggyback check counter incremented. | ||
| 551 | * "Offline": rcu_barrier_callback() found offline CPU | ||
| 552 | * "OnlineNoCB": rcu_barrier_callback() found online no-CBs CPU. | ||
| 553 | * "OnlineQ": rcu_barrier_callback() found online CPU with callbacks. | ||
| 554 | * "OnlineNQ": rcu_barrier_callback() found online CPU, no callbacks. | ||
| 555 | * "IRQ": An rcu_barrier_callback() callback posted on remote CPU. | ||
| 556 | * "CB": An rcu_barrier_callback() invoked a callback, not the last. | ||
| 557 | * "LastCB": An rcu_barrier_callback() invoked the last callback. | ||
| 558 | * "Inc2": rcu_barrier_callback() piggyback check counter incremented. | ||
| 559 | * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument | ||
| 560 | * is the count of remaining callbacks, and "done" is the piggybacking count. | ||
| 561 | */ | ||
| 562 | TRACE_EVENT(rcu_barrier, | ||
| 563 | |||
| 564 | TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done), | ||
| 565 | |||
| 566 | TP_ARGS(rcuname, s, cpu, cnt, done), | ||
| 567 | |||
| 568 | TP_STRUCT__entry( | ||
| 569 | __field(char *, rcuname) | ||
| 570 | __field(char *, s) | ||
| 571 | __field(int, cpu) | ||
| 572 | __field(int, cnt) | ||
| 573 | __field(unsigned long, done) | ||
| 574 | ), | ||
| 575 | |||
| 576 | TP_fast_assign( | ||
| 577 | __entry->rcuname = rcuname; | ||
| 578 | __entry->s = s; | ||
| 579 | __entry->cpu = cpu; | ||
| 580 | __entry->cnt = cnt; | ||
| 581 | __entry->done = done; | ||
| 582 | ), | ||
| 583 | |||
| 584 | TP_printk("%s %s cpu %d remaining %d # %lu", | ||
| 585 | __entry->rcuname, __entry->s, __entry->cpu, __entry->cnt, | ||
| 586 | __entry->done) | ||
| 587 | ); | ||
| 588 | |||
| 589 | #else /* #ifdef CONFIG_RCU_TRACE */ | ||
| 590 | |||
| 591 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) | ||
| 592 | #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ | ||
| 593 | qsmask) do { } while (0) | ||
| 594 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) | ||
| 595 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) | ||
| 596 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ | ||
| 597 | grplo, grphi, gp_tasks) do { } \ | ||
| 598 | while (0) | ||
| 599 | #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) | ||
| 600 | #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) | ||
| 601 | #define trace_rcu_prep_idle(reason) do { } while (0) | ||
| 602 | #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0) | ||
| 603 | #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \ | ||
| 604 | do { } while (0) | ||
| 605 | #define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \ | ||
| 606 | do { } while (0) | ||
| 607 | #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) | ||
| 608 | #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) | ||
| 609 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ | ||
| 610 | do { } while (0) | ||
| 611 | #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) | ||
| 612 | #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) | ||
| 613 | |||
| 614 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ | ||
| 615 | |||
| 616 | #endif /* _TRACE_RCU_H */ | ||
| 617 | |||
| 618 | /* This part must be outside protection */ | ||
| 619 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h index 41a7dbd570e..12fbf43524e 100644 --- a/include/trace/events/regmap.h +++ b/include/trace/events/regmap.h | |||
| @@ -4,10 +4,10 @@ | |||
| 4 | #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_REGMAP_H | 5 | #define _TRACE_REGMAP_H |
| 6 | 6 | ||
| 7 | #include <linux/device.h> | ||
| 7 | #include <linux/ktime.h> | 8 | #include <linux/ktime.h> |
| 8 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
| 9 | 10 | ||
| 10 | struct device; | ||
| 11 | struct regmap; | 11 | struct regmap; |
| 12 | 12 | ||
| 13 | /* | 13 | /* |
| @@ -139,42 +139,6 @@ TRACE_EVENT(regcache_sync, | |||
| 139 | __get_str(type), __get_str(status)) | 139 | __get_str(type), __get_str(status)) |
| 140 | ); | 140 | ); |
| 141 | 141 | ||
| 142 | DECLARE_EVENT_CLASS(regmap_bool, | ||
| 143 | |||
| 144 | TP_PROTO(struct device *dev, bool flag), | ||
| 145 | |||
| 146 | TP_ARGS(dev, flag), | ||
| 147 | |||
| 148 | TP_STRUCT__entry( | ||
| 149 | __string( name, dev_name(dev) ) | ||
| 150 | __field( int, flag ) | ||
| 151 | ), | ||
| 152 | |||
| 153 | TP_fast_assign( | ||
| 154 | __assign_str(name, dev_name(dev)); | ||
| 155 | __entry->flag = flag; | ||
| 156 | ), | ||
| 157 | |||
| 158 | TP_printk("%s flag=%d", __get_str(name), | ||
| 159 | (int)__entry->flag) | ||
| 160 | ); | ||
| 161 | |||
| 162 | DEFINE_EVENT(regmap_bool, regmap_cache_only, | ||
| 163 | |||
| 164 | TP_PROTO(struct device *dev, bool flag), | ||
| 165 | |||
| 166 | TP_ARGS(dev, flag) | ||
| 167 | |||
| 168 | ); | ||
| 169 | |||
| 170 | DEFINE_EVENT(regmap_bool, regmap_cache_bypass, | ||
| 171 | |||
| 172 | TP_PROTO(struct device *dev, bool flag), | ||
| 173 | |||
| 174 | TP_ARGS(dev, flag) | ||
| 175 | |||
| 176 | ); | ||
| 177 | |||
| 178 | #endif /* _TRACE_REGMAP_H */ | 142 | #endif /* _TRACE_REGMAP_H */ |
| 179 | 143 | ||
| 180 | /* This part must be outside protection */ | 144 | /* This part must be outside protection */ |
diff --git a/include/trace/events/rpm.h b/include/trace/events/rpm.h deleted file mode 100644 index 33f85b68c22..00000000000 --- a/include/trace/events/rpm.h +++ /dev/null | |||
| @@ -1,100 +0,0 @@ | |||
| 1 | |||
| 2 | #undef TRACE_SYSTEM | ||
| 3 | #define TRACE_SYSTEM rpm | ||
| 4 | |||
| 5 | #if !defined(_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 6 | #define _TRACE_RUNTIME_POWER_H | ||
| 7 | |||
| 8 | #include <linux/ktime.h> | ||
| 9 | #include <linux/tracepoint.h> | ||
| 10 | |||
| 11 | struct device; | ||
| 12 | |||
| 13 | /* | ||
| 14 | * The rpm_internal events are used for tracing some important | ||
| 15 | * runtime pm internal functions. | ||
| 16 | */ | ||
| 17 | DECLARE_EVENT_CLASS(rpm_internal, | ||
| 18 | |||
| 19 | TP_PROTO(struct device *dev, int flags), | ||
| 20 | |||
| 21 | TP_ARGS(dev, flags), | ||
| 22 | |||
| 23 | TP_STRUCT__entry( | ||
| 24 | __string( name, dev_name(dev) ) | ||
| 25 | __field( int, flags ) | ||
| 26 | __field( int , usage_count ) | ||
| 27 | __field( int , disable_depth ) | ||
| 28 | __field( int , runtime_auto ) | ||
| 29 | __field( int , request_pending ) | ||
| 30 | __field( int , irq_safe ) | ||
| 31 | __field( int , child_count ) | ||
| 32 | ), | ||
| 33 | |||
| 34 | TP_fast_assign( | ||
| 35 | __assign_str(name, dev_name(dev)); | ||
| 36 | __entry->flags = flags; | ||
| 37 | __entry->usage_count = atomic_read( | ||
| 38 | &dev->power.usage_count); | ||
| 39 | __entry->disable_depth = dev->power.disable_depth; | ||
| 40 | __entry->runtime_auto = dev->power.runtime_auto; | ||
| 41 | __entry->request_pending = dev->power.request_pending; | ||
| 42 | __entry->irq_safe = dev->power.irq_safe; | ||
| 43 | __entry->child_count = atomic_read( | ||
| 44 | &dev->power.child_count); | ||
| 45 | ), | ||
| 46 | |||
| 47 | TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d" | ||
| 48 | " irq-%-1d child-%d", | ||
| 49 | __get_str(name), __entry->flags, | ||
| 50 | __entry->usage_count, | ||
| 51 | __entry->disable_depth, | ||
| 52 | __entry->runtime_auto, | ||
| 53 | __entry->request_pending, | ||
| 54 | __entry->irq_safe, | ||
| 55 | __entry->child_count | ||
| 56 | ) | ||
| 57 | ); | ||
| 58 | DEFINE_EVENT(rpm_internal, rpm_suspend, | ||
| 59 | |||
| 60 | TP_PROTO(struct device *dev, int flags), | ||
| 61 | |||
| 62 | TP_ARGS(dev, flags) | ||
| 63 | ); | ||
| 64 | DEFINE_EVENT(rpm_internal, rpm_resume, | ||
| 65 | |||
| 66 | TP_PROTO(struct device *dev, int flags), | ||
| 67 | |||
| 68 | TP_ARGS(dev, flags) | ||
| 69 | ); | ||
| 70 | DEFINE_EVENT(rpm_internal, rpm_idle, | ||
| 71 | |||
| 72 | TP_PROTO(struct device *dev, int flags), | ||
| 73 | |||
| 74 | TP_ARGS(dev, flags) | ||
| 75 | ); | ||
| 76 | |||
| 77 | TRACE_EVENT(rpm_return_int, | ||
| 78 | TP_PROTO(struct device *dev, unsigned long ip, int ret), | ||
| 79 | TP_ARGS(dev, ip, ret), | ||
| 80 | |||
| 81 | TP_STRUCT__entry( | ||
| 82 | __string( name, dev_name(dev)) | ||
| 83 | __field( unsigned long, ip ) | ||
| 84 | __field( int, ret ) | ||
| 85 | ), | ||
| 86 | |||
| 87 | TP_fast_assign( | ||
| 88 | __assign_str(name, dev_name(dev)); | ||
| 89 | __entry->ip = ip; | ||
| 90 | __entry->ret = ret; | ||
| 91 | ), | ||
| 92 | |||
| 93 | TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name), | ||
| 94 | __entry->ret) | ||
| 95 | ); | ||
| 96 | |||
| 97 | #endif /* _TRACE_RUNTIME_POWER_H */ | ||
| 98 | |||
| 99 | /* This part must be outside protection */ | ||
| 100 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 5a8671e8a67..f6334782a59 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | #include <linux/binfmts.h> | ||
| 10 | 9 | ||
| 11 | /* | 10 | /* |
| 12 | * Tracepoint for calling kthread_stop, performed to end a kthread: | 11 | * Tracepoint for calling kthread_stop, performed to end a kthread: |
| @@ -73,9 +72,6 @@ DECLARE_EVENT_CLASS(sched_wakeup_template, | |||
| 73 | __entry->prio = p->prio; | 72 | __entry->prio = p->prio; |
| 74 | __entry->success = success; | 73 | __entry->success = success; |
| 75 | __entry->target_cpu = task_cpu(p); | 74 | __entry->target_cpu = task_cpu(p); |
| 76 | ) | ||
| 77 | TP_perf_assign( | ||
| 78 | __perf_task(p); | ||
| 79 | ), | 75 | ), |
| 80 | 76 | ||
| 81 | TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", | 77 | TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", |
| @@ -104,7 +100,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p) | |||
| 104 | * For all intents and purposes a preempted task is a running task. | 100 | * For all intents and purposes a preempted task is a running task. |
| 105 | */ | 101 | */ |
| 106 | if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE) | 102 | if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE) |
| 107 | state = TASK_RUNNING | TASK_STATE_MAX; | 103 | state = TASK_RUNNING; |
| 108 | #endif | 104 | #endif |
| 109 | 105 | ||
| 110 | return state; | 106 | return state; |
| @@ -141,14 +137,13 @@ TRACE_EVENT(sched_switch, | |||
| 141 | __entry->next_prio = next->prio; | 137 | __entry->next_prio = next->prio; |
| 142 | ), | 138 | ), |
| 143 | 139 | ||
| 144 | TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d", | 140 | TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s ==> next_comm=%s next_pid=%d next_prio=%d", |
| 145 | __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, | 141 | __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, |
| 146 | __entry->prev_state & (TASK_STATE_MAX-1) ? | 142 | __entry->prev_state ? |
| 147 | __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|", | 143 | __print_flags(__entry->prev_state, "|", |
| 148 | { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, | 144 | { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, |
| 149 | { 16, "Z" }, { 32, "X" }, { 64, "x" }, | 145 | { 16, "Z" }, { 32, "X" }, { 64, "x" }, |
| 150 | { 128, "W" }) : "R", | 146 | { 128, "W" }) : "R", |
| 151 | __entry->prev_state & TASK_STATE_MAX ? "+" : "", | ||
| 152 | __entry->next_comm, __entry->next_pid, __entry->next_prio) | 147 | __entry->next_comm, __entry->next_pid, __entry->next_prio) |
| 153 | ); | 148 | ); |
| 154 | 149 | ||
| @@ -280,32 +275,6 @@ TRACE_EVENT(sched_process_fork, | |||
| 280 | ); | 275 | ); |
| 281 | 276 | ||
| 282 | /* | 277 | /* |
| 283 | * Tracepoint for exec: | ||
| 284 | */ | ||
| 285 | TRACE_EVENT(sched_process_exec, | ||
| 286 | |||
| 287 | TP_PROTO(struct task_struct *p, pid_t old_pid, | ||
| 288 | struct linux_binprm *bprm), | ||
| 289 | |||
| 290 | TP_ARGS(p, old_pid, bprm), | ||
| 291 | |||
| 292 | TP_STRUCT__entry( | ||
| 293 | __string( filename, bprm->filename ) | ||
| 294 | __field( pid_t, pid ) | ||
| 295 | __field( pid_t, old_pid ) | ||
| 296 | ), | ||
| 297 | |||
| 298 | TP_fast_assign( | ||
| 299 | __assign_str(filename, bprm->filename); | ||
| 300 | __entry->pid = p->pid; | ||
| 301 | __entry->old_pid = old_pid; | ||
| 302 | ), | ||
| 303 | |||
| 304 | TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), | ||
| 305 | __entry->pid, __entry->old_pid) | ||
| 306 | ); | ||
| 307 | |||
| 308 | /* | ||
| 309 | * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE | 278 | * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE |
| 310 | * adding sched_stat support to SCHED_FIFO/RR would be welcome. | 279 | * adding sched_stat support to SCHED_FIFO/RR would be welcome. |
| 311 | */ | 280 | */ |
| @@ -328,7 +297,6 @@ DECLARE_EVENT_CLASS(sched_stat_template, | |||
| 328 | ) | 297 | ) |
| 329 | TP_perf_assign( | 298 | TP_perf_assign( |
| 330 | __perf_count(delay); | 299 | __perf_count(delay); |
| 331 | __perf_task(tsk); | ||
| 332 | ), | 300 | ), |
| 333 | 301 | ||
| 334 | TP_printk("comm=%s pid=%d delay=%Lu [ns]", | 302 | TP_printk("comm=%s pid=%d delay=%Lu [ns]", |
| @@ -362,13 +330,6 @@ DEFINE_EVENT(sched_stat_template, sched_stat_iowait, | |||
| 362 | TP_ARGS(tsk, delay)); | 330 | TP_ARGS(tsk, delay)); |
| 363 | 331 | ||
| 364 | /* | 332 | /* |
| 365 | * Tracepoint for accounting blocked time (time the task is in uninterruptible). | ||
| 366 | */ | ||
| 367 | DEFINE_EVENT(sched_stat_template, sched_stat_blocked, | ||
| 368 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
| 369 | TP_ARGS(tsk, delay)); | ||
| 370 | |||
| 371 | /* | ||
| 372 | * Tracepoint for accounting runtime (time the task is executing | 333 | * Tracepoint for accounting runtime (time the task is executing |
| 373 | * on a CPU). | 334 | * on a CPU). |
| 374 | */ | 335 | */ |
diff --git a/include/trace/events/signal.h b/include/trace/events/signal.h index 39a8a430d90..17df43464df 100644 --- a/include/trace/events/signal.h +++ b/include/trace/events/signal.h | |||
| @@ -23,23 +23,11 @@ | |||
| 23 | } \ | 23 | } \ |
| 24 | } while (0) | 24 | } while (0) |
| 25 | 25 | ||
| 26 | #ifndef TRACE_HEADER_MULTI_READ | ||
| 27 | enum { | ||
| 28 | TRACE_SIGNAL_DELIVERED, | ||
| 29 | TRACE_SIGNAL_IGNORED, | ||
| 30 | TRACE_SIGNAL_ALREADY_PENDING, | ||
| 31 | TRACE_SIGNAL_OVERFLOW_FAIL, | ||
| 32 | TRACE_SIGNAL_LOSE_INFO, | ||
| 33 | }; | ||
| 34 | #endif | ||
| 35 | |||
| 36 | /** | 26 | /** |
| 37 | * signal_generate - called when a signal is generated | 27 | * signal_generate - called when a signal is generated |
| 38 | * @sig: signal number | 28 | * @sig: signal number |
| 39 | * @info: pointer to struct siginfo | 29 | * @info: pointer to struct siginfo |
| 40 | * @task: pointer to struct task_struct | 30 | * @task: pointer to struct task_struct |
| 41 | * @group: shared or private | ||
| 42 | * @result: TRACE_SIGNAL_* | ||
| 43 | * | 31 | * |
| 44 | * Current process sends a 'sig' signal to 'task' process with | 32 | * Current process sends a 'sig' signal to 'task' process with |
| 45 | * 'info' siginfo. If 'info' is SEND_SIG_NOINFO or SEND_SIG_PRIV, | 33 | * 'info' siginfo. If 'info' is SEND_SIG_NOINFO or SEND_SIG_PRIV, |
| @@ -49,10 +37,9 @@ enum { | |||
| 49 | */ | 37 | */ |
| 50 | TRACE_EVENT(signal_generate, | 38 | TRACE_EVENT(signal_generate, |
| 51 | 39 | ||
| 52 | TP_PROTO(int sig, struct siginfo *info, struct task_struct *task, | 40 | TP_PROTO(int sig, struct siginfo *info, struct task_struct *task), |
| 53 | int group, int result), | ||
| 54 | 41 | ||
| 55 | TP_ARGS(sig, info, task, group, result), | 42 | TP_ARGS(sig, info, task), |
| 56 | 43 | ||
| 57 | TP_STRUCT__entry( | 44 | TP_STRUCT__entry( |
| 58 | __field( int, sig ) | 45 | __field( int, sig ) |
| @@ -60,8 +47,6 @@ TRACE_EVENT(signal_generate, | |||
| 60 | __field( int, code ) | 47 | __field( int, code ) |
| 61 | __array( char, comm, TASK_COMM_LEN ) | 48 | __array( char, comm, TASK_COMM_LEN ) |
| 62 | __field( pid_t, pid ) | 49 | __field( pid_t, pid ) |
| 63 | __field( int, group ) | ||
| 64 | __field( int, result ) | ||
| 65 | ), | 50 | ), |
| 66 | 51 | ||
| 67 | TP_fast_assign( | 52 | TP_fast_assign( |
| @@ -69,14 +54,11 @@ TRACE_EVENT(signal_generate, | |||
| 69 | TP_STORE_SIGINFO(__entry, info); | 54 | TP_STORE_SIGINFO(__entry, info); |
| 70 | memcpy(__entry->comm, task->comm, TASK_COMM_LEN); | 55 | memcpy(__entry->comm, task->comm, TASK_COMM_LEN); |
| 71 | __entry->pid = task->pid; | 56 | __entry->pid = task->pid; |
| 72 | __entry->group = group; | ||
| 73 | __entry->result = result; | ||
| 74 | ), | 57 | ), |
| 75 | 58 | ||
| 76 | TP_printk("sig=%d errno=%d code=%d comm=%s pid=%d grp=%d res=%d", | 59 | TP_printk("sig=%d errno=%d code=%d comm=%s pid=%d", |
| 77 | __entry->sig, __entry->errno, __entry->code, | 60 | __entry->sig, __entry->errno, __entry->code, |
| 78 | __entry->comm, __entry->pid, __entry->group, | 61 | __entry->comm, __entry->pid) |
| 79 | __entry->result) | ||
| 80 | ); | 62 | ); |
| 81 | 63 | ||
| 82 | /** | 64 | /** |
| @@ -119,6 +101,65 @@ TRACE_EVENT(signal_deliver, | |||
| 119 | __entry->sa_handler, __entry->sa_flags) | 101 | __entry->sa_handler, __entry->sa_flags) |
| 120 | ); | 102 | ); |
| 121 | 103 | ||
| 104 | DECLARE_EVENT_CLASS(signal_queue_overflow, | ||
| 105 | |||
| 106 | TP_PROTO(int sig, int group, struct siginfo *info), | ||
| 107 | |||
| 108 | TP_ARGS(sig, group, info), | ||
| 109 | |||
| 110 | TP_STRUCT__entry( | ||
| 111 | __field( int, sig ) | ||
| 112 | __field( int, group ) | ||
| 113 | __field( int, errno ) | ||
| 114 | __field( int, code ) | ||
| 115 | ), | ||
| 116 | |||
| 117 | TP_fast_assign( | ||
| 118 | __entry->sig = sig; | ||
| 119 | __entry->group = group; | ||
| 120 | TP_STORE_SIGINFO(__entry, info); | ||
| 121 | ), | ||
| 122 | |||
| 123 | TP_printk("sig=%d group=%d errno=%d code=%d", | ||
| 124 | __entry->sig, __entry->group, __entry->errno, __entry->code) | ||
| 125 | ); | ||
| 126 | |||
| 127 | /** | ||
| 128 | * signal_overflow_fail - called when signal queue is overflow | ||
| 129 | * @sig: signal number | ||
| 130 | * @group: signal to process group or not (bool) | ||
| 131 | * @info: pointer to struct siginfo | ||
| 132 | * | ||
| 133 | * Kernel fails to generate 'sig' signal with 'info' siginfo, because | ||
| 134 | * siginfo queue is overflow, and the signal is dropped. | ||
| 135 | * 'group' is not 0 if the signal will be sent to a process group. | ||
| 136 | * 'sig' is always one of RT signals. | ||
| 137 | */ | ||
| 138 | DEFINE_EVENT(signal_queue_overflow, signal_overflow_fail, | ||
| 139 | |||
| 140 | TP_PROTO(int sig, int group, struct siginfo *info), | ||
| 141 | |||
| 142 | TP_ARGS(sig, group, info) | ||
| 143 | ); | ||
| 144 | |||
| 145 | /** | ||
| 146 | * signal_lose_info - called when siginfo is lost | ||
| 147 | * @sig: signal number | ||
| 148 | * @group: signal to process group or not (bool) | ||
| 149 | * @info: pointer to struct siginfo | ||
| 150 | * | ||
| 151 | * Kernel generates 'sig' signal but loses 'info' siginfo, because siginfo | ||
| 152 | * queue is overflow. | ||
| 153 | * 'group' is not 0 if the signal will be sent to a process group. | ||
| 154 | * 'sig' is always one of non-RT signals. | ||
| 155 | */ | ||
| 156 | DEFINE_EVENT(signal_queue_overflow, signal_lose_info, | ||
| 157 | |||
| 158 | TP_PROTO(int sig, int group, struct siginfo *info), | ||
| 159 | |||
| 160 | TP_ARGS(sig, group, info) | ||
| 161 | ); | ||
| 162 | |||
| 122 | #endif /* _TRACE_SIGNAL_H */ | 163 | #endif /* _TRACE_SIGNAL_H */ |
| 123 | 164 | ||
| 124 | /* This part must be outside protection */ | 165 | /* This part must be outside protection */ |
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h deleted file mode 100644 index 43be87d5dd5..00000000000 --- a/include/trace/events/sunrpc.h +++ /dev/null | |||
| @@ -1,177 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM sunrpc | ||
| 3 | |||
| 4 | #if !defined(_TRACE_SUNRPC_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_SUNRPC_H | ||
| 6 | |||
| 7 | #include <linux/sunrpc/sched.h> | ||
| 8 | #include <linux/sunrpc/clnt.h> | ||
| 9 | #include <linux/tracepoint.h> | ||
| 10 | |||
| 11 | DECLARE_EVENT_CLASS(rpc_task_status, | ||
| 12 | |||
| 13 | TP_PROTO(struct rpc_task *task), | ||
| 14 | |||
| 15 | TP_ARGS(task), | ||
| 16 | |||
| 17 | TP_STRUCT__entry( | ||
| 18 | __field(const struct rpc_task *, task) | ||
| 19 | __field(const struct rpc_clnt *, clnt) | ||
| 20 | __field(int, status) | ||
| 21 | ), | ||
| 22 | |||
| 23 | TP_fast_assign( | ||
| 24 | __entry->task = task; | ||
| 25 | __entry->clnt = task->tk_client; | ||
| 26 | __entry->status = task->tk_status; | ||
| 27 | ), | ||
| 28 | |||
| 29 | TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) | ||
| 30 | ); | ||
| 31 | |||
| 32 | DEFINE_EVENT(rpc_task_status, rpc_call_status, | ||
| 33 | TP_PROTO(struct rpc_task *task), | ||
| 34 | |||
| 35 | TP_ARGS(task) | ||
| 36 | ); | ||
| 37 | |||
| 38 | DEFINE_EVENT(rpc_task_status, rpc_bind_status, | ||
| 39 | TP_PROTO(struct rpc_task *task), | ||
| 40 | |||
| 41 | TP_ARGS(task) | ||
| 42 | ); | ||
| 43 | |||
| 44 | TRACE_EVENT(rpc_connect_status, | ||
| 45 | TP_PROTO(struct rpc_task *task, int status), | ||
| 46 | |||
| 47 | TP_ARGS(task, status), | ||
| 48 | |||
| 49 | TP_STRUCT__entry( | ||
| 50 | __field(const struct rpc_task *, task) | ||
| 51 | __field(const struct rpc_clnt *, clnt) | ||
| 52 | __field(int, status) | ||
| 53 | ), | ||
| 54 | |||
| 55 | TP_fast_assign( | ||
| 56 | __entry->task = task; | ||
| 57 | __entry->clnt = task->tk_client; | ||
| 58 | __entry->status = status; | ||
| 59 | ), | ||
| 60 | |||
| 61 | TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) | ||
| 62 | ); | ||
| 63 | |||
| 64 | DECLARE_EVENT_CLASS(rpc_task_running, | ||
| 65 | |||
| 66 | TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
| 67 | |||
| 68 | TP_ARGS(clnt, task, action), | ||
| 69 | |||
| 70 | TP_STRUCT__entry( | ||
| 71 | __field(const struct rpc_clnt *, clnt) | ||
| 72 | __field(const struct rpc_task *, task) | ||
| 73 | __field(const void *, action) | ||
| 74 | __field(unsigned long, runstate) | ||
| 75 | __field(int, status) | ||
| 76 | __field(unsigned short, flags) | ||
| 77 | ), | ||
| 78 | |||
| 79 | TP_fast_assign( | ||
| 80 | __entry->clnt = clnt; | ||
| 81 | __entry->task = task; | ||
| 82 | __entry->action = action; | ||
| 83 | __entry->runstate = task->tk_runstate; | ||
| 84 | __entry->status = task->tk_status; | ||
| 85 | __entry->flags = task->tk_flags; | ||
| 86 | ), | ||
| 87 | |||
| 88 | TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d action=%pf", | ||
| 89 | __entry->task, | ||
| 90 | __entry->clnt, | ||
| 91 | __entry->flags, | ||
| 92 | __entry->runstate, | ||
| 93 | __entry->status, | ||
| 94 | __entry->action | ||
| 95 | ) | ||
| 96 | ); | ||
| 97 | |||
| 98 | DEFINE_EVENT(rpc_task_running, rpc_task_begin, | ||
| 99 | |||
| 100 | TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
| 101 | |||
| 102 | TP_ARGS(clnt, task, action) | ||
| 103 | |||
| 104 | ); | ||
| 105 | |||
| 106 | DEFINE_EVENT(rpc_task_running, rpc_task_run_action, | ||
| 107 | |||
| 108 | TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
| 109 | |||
| 110 | TP_ARGS(clnt, task, action) | ||
| 111 | |||
| 112 | ); | ||
| 113 | |||
| 114 | DEFINE_EVENT(rpc_task_running, rpc_task_complete, | ||
| 115 | |||
| 116 | TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
| 117 | |||
| 118 | TP_ARGS(clnt, task, action) | ||
| 119 | |||
| 120 | ); | ||
| 121 | |||
| 122 | DECLARE_EVENT_CLASS(rpc_task_queued, | ||
| 123 | |||
| 124 | TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), | ||
| 125 | |||
| 126 | TP_ARGS(clnt, task, q), | ||
| 127 | |||
| 128 | TP_STRUCT__entry( | ||
| 129 | __field(const struct rpc_clnt *, clnt) | ||
| 130 | __field(const struct rpc_task *, task) | ||
| 131 | __field(unsigned long, timeout) | ||
| 132 | __field(unsigned long, runstate) | ||
| 133 | __field(int, status) | ||
| 134 | __field(unsigned short, flags) | ||
| 135 | __string(q_name, rpc_qname(q)) | ||
| 136 | ), | ||
| 137 | |||
| 138 | TP_fast_assign( | ||
| 139 | __entry->clnt = clnt; | ||
| 140 | __entry->task = task; | ||
| 141 | __entry->timeout = task->tk_timeout; | ||
| 142 | __entry->runstate = task->tk_runstate; | ||
| 143 | __entry->status = task->tk_status; | ||
| 144 | __entry->flags = task->tk_flags; | ||
| 145 | __assign_str(q_name, rpc_qname(q)); | ||
| 146 | ), | ||
| 147 | |||
| 148 | TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", | ||
| 149 | __entry->task, | ||
| 150 | __entry->clnt, | ||
| 151 | __entry->flags, | ||
| 152 | __entry->runstate, | ||
| 153 | __entry->status, | ||
| 154 | __entry->timeout, | ||
| 155 | __get_str(q_name) | ||
| 156 | ) | ||
| 157 | ); | ||
| 158 | |||
| 159 | DEFINE_EVENT(rpc_task_queued, rpc_task_sleep, | ||
| 160 | |||
| 161 | TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), | ||
| 162 | |||
| 163 | TP_ARGS(clnt, task, q) | ||
| 164 | |||
| 165 | ); | ||
| 166 | |||
| 167 | DEFINE_EVENT(rpc_task_queued, rpc_task_wakeup, | ||
| 168 | |||
| 169 | TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), | ||
| 170 | |||
| 171 | TP_ARGS(clnt, task, q) | ||
| 172 | |||
| 173 | ); | ||
| 174 | |||
| 175 | #endif /* _TRACE_SUNRPC_H */ | ||
| 176 | |||
| 177 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/task.h b/include/trace/events/task.h deleted file mode 100644 index 102a646e199..00000000000 --- a/include/trace/events/task.h +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM task | ||
| 3 | |||
| 4 | #if !defined(_TRACE_TASK_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_TASK_H | ||
| 6 | #include <linux/tracepoint.h> | ||
| 7 | |||
| 8 | TRACE_EVENT(task_newtask, | ||
| 9 | |||
| 10 | TP_PROTO(struct task_struct *task, unsigned long clone_flags), | ||
| 11 | |||
| 12 | TP_ARGS(task, clone_flags), | ||
| 13 | |||
| 14 | TP_STRUCT__entry( | ||
| 15 | __field( pid_t, pid) | ||
| 16 | __array( char, comm, TASK_COMM_LEN) | ||
| 17 | __field( unsigned long, clone_flags) | ||
| 18 | __field( short, oom_score_adj) | ||
| 19 | ), | ||
| 20 | |||
| 21 | TP_fast_assign( | ||
| 22 | __entry->pid = task->pid; | ||
| 23 | memcpy(__entry->comm, task->comm, TASK_COMM_LEN); | ||
| 24 | __entry->clone_flags = clone_flags; | ||
| 25 | __entry->oom_score_adj = task->signal->oom_score_adj; | ||
| 26 | ), | ||
| 27 | |||
| 28 | TP_printk("pid=%d comm=%s clone_flags=%lx oom_score_adj=%hd", | ||
| 29 | __entry->pid, __entry->comm, | ||
| 30 | __entry->clone_flags, __entry->oom_score_adj) | ||
| 31 | ); | ||
| 32 | |||
| 33 | TRACE_EVENT(task_rename, | ||
| 34 | |||
| 35 | TP_PROTO(struct task_struct *task, char *comm), | ||
| 36 | |||
| 37 | TP_ARGS(task, comm), | ||
| 38 | |||
| 39 | TP_STRUCT__entry( | ||
| 40 | __field( pid_t, pid) | ||
| 41 | __array( char, oldcomm, TASK_COMM_LEN) | ||
| 42 | __array( char, newcomm, TASK_COMM_LEN) | ||
| 43 | __field( short, oom_score_adj) | ||
| 44 | ), | ||
| 45 | |||
| 46 | TP_fast_assign( | ||
| 47 | __entry->pid = task->pid; | ||
| 48 | memcpy(entry->oldcomm, task->comm, TASK_COMM_LEN); | ||
| 49 | memcpy(entry->newcomm, comm, TASK_COMM_LEN); | ||
| 50 | __entry->oom_score_adj = task->signal->oom_score_adj; | ||
| 51 | ), | ||
| 52 | |||
| 53 | TP_printk("pid=%d oldcomm=%s newcomm=%s oom_score_adj=%hd", | ||
| 54 | __entry->pid, __entry->oldcomm, | ||
| 55 | __entry->newcomm, __entry->oom_score_adj) | ||
| 56 | ); | ||
| 57 | |||
| 58 | #endif | ||
| 59 | |||
| 60 | /* This part must be outside protection */ | ||
| 61 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index 63cfcccaebb..36851f7f13d 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h | |||
| @@ -8,12 +8,12 @@ | |||
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
| 10 | #include <linux/memcontrol.h> | 10 | #include <linux/memcontrol.h> |
| 11 | #include <trace/events/gfpflags.h> | 11 | #include "gfpflags.h" |
| 12 | 12 | ||
| 13 | #define RECLAIM_WB_ANON 0x0001u | 13 | #define RECLAIM_WB_ANON 0x0001u |
| 14 | #define RECLAIM_WB_FILE 0x0002u | 14 | #define RECLAIM_WB_FILE 0x0002u |
| 15 | #define RECLAIM_WB_MIXED 0x0010u | 15 | #define RECLAIM_WB_MIXED 0x0010u |
| 16 | #define RECLAIM_WB_SYNC 0x0004u /* Unused, all reclaim async */ | 16 | #define RECLAIM_WB_SYNC 0x0004u |
| 17 | #define RECLAIM_WB_ASYNC 0x0008u | 17 | #define RECLAIM_WB_ASYNC 0x0008u |
| 18 | 18 | ||
| 19 | #define show_reclaim_flags(flags) \ | 19 | #define show_reclaim_flags(flags) \ |
| @@ -25,15 +25,15 @@ | |||
| 25 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ | 25 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ |
| 26 | ) : "RECLAIM_WB_NONE" | 26 | ) : "RECLAIM_WB_NONE" |
| 27 | 27 | ||
| 28 | #define trace_reclaim_flags(page) ( \ | 28 | #define trace_reclaim_flags(page, sync) ( \ |
| 29 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ | 29 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
| 30 | (RECLAIM_WB_ASYNC) \ | 30 | (sync & RECLAIM_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ |
| 31 | ) | 31 | ) |
| 32 | 32 | ||
| 33 | #define trace_shrink_flags(file) \ | 33 | #define trace_shrink_flags(file, sync) ( \ |
| 34 | ( \ | 34 | (sync & RECLAIM_MODE_SYNC ? RECLAIM_WB_MIXED : \ |
| 35 | (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ | 35 | (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON)) | \ |
| 36 | (RECLAIM_WB_ASYNC) \ | 36 | (sync & RECLAIM_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ |
| 37 | ) | 37 | ) |
| 38 | 38 | ||
| 39 | TRACE_EVENT(mm_vmscan_kswapd_sleep, | 39 | TRACE_EVENT(mm_vmscan_kswapd_sleep, |
| @@ -263,18 +263,22 @@ DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, | |||
| 263 | unsigned long nr_requested, | 263 | unsigned long nr_requested, |
| 264 | unsigned long nr_scanned, | 264 | unsigned long nr_scanned, |
| 265 | unsigned long nr_taken, | 265 | unsigned long nr_taken, |
| 266 | isolate_mode_t isolate_mode, | 266 | unsigned long nr_lumpy_taken, |
| 267 | int file), | 267 | unsigned long nr_lumpy_dirty, |
| 268 | unsigned long nr_lumpy_failed, | ||
| 269 | int isolate_mode), | ||
| 268 | 270 | ||
| 269 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file), | 271 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode), |
| 270 | 272 | ||
| 271 | TP_STRUCT__entry( | 273 | TP_STRUCT__entry( |
| 272 | __field(int, order) | 274 | __field(int, order) |
| 273 | __field(unsigned long, nr_requested) | 275 | __field(unsigned long, nr_requested) |
| 274 | __field(unsigned long, nr_scanned) | 276 | __field(unsigned long, nr_scanned) |
| 275 | __field(unsigned long, nr_taken) | 277 | __field(unsigned long, nr_taken) |
| 276 | __field(isolate_mode_t, isolate_mode) | 278 | __field(unsigned long, nr_lumpy_taken) |
| 277 | __field(int, file) | 279 | __field(unsigned long, nr_lumpy_dirty) |
| 280 | __field(unsigned long, nr_lumpy_failed) | ||
| 281 | __field(int, isolate_mode) | ||
| 278 | ), | 282 | ), |
| 279 | 283 | ||
| 280 | TP_fast_assign( | 284 | TP_fast_assign( |
| @@ -282,17 +286,21 @@ DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, | |||
| 282 | __entry->nr_requested = nr_requested; | 286 | __entry->nr_requested = nr_requested; |
| 283 | __entry->nr_scanned = nr_scanned; | 287 | __entry->nr_scanned = nr_scanned; |
| 284 | __entry->nr_taken = nr_taken; | 288 | __entry->nr_taken = nr_taken; |
| 289 | __entry->nr_lumpy_taken = nr_lumpy_taken; | ||
| 290 | __entry->nr_lumpy_dirty = nr_lumpy_dirty; | ||
| 291 | __entry->nr_lumpy_failed = nr_lumpy_failed; | ||
| 285 | __entry->isolate_mode = isolate_mode; | 292 | __entry->isolate_mode = isolate_mode; |
| 286 | __entry->file = file; | ||
| 287 | ), | 293 | ), |
| 288 | 294 | ||
| 289 | TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu file=%d", | 295 | TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu contig_taken=%lu contig_dirty=%lu contig_failed=%lu", |
| 290 | __entry->isolate_mode, | 296 | __entry->isolate_mode, |
| 291 | __entry->order, | 297 | __entry->order, |
| 292 | __entry->nr_requested, | 298 | __entry->nr_requested, |
| 293 | __entry->nr_scanned, | 299 | __entry->nr_scanned, |
| 294 | __entry->nr_taken, | 300 | __entry->nr_taken, |
| 295 | __entry->file) | 301 | __entry->nr_lumpy_taken, |
| 302 | __entry->nr_lumpy_dirty, | ||
| 303 | __entry->nr_lumpy_failed) | ||
| 296 | ); | 304 | ); |
| 297 | 305 | ||
| 298 | DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate, | 306 | DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate, |
| @@ -301,10 +309,12 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate, | |||
| 301 | unsigned long nr_requested, | 309 | unsigned long nr_requested, |
| 302 | unsigned long nr_scanned, | 310 | unsigned long nr_scanned, |
| 303 | unsigned long nr_taken, | 311 | unsigned long nr_taken, |
| 304 | isolate_mode_t isolate_mode, | 312 | unsigned long nr_lumpy_taken, |
| 305 | int file), | 313 | unsigned long nr_lumpy_dirty, |
| 314 | unsigned long nr_lumpy_failed, | ||
| 315 | int isolate_mode), | ||
| 306 | 316 | ||
| 307 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file) | 317 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode) |
| 308 | 318 | ||
| 309 | ); | 319 | ); |
| 310 | 320 | ||
| @@ -314,10 +324,12 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate, | |||
| 314 | unsigned long nr_requested, | 324 | unsigned long nr_requested, |
| 315 | unsigned long nr_scanned, | 325 | unsigned long nr_scanned, |
| 316 | unsigned long nr_taken, | 326 | unsigned long nr_taken, |
| 317 | isolate_mode_t isolate_mode, | 327 | unsigned long nr_lumpy_taken, |
| 318 | int file), | 328 | unsigned long nr_lumpy_dirty, |
| 329 | unsigned long nr_lumpy_failed, | ||
| 330 | int isolate_mode), | ||
| 319 | 331 | ||
| 320 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file) | 332 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode) |
| 321 | 333 | ||
| 322 | ); | 334 | ); |
| 323 | 335 | ||
| @@ -377,6 +389,88 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive, | |||
| 377 | show_reclaim_flags(__entry->reclaim_flags)) | 389 | show_reclaim_flags(__entry->reclaim_flags)) |
| 378 | ); | 390 | ); |
| 379 | 391 | ||
| 392 | TRACE_EVENT(replace_swap_token, | ||
| 393 | TP_PROTO(struct mm_struct *old_mm, | ||
| 394 | struct mm_struct *new_mm), | ||
| 395 | |||
| 396 | TP_ARGS(old_mm, new_mm), | ||
| 397 | |||
| 398 | TP_STRUCT__entry( | ||
| 399 | __field(struct mm_struct*, old_mm) | ||
| 400 | __field(unsigned int, old_prio) | ||
| 401 | __field(struct mm_struct*, new_mm) | ||
| 402 | __field(unsigned int, new_prio) | ||
| 403 | ), | ||
| 404 | |||
| 405 | TP_fast_assign( | ||
| 406 | __entry->old_mm = old_mm; | ||
| 407 | __entry->old_prio = old_mm ? old_mm->token_priority : 0; | ||
| 408 | __entry->new_mm = new_mm; | ||
| 409 | __entry->new_prio = new_mm->token_priority; | ||
| 410 | ), | ||
| 411 | |||
| 412 | TP_printk("old_token_mm=%p old_prio=%u new_token_mm=%p new_prio=%u", | ||
| 413 | __entry->old_mm, __entry->old_prio, | ||
| 414 | __entry->new_mm, __entry->new_prio) | ||
| 415 | ); | ||
| 416 | |||
| 417 | DECLARE_EVENT_CLASS(put_swap_token_template, | ||
| 418 | TP_PROTO(struct mm_struct *swap_token_mm), | ||
| 419 | |||
| 420 | TP_ARGS(swap_token_mm), | ||
| 421 | |||
| 422 | TP_STRUCT__entry( | ||
| 423 | __field(struct mm_struct*, swap_token_mm) | ||
| 424 | ), | ||
| 425 | |||
| 426 | TP_fast_assign( | ||
| 427 | __entry->swap_token_mm = swap_token_mm; | ||
| 428 | ), | ||
| 429 | |||
| 430 | TP_printk("token_mm=%p", __entry->swap_token_mm) | ||
| 431 | ); | ||
| 432 | |||
| 433 | DEFINE_EVENT(put_swap_token_template, put_swap_token, | ||
| 434 | TP_PROTO(struct mm_struct *swap_token_mm), | ||
| 435 | TP_ARGS(swap_token_mm) | ||
| 436 | ); | ||
| 437 | |||
| 438 | DEFINE_EVENT_CONDITION(put_swap_token_template, disable_swap_token, | ||
| 439 | TP_PROTO(struct mm_struct *swap_token_mm), | ||
| 440 | TP_ARGS(swap_token_mm), | ||
| 441 | TP_CONDITION(swap_token_mm != NULL) | ||
| 442 | ); | ||
| 443 | |||
| 444 | TRACE_EVENT_CONDITION(update_swap_token_priority, | ||
| 445 | TP_PROTO(struct mm_struct *mm, | ||
| 446 | unsigned int old_prio, | ||
| 447 | struct mm_struct *swap_token_mm), | ||
| 448 | |||
| 449 | TP_ARGS(mm, old_prio, swap_token_mm), | ||
| 450 | |||
| 451 | TP_CONDITION(mm->token_priority != old_prio), | ||
| 452 | |||
| 453 | TP_STRUCT__entry( | ||
| 454 | __field(struct mm_struct*, mm) | ||
| 455 | __field(unsigned int, old_prio) | ||
| 456 | __field(unsigned int, new_prio) | ||
| 457 | __field(struct mm_struct*, swap_token_mm) | ||
| 458 | __field(unsigned int, swap_token_prio) | ||
| 459 | ), | ||
| 460 | |||
| 461 | TP_fast_assign( | ||
| 462 | __entry->mm = mm; | ||
| 463 | __entry->old_prio = old_prio; | ||
| 464 | __entry->new_prio = mm->token_priority; | ||
| 465 | __entry->swap_token_mm = swap_token_mm; | ||
| 466 | __entry->swap_token_prio = swap_token_mm ? swap_token_mm->token_priority : 0; | ||
| 467 | ), | ||
| 468 | |||
| 469 | TP_printk("mm=%p old_prio=%u new_prio=%u swap_token_mm=%p token_prio=%u", | ||
| 470 | __entry->mm, __entry->old_prio, __entry->new_prio, | ||
| 471 | __entry->swap_token_mm, __entry->swap_token_prio) | ||
| 472 | ); | ||
| 473 | |||
| 380 | #endif /* _TRACE_VMSCAN_H */ | 474 | #endif /* _TRACE_VMSCAN_H */ |
| 381 | 475 | ||
| 382 | /* This part must be outside protection */ | 476 | /* This part must be outside protection */ |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index f28d1b65f17..7d497291c85 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
| @@ -54,7 +54,7 @@ TRACE_EVENT(workqueue_queue_work, | |||
| 54 | __entry->function = work->func; | 54 | __entry->function = work->func; |
| 55 | __entry->workqueue = cwq->wq; | 55 | __entry->workqueue = cwq->wq; |
| 56 | __entry->req_cpu = req_cpu; | 56 | __entry->req_cpu = req_cpu; |
| 57 | __entry->cpu = cwq->pool->gcwq->cpu; | 57 | __entry->cpu = cwq->gcwq->cpu; |
| 58 | ), | 58 | ), |
| 59 | 59 | ||
| 60 | TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u", | 60 | TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u", |
| @@ -103,7 +103,7 @@ TRACE_EVENT(workqueue_execute_start, | |||
| 103 | ); | 103 | ); |
| 104 | 104 | ||
| 105 | /** | 105 | /** |
| 106 | * workqueue_execute_end - called immediately after the workqueue callback | 106 | * workqueue_execute_end - called immediately before the workqueue callback |
| 107 | * @work: pointer to struct work_struct | 107 | * @work: pointer to struct work_struct |
| 108 | * | 108 | * |
| 109 | * Allows to track workqueue execution. | 109 | * Allows to track workqueue execution. |
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index b453d92c225..5f172703eb4 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #define _TRACE_WRITEBACK_H | 5 | #define _TRACE_WRITEBACK_H |
| 6 | 6 | ||
| 7 | #include <linux/backing-dev.h> | 7 | #include <linux/backing-dev.h> |
| 8 | #include <linux/device.h> | ||
| 8 | #include <linux/writeback.h> | 9 | #include <linux/writeback.h> |
| 9 | 10 | ||
| 10 | #define show_inode_state(state) \ | 11 | #define show_inode_state(state) \ |
| @@ -20,16 +21,6 @@ | |||
| 20 | {I_REFERENCED, "I_REFERENCED"} \ | 21 | {I_REFERENCED, "I_REFERENCED"} \ |
| 21 | ) | 22 | ) |
| 22 | 23 | ||
| 23 | #define WB_WORK_REASON \ | ||
| 24 | {WB_REASON_BACKGROUND, "background"}, \ | ||
| 25 | {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ | ||
| 26 | {WB_REASON_SYNC, "sync"}, \ | ||
| 27 | {WB_REASON_PERIODIC, "periodic"}, \ | ||
| 28 | {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ | ||
| 29 | {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ | ||
| 30 | {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ | ||
| 31 | {WB_REASON_FORKER_THREAD, "forker_thread"} | ||
| 32 | |||
| 33 | struct wb_writeback_work; | 24 | struct wb_writeback_work; |
| 34 | 25 | ||
| 35 | DECLARE_EVENT_CLASS(writeback_work_class, | 26 | DECLARE_EVENT_CLASS(writeback_work_class, |
| @@ -43,31 +34,25 @@ DECLARE_EVENT_CLASS(writeback_work_class, | |||
| 43 | __field(int, for_kupdate) | 34 | __field(int, for_kupdate) |
| 44 | __field(int, range_cyclic) | 35 | __field(int, range_cyclic) |
| 45 | __field(int, for_background) | 36 | __field(int, for_background) |
| 46 | __field(int, reason) | ||
| 47 | ), | 37 | ), |
| 48 | TP_fast_assign( | 38 | TP_fast_assign( |
| 49 | struct device *dev = bdi->dev; | 39 | strncpy(__entry->name, dev_name(bdi->dev), 32); |
| 50 | if (!dev) | ||
| 51 | dev = default_backing_dev_info.dev; | ||
| 52 | strncpy(__entry->name, dev_name(dev), 32); | ||
| 53 | __entry->nr_pages = work->nr_pages; | 40 | __entry->nr_pages = work->nr_pages; |
| 54 | __entry->sb_dev = work->sb ? work->sb->s_dev : 0; | 41 | __entry->sb_dev = work->sb ? work->sb->s_dev : 0; |
| 55 | __entry->sync_mode = work->sync_mode; | 42 | __entry->sync_mode = work->sync_mode; |
| 56 | __entry->for_kupdate = work->for_kupdate; | 43 | __entry->for_kupdate = work->for_kupdate; |
| 57 | __entry->range_cyclic = work->range_cyclic; | 44 | __entry->range_cyclic = work->range_cyclic; |
| 58 | __entry->for_background = work->for_background; | 45 | __entry->for_background = work->for_background; |
| 59 | __entry->reason = work->reason; | ||
| 60 | ), | 46 | ), |
| 61 | TP_printk("bdi %s: sb_dev %d:%d nr_pages=%ld sync_mode=%d " | 47 | TP_printk("bdi %s: sb_dev %d:%d nr_pages=%ld sync_mode=%d " |
| 62 | "kupdate=%d range_cyclic=%d background=%d reason=%s", | 48 | "kupdate=%d range_cyclic=%d background=%d", |
| 63 | __entry->name, | 49 | __entry->name, |
| 64 | MAJOR(__entry->sb_dev), MINOR(__entry->sb_dev), | 50 | MAJOR(__entry->sb_dev), MINOR(__entry->sb_dev), |
| 65 | __entry->nr_pages, | 51 | __entry->nr_pages, |
| 66 | __entry->sync_mode, | 52 | __entry->sync_mode, |
| 67 | __entry->for_kupdate, | 53 | __entry->for_kupdate, |
| 68 | __entry->range_cyclic, | 54 | __entry->range_cyclic, |
| 69 | __entry->for_background, | 55 | __entry->for_background |
| 70 | __print_symbolic(__entry->reason, WB_WORK_REASON) | ||
| 71 | ) | 56 | ) |
| 72 | ); | 57 | ); |
| 73 | #define DEFINE_WRITEBACK_WORK_EVENT(name) \ | 58 | #define DEFINE_WRITEBACK_WORK_EVENT(name) \ |
| @@ -119,6 +104,30 @@ DEFINE_WRITEBACK_EVENT(writeback_bdi_register); | |||
| 119 | DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); | 104 | DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); |
| 120 | DEFINE_WRITEBACK_EVENT(writeback_thread_start); | 105 | DEFINE_WRITEBACK_EVENT(writeback_thread_start); |
| 121 | DEFINE_WRITEBACK_EVENT(writeback_thread_stop); | 106 | DEFINE_WRITEBACK_EVENT(writeback_thread_stop); |
| 107 | DEFINE_WRITEBACK_EVENT(balance_dirty_start); | ||
| 108 | DEFINE_WRITEBACK_EVENT(balance_dirty_wait); | ||
| 109 | |||
| 110 | TRACE_EVENT(balance_dirty_written, | ||
| 111 | |||
| 112 | TP_PROTO(struct backing_dev_info *bdi, int written), | ||
| 113 | |||
| 114 | TP_ARGS(bdi, written), | ||
| 115 | |||
| 116 | TP_STRUCT__entry( | ||
| 117 | __array(char, name, 32) | ||
| 118 | __field(int, written) | ||
| 119 | ), | ||
| 120 | |||
| 121 | TP_fast_assign( | ||
| 122 | strncpy(__entry->name, dev_name(bdi->dev), 32); | ||
| 123 | __entry->written = written; | ||
| 124 | ), | ||
| 125 | |||
| 126 | TP_printk("bdi %s written %d", | ||
| 127 | __entry->name, | ||
| 128 | __entry->written | ||
| 129 | ) | ||
| 130 | ); | ||
| 122 | 131 | ||
| 123 | DECLARE_EVENT_CLASS(wbc_class, | 132 | DECLARE_EVENT_CLASS(wbc_class, |
| 124 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), | 133 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), |
| @@ -172,32 +181,27 @@ DEFINE_WBC_EVENT(wbc_writepage); | |||
| 172 | 181 | ||
| 173 | TRACE_EVENT(writeback_queue_io, | 182 | TRACE_EVENT(writeback_queue_io, |
| 174 | TP_PROTO(struct bdi_writeback *wb, | 183 | TP_PROTO(struct bdi_writeback *wb, |
| 175 | struct wb_writeback_work *work, | 184 | unsigned long *older_than_this, |
| 176 | int moved), | 185 | int moved), |
| 177 | TP_ARGS(wb, work, moved), | 186 | TP_ARGS(wb, older_than_this, moved), |
| 178 | TP_STRUCT__entry( | 187 | TP_STRUCT__entry( |
| 179 | __array(char, name, 32) | 188 | __array(char, name, 32) |
| 180 | __field(unsigned long, older) | 189 | __field(unsigned long, older) |
| 181 | __field(long, age) | 190 | __field(long, age) |
| 182 | __field(int, moved) | 191 | __field(int, moved) |
| 183 | __field(int, reason) | ||
| 184 | ), | 192 | ), |
| 185 | TP_fast_assign( | 193 | TP_fast_assign( |
| 186 | unsigned long *older_than_this = work->older_than_this; | ||
| 187 | strncpy(__entry->name, dev_name(wb->bdi->dev), 32); | 194 | strncpy(__entry->name, dev_name(wb->bdi->dev), 32); |
| 188 | __entry->older = older_than_this ? *older_than_this : 0; | 195 | __entry->older = older_than_this ? *older_than_this : 0; |
| 189 | __entry->age = older_than_this ? | 196 | __entry->age = older_than_this ? |
| 190 | (jiffies - *older_than_this) * 1000 / HZ : -1; | 197 | (jiffies - *older_than_this) * 1000 / HZ : -1; |
| 191 | __entry->moved = moved; | 198 | __entry->moved = moved; |
| 192 | __entry->reason = work->reason; | ||
| 193 | ), | 199 | ), |
| 194 | TP_printk("bdi %s: older=%lu age=%ld enqueue=%d reason=%s", | 200 | TP_printk("bdi %s: older=%lu age=%ld enqueue=%d", |
| 195 | __entry->name, | 201 | __entry->name, |
| 196 | __entry->older, /* older_than_this in jiffies */ | 202 | __entry->older, /* older_than_this in jiffies */ |
| 197 | __entry->age, /* older_than_this in relative milliseconds */ | 203 | __entry->age, /* older_than_this in relative milliseconds */ |
| 198 | __entry->moved, | 204 | __entry->moved) |
| 199 | __print_symbolic(__entry->reason, WB_WORK_REASON) | ||
| 200 | ) | ||
| 201 | ); | 205 | ); |
| 202 | 206 | ||
| 203 | TRACE_EVENT(global_dirty_state, | 207 | TRACE_EVENT(global_dirty_state, |
| @@ -246,161 +250,6 @@ TRACE_EVENT(global_dirty_state, | |||
| 246 | ) | 250 | ) |
| 247 | ); | 251 | ); |
| 248 | 252 | ||
| 249 | #define KBps(x) ((x) << (PAGE_SHIFT - 10)) | ||
| 250 | |||
| 251 | TRACE_EVENT(bdi_dirty_ratelimit, | ||
| 252 | |||
| 253 | TP_PROTO(struct backing_dev_info *bdi, | ||
| 254 | unsigned long dirty_rate, | ||
| 255 | unsigned long task_ratelimit), | ||
| 256 | |||
| 257 | TP_ARGS(bdi, dirty_rate, task_ratelimit), | ||
| 258 | |||
| 259 | TP_STRUCT__entry( | ||
| 260 | __array(char, bdi, 32) | ||
| 261 | __field(unsigned long, write_bw) | ||
| 262 | __field(unsigned long, avg_write_bw) | ||
| 263 | __field(unsigned long, dirty_rate) | ||
| 264 | __field(unsigned long, dirty_ratelimit) | ||
| 265 | __field(unsigned long, task_ratelimit) | ||
| 266 | __field(unsigned long, balanced_dirty_ratelimit) | ||
| 267 | ), | ||
| 268 | |||
| 269 | TP_fast_assign( | ||
| 270 | strlcpy(__entry->bdi, dev_name(bdi->dev), 32); | ||
| 271 | __entry->write_bw = KBps(bdi->write_bandwidth); | ||
| 272 | __entry->avg_write_bw = KBps(bdi->avg_write_bandwidth); | ||
| 273 | __entry->dirty_rate = KBps(dirty_rate); | ||
| 274 | __entry->dirty_ratelimit = KBps(bdi->dirty_ratelimit); | ||
| 275 | __entry->task_ratelimit = KBps(task_ratelimit); | ||
| 276 | __entry->balanced_dirty_ratelimit = | ||
| 277 | KBps(bdi->balanced_dirty_ratelimit); | ||
| 278 | ), | ||
| 279 | |||
| 280 | TP_printk("bdi %s: " | ||
| 281 | "write_bw=%lu awrite_bw=%lu dirty_rate=%lu " | ||
| 282 | "dirty_ratelimit=%lu task_ratelimit=%lu " | ||
| 283 | "balanced_dirty_ratelimit=%lu", | ||
| 284 | __entry->bdi, | ||
| 285 | __entry->write_bw, /* write bandwidth */ | ||
| 286 | __entry->avg_write_bw, /* avg write bandwidth */ | ||
| 287 | __entry->dirty_rate, /* bdi dirty rate */ | ||
| 288 | __entry->dirty_ratelimit, /* base ratelimit */ | ||
| 289 | __entry->task_ratelimit, /* ratelimit with position control */ | ||
| 290 | __entry->balanced_dirty_ratelimit /* the balanced ratelimit */ | ||
| 291 | ) | ||
| 292 | ); | ||
| 293 | |||
| 294 | TRACE_EVENT(balance_dirty_pages, | ||
| 295 | |||
| 296 | TP_PROTO(struct backing_dev_info *bdi, | ||
| 297 | unsigned long thresh, | ||
| 298 | unsigned long bg_thresh, | ||
| 299 | unsigned long dirty, | ||
| 300 | unsigned long bdi_thresh, | ||
| 301 | unsigned long bdi_dirty, | ||
| 302 | unsigned long dirty_ratelimit, | ||
| 303 | unsigned long task_ratelimit, | ||
| 304 | unsigned long dirtied, | ||
| 305 | unsigned long period, | ||
| 306 | long pause, | ||
| 307 | unsigned long start_time), | ||
| 308 | |||
| 309 | TP_ARGS(bdi, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty, | ||
| 310 | dirty_ratelimit, task_ratelimit, | ||
| 311 | dirtied, period, pause, start_time), | ||
| 312 | |||
| 313 | TP_STRUCT__entry( | ||
| 314 | __array( char, bdi, 32) | ||
| 315 | __field(unsigned long, limit) | ||
| 316 | __field(unsigned long, setpoint) | ||
| 317 | __field(unsigned long, dirty) | ||
| 318 | __field(unsigned long, bdi_setpoint) | ||
| 319 | __field(unsigned long, bdi_dirty) | ||
| 320 | __field(unsigned long, dirty_ratelimit) | ||
| 321 | __field(unsigned long, task_ratelimit) | ||
| 322 | __field(unsigned int, dirtied) | ||
| 323 | __field(unsigned int, dirtied_pause) | ||
| 324 | __field(unsigned long, paused) | ||
| 325 | __field( long, pause) | ||
| 326 | __field(unsigned long, period) | ||
| 327 | __field( long, think) | ||
| 328 | ), | ||
| 329 | |||
| 330 | TP_fast_assign( | ||
| 331 | unsigned long freerun = (thresh + bg_thresh) / 2; | ||
| 332 | strlcpy(__entry->bdi, dev_name(bdi->dev), 32); | ||
| 333 | |||
| 334 | __entry->limit = global_dirty_limit; | ||
| 335 | __entry->setpoint = (global_dirty_limit + freerun) / 2; | ||
| 336 | __entry->dirty = dirty; | ||
| 337 | __entry->bdi_setpoint = __entry->setpoint * | ||
| 338 | bdi_thresh / (thresh + 1); | ||
| 339 | __entry->bdi_dirty = bdi_dirty; | ||
| 340 | __entry->dirty_ratelimit = KBps(dirty_ratelimit); | ||
| 341 | __entry->task_ratelimit = KBps(task_ratelimit); | ||
| 342 | __entry->dirtied = dirtied; | ||
| 343 | __entry->dirtied_pause = current->nr_dirtied_pause; | ||
| 344 | __entry->think = current->dirty_paused_when == 0 ? 0 : | ||
| 345 | (long)(jiffies - current->dirty_paused_when) * 1000/HZ; | ||
| 346 | __entry->period = period * 1000 / HZ; | ||
| 347 | __entry->pause = pause * 1000 / HZ; | ||
| 348 | __entry->paused = (jiffies - start_time) * 1000 / HZ; | ||
| 349 | ), | ||
| 350 | |||
| 351 | |||
| 352 | TP_printk("bdi %s: " | ||
| 353 | "limit=%lu setpoint=%lu dirty=%lu " | ||
| 354 | "bdi_setpoint=%lu bdi_dirty=%lu " | ||
| 355 | "dirty_ratelimit=%lu task_ratelimit=%lu " | ||
| 356 | "dirtied=%u dirtied_pause=%u " | ||
| 357 | "paused=%lu pause=%ld period=%lu think=%ld", | ||
| 358 | __entry->bdi, | ||
| 359 | __entry->limit, | ||
| 360 | __entry->setpoint, | ||
| 361 | __entry->dirty, | ||
| 362 | __entry->bdi_setpoint, | ||
| 363 | __entry->bdi_dirty, | ||
| 364 | __entry->dirty_ratelimit, | ||
| 365 | __entry->task_ratelimit, | ||
| 366 | __entry->dirtied, | ||
| 367 | __entry->dirtied_pause, | ||
| 368 | __entry->paused, /* ms */ | ||
| 369 | __entry->pause, /* ms */ | ||
| 370 | __entry->period, /* ms */ | ||
| 371 | __entry->think /* ms */ | ||
| 372 | ) | ||
| 373 | ); | ||
| 374 | |||
| 375 | TRACE_EVENT(writeback_sb_inodes_requeue, | ||
| 376 | |||
| 377 | TP_PROTO(struct inode *inode), | ||
| 378 | TP_ARGS(inode), | ||
| 379 | |||
| 380 | TP_STRUCT__entry( | ||
| 381 | __array(char, name, 32) | ||
| 382 | __field(unsigned long, ino) | ||
| 383 | __field(unsigned long, state) | ||
| 384 | __field(unsigned long, dirtied_when) | ||
| 385 | ), | ||
| 386 | |||
| 387 | TP_fast_assign( | ||
| 388 | strncpy(__entry->name, | ||
| 389 | dev_name(inode_to_bdi(inode)->dev), 32); | ||
| 390 | __entry->ino = inode->i_ino; | ||
| 391 | __entry->state = inode->i_state; | ||
| 392 | __entry->dirtied_when = inode->dirtied_when; | ||
| 393 | ), | ||
| 394 | |||
| 395 | TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu", | ||
| 396 | __entry->name, | ||
| 397 | __entry->ino, | ||
| 398 | show_inode_state(__entry->state), | ||
| 399 | __entry->dirtied_when, | ||
| 400 | (jiffies - __entry->dirtied_when) / HZ | ||
| 401 | ) | ||
| 402 | ); | ||
| 403 | |||
| 404 | DECLARE_EVENT_CLASS(writeback_congest_waited_template, | 253 | DECLARE_EVENT_CLASS(writeback_congest_waited_template, |
| 405 | 254 | ||
| 406 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | 255 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), |
| @@ -457,7 +306,7 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template, | |||
| 457 | 306 | ||
| 458 | TP_fast_assign( | 307 | TP_fast_assign( |
| 459 | strncpy(__entry->name, | 308 | strncpy(__entry->name, |
| 460 | dev_name(inode_to_bdi(inode)->dev), 32); | 309 | dev_name(inode->i_mapping->backing_dev_info->dev), 32); |
| 461 | __entry->ino = inode->i_ino; | 310 | __entry->ino = inode->i_ino; |
| 462 | __entry->state = inode->i_state; | 311 | __entry->state = inode->i_state; |
| 463 | __entry->dirtied_when = inode->dirtied_when; | 312 | __entry->dirtied_when = inode->dirtied_when; |
| @@ -479,6 +328,13 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template, | |||
| 479 | ) | 328 | ) |
| 480 | ); | 329 | ); |
| 481 | 330 | ||
| 331 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode_requeue, | ||
| 332 | TP_PROTO(struct inode *inode, | ||
| 333 | struct writeback_control *wbc, | ||
| 334 | unsigned long nr_to_write), | ||
| 335 | TP_ARGS(inode, wbc, nr_to_write) | ||
| 336 | ); | ||
| 337 | |||
| 482 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode, | 338 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode, |
| 483 | TP_PROTO(struct inode *inode, | 339 | TP_PROTO(struct inode *inode, |
| 484 | struct writeback_control *wbc, | 340 | struct writeback_control *wbc, |
diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index d06b6da5c1e..92f1a796829 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h | |||
| @@ -377,14 +377,6 @@ DECLARE_EVENT_CLASS(xen_mmu_pgd, | |||
| 377 | DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_pin); | 377 | DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_pin); |
| 378 | DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_unpin); | 378 | DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_unpin); |
| 379 | 379 | ||
| 380 | TRACE_EVENT(xen_mmu_flush_tlb_all, | ||
| 381 | TP_PROTO(int x), | ||
| 382 | TP_ARGS(x), | ||
| 383 | TP_STRUCT__entry(__array(char, x, 0)), | ||
| 384 | TP_fast_assign((void)x), | ||
| 385 | TP_printk("%s", "") | ||
| 386 | ); | ||
| 387 | |||
| 388 | TRACE_EVENT(xen_mmu_flush_tlb, | 380 | TRACE_EVENT(xen_mmu_flush_tlb, |
| 389 | TP_PROTO(int x), | 381 | TP_PROTO(int x), |
| 390 | TP_ARGS(x), | 382 | TP_ARGS(x), |
| @@ -405,20 +397,18 @@ TRACE_EVENT(xen_mmu_flush_tlb_single, | |||
| 405 | 397 | ||
| 406 | TRACE_EVENT(xen_mmu_flush_tlb_others, | 398 | TRACE_EVENT(xen_mmu_flush_tlb_others, |
| 407 | TP_PROTO(const struct cpumask *cpus, struct mm_struct *mm, | 399 | TP_PROTO(const struct cpumask *cpus, struct mm_struct *mm, |
| 408 | unsigned long addr, unsigned long end), | 400 | unsigned long addr), |
| 409 | TP_ARGS(cpus, mm, addr, end), | 401 | TP_ARGS(cpus, mm, addr), |
| 410 | TP_STRUCT__entry( | 402 | TP_STRUCT__entry( |
| 411 | __field(unsigned, ncpus) | 403 | __field(unsigned, ncpus) |
| 412 | __field(struct mm_struct *, mm) | 404 | __field(struct mm_struct *, mm) |
| 413 | __field(unsigned long, addr) | 405 | __field(unsigned long, addr) |
| 414 | __field(unsigned long, end) | ||
| 415 | ), | 406 | ), |
| 416 | TP_fast_assign(__entry->ncpus = cpumask_weight(cpus); | 407 | TP_fast_assign(__entry->ncpus = cpumask_weight(cpus); |
| 417 | __entry->mm = mm; | 408 | __entry->mm = mm; |
| 418 | __entry->addr = addr, | 409 | __entry->addr = addr), |
| 419 | __entry->end = end), | 410 | TP_printk("ncpus %d mm %p addr %lx", |
| 420 | TP_printk("ncpus %d mm %p addr %lx, end %lx", | 411 | __entry->ncpus, __entry->mm, __entry->addr) |
| 421 | __entry->ncpus, __entry->mm, __entry->addr, __entry->end) | ||
| 422 | ); | 412 | ); |
| 423 | 413 | ||
| 424 | TRACE_EVENT(xen_mmu_write_cr3, | 414 | TRACE_EVENT(xen_mmu_write_cr3, |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 40dc5e8fe34..533c49f4804 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -545,7 +545,8 @@ ftrace_raw_event_##call(void *__data, proto) \ | |||
| 545 | { assign; } \ | 545 | { assign; } \ |
| 546 | \ | 546 | \ |
| 547 | if (!filter_current_check_discard(buffer, event_call, entry, event)) \ | 547 | if (!filter_current_check_discard(buffer, event_call, entry, event)) \ |
| 548 | trace_buffer_unlock_commit(buffer, event, irq_flags, pc); \ | 548 | trace_nowake_buffer_unlock_commit(buffer, \ |
| 549 | event, irq_flags, pc); \ | ||
| 549 | } | 550 | } |
| 550 | /* | 551 | /* |
| 551 | * The ftrace_test_probe is compiled out, it is only here as a build time check | 552 | * The ftrace_test_probe is compiled out, it is only here as a build time check |
| @@ -570,7 +571,6 @@ static inline void ftrace_test_probe_##call(void) \ | |||
| 570 | 571 | ||
| 571 | #undef __print_flags | 572 | #undef __print_flags |
| 572 | #undef __print_symbolic | 573 | #undef __print_symbolic |
| 573 | #undef __print_hex | ||
| 574 | #undef __get_dynamic_array | 574 | #undef __get_dynamic_array |
| 575 | #undef __get_str | 575 | #undef __get_str |
| 576 | 576 | ||
| @@ -619,6 +619,79 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | |||
| 619 | 619 | ||
| 620 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 620 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
| 621 | 621 | ||
| 622 | /* | ||
| 623 | * Define the insertion callback to perf events | ||
| 624 | * | ||
| 625 | * The job is very similar to ftrace_raw_event_<call> except that we don't | ||
| 626 | * insert in the ring buffer but in a perf counter. | ||
| 627 | * | ||
| 628 | * static void ftrace_perf_<call>(proto) | ||
| 629 | * { | ||
| 630 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; | ||
| 631 | * struct ftrace_event_call *event_call = &event_<call>; | ||
| 632 | * extern void perf_tp_event(int, u64, u64, void *, int); | ||
| 633 | * struct ftrace_raw_##call *entry; | ||
| 634 | * struct perf_trace_buf *trace_buf; | ||
| 635 | * u64 __addr = 0, __count = 1; | ||
| 636 | * unsigned long irq_flags; | ||
| 637 | * struct trace_entry *ent; | ||
| 638 | * int __entry_size; | ||
| 639 | * int __data_size; | ||
| 640 | * int __cpu | ||
| 641 | * int pc; | ||
| 642 | * | ||
| 643 | * pc = preempt_count(); | ||
| 644 | * | ||
| 645 | * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); | ||
| 646 | * | ||
| 647 | * // Below we want to get the aligned size by taking into account | ||
| 648 | * // the u32 field that will later store the buffer size | ||
| 649 | * __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32), | ||
| 650 | * sizeof(u64)); | ||
| 651 | * __entry_size -= sizeof(u32); | ||
| 652 | * | ||
| 653 | * // Protect the non nmi buffer | ||
| 654 | * // This also protects the rcu read side | ||
| 655 | * local_irq_save(irq_flags); | ||
| 656 | * __cpu = smp_processor_id(); | ||
| 657 | * | ||
| 658 | * if (in_nmi()) | ||
| 659 | * trace_buf = rcu_dereference_sched(perf_trace_buf_nmi); | ||
| 660 | * else | ||
| 661 | * trace_buf = rcu_dereference_sched(perf_trace_buf); | ||
| 662 | * | ||
| 663 | * if (!trace_buf) | ||
| 664 | * goto end; | ||
| 665 | * | ||
| 666 | * trace_buf = per_cpu_ptr(trace_buf, __cpu); | ||
| 667 | * | ||
| 668 | * // Avoid recursion from perf that could mess up the buffer | ||
| 669 | * if (trace_buf->recursion++) | ||
| 670 | * goto end_recursion; | ||
| 671 | * | ||
| 672 | * raw_data = trace_buf->buf; | ||
| 673 | * | ||
| 674 | * // Make recursion update visible before entering perf_tp_event | ||
| 675 | * // so that we protect from perf recursions. | ||
| 676 | * | ||
| 677 | * barrier(); | ||
| 678 | * | ||
| 679 | * //zero dead bytes from alignment to avoid stack leak to userspace: | ||
| 680 | * *(u64 *)(&raw_data[__entry_size - sizeof(u64)]) = 0ULL; | ||
| 681 | * entry = (struct ftrace_raw_<call> *)raw_data; | ||
| 682 | * ent = &entry->ent; | ||
| 683 | * tracing_generic_entry_update(ent, irq_flags, pc); | ||
| 684 | * ent->type = event_call->id; | ||
| 685 | * | ||
| 686 | * <tstruct> <- do some jobs with dynamic arrays | ||
| 687 | * | ||
| 688 | * <assign> <- affect our values | ||
| 689 | * | ||
| 690 | * perf_tp_event(event_call->id, __addr, __count, entry, | ||
| 691 | * __entry_size); <- submit them to perf counter | ||
| 692 | * | ||
| 693 | * } | ||
| 694 | */ | ||
| 622 | 695 | ||
| 623 | #ifdef CONFIG_PERF_EVENTS | 696 | #ifdef CONFIG_PERF_EVENTS |
| 624 | 697 | ||
| @@ -638,12 +711,6 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | |||
| 638 | #undef __perf_count | 711 | #undef __perf_count |
| 639 | #define __perf_count(c) __count = (c) | 712 | #define __perf_count(c) __count = (c) |
| 640 | 713 | ||
| 641 | #undef __perf_task | ||
| 642 | #define __perf_task(t) __task = (t) | ||
| 643 | |||
| 644 | #undef TP_perf_assign | ||
| 645 | #define TP_perf_assign(args...) args | ||
| 646 | |||
| 647 | #undef DECLARE_EVENT_CLASS | 714 | #undef DECLARE_EVENT_CLASS |
| 648 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 715 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
| 649 | static notrace void \ | 716 | static notrace void \ |
| @@ -654,7 +721,6 @@ perf_trace_##call(void *__data, proto) \ | |||
| 654 | struct ftrace_raw_##call *entry; \ | 721 | struct ftrace_raw_##call *entry; \ |
| 655 | struct pt_regs __regs; \ | 722 | struct pt_regs __regs; \ |
| 656 | u64 __addr = 0, __count = 1; \ | 723 | u64 __addr = 0, __count = 1; \ |
| 657 | struct task_struct *__task = NULL; \ | ||
| 658 | struct hlist_head *head; \ | 724 | struct hlist_head *head; \ |
| 659 | int __entry_size; \ | 725 | int __entry_size; \ |
| 660 | int __data_size; \ | 726 | int __data_size; \ |
| @@ -682,7 +748,7 @@ perf_trace_##call(void *__data, proto) \ | |||
| 682 | \ | 748 | \ |
| 683 | head = this_cpu_ptr(event_call->perf_events); \ | 749 | head = this_cpu_ptr(event_call->perf_events); \ |
| 684 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | 750 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ |
| 685 | __count, &__regs, head, __task); \ | 751 | __count, &__regs, head); \ |
| 686 | } | 752 | } |
| 687 | 753 | ||
| 688 | /* | 754 | /* |
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 84bc4197e73..31966a4fb8c 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
| @@ -31,4 +31,27 @@ struct syscall_metadata { | |||
| 31 | struct ftrace_event_call *exit_event; | 31 | struct ftrace_event_call *exit_event; |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | #ifdef CONFIG_FTRACE_SYSCALLS | ||
| 35 | extern unsigned long arch_syscall_addr(int nr); | ||
| 36 | extern int init_syscall_trace(struct ftrace_event_call *call); | ||
| 37 | |||
| 38 | extern int reg_event_syscall_enter(struct ftrace_event_call *call); | ||
| 39 | extern void unreg_event_syscall_enter(struct ftrace_event_call *call); | ||
| 40 | extern int reg_event_syscall_exit(struct ftrace_event_call *call); | ||
| 41 | extern void unreg_event_syscall_exit(struct ftrace_event_call *call); | ||
| 42 | extern int | ||
| 43 | ftrace_format_syscall(struct ftrace_event_call *call, struct trace_seq *s); | ||
| 44 | enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags, | ||
| 45 | struct trace_event *event); | ||
| 46 | enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags, | ||
| 47 | struct trace_event *event); | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #ifdef CONFIG_PERF_EVENTS | ||
| 51 | int perf_sysenter_enable(struct ftrace_event_call *call); | ||
| 52 | void perf_sysenter_disable(struct ftrace_event_call *call); | ||
| 53 | int perf_sysexit_enable(struct ftrace_event_call *call); | ||
| 54 | void perf_sysexit_disable(struct ftrace_event_call *call); | ||
| 55 | #endif | ||
| 56 | |||
| 34 | #endif /* _TRACE_SYSCALL_H */ | 57 | #endif /* _TRACE_SYSCALL_H */ |
