diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/block.h | 33 | ||||
-rw-r--r-- | include/trace/ftrace.h | 15 |
2 files changed, 42 insertions, 6 deletions
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index d86af94691c2..00405b5f624a 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -488,6 +488,39 @@ TRACE_EVENT(block_remap, | |||
488 | (unsigned long long)__entry->old_sector) | 488 | (unsigned long long)__entry->old_sector) |
489 | ); | 489 | ); |
490 | 490 | ||
491 | TRACE_EVENT(block_rq_remap, | ||
492 | |||
493 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, | ||
494 | sector_t from), | ||
495 | |||
496 | TP_ARGS(q, rq, dev, from), | ||
497 | |||
498 | TP_STRUCT__entry( | ||
499 | __field( dev_t, dev ) | ||
500 | __field( sector_t, sector ) | ||
501 | __field( unsigned int, nr_sector ) | ||
502 | __field( dev_t, old_dev ) | ||
503 | __field( sector_t, old_sector ) | ||
504 | __array( char, rwbs, 6 ) | ||
505 | ), | ||
506 | |||
507 | TP_fast_assign( | ||
508 | __entry->dev = disk_devt(rq->rq_disk); | ||
509 | __entry->sector = blk_rq_pos(rq); | ||
510 | __entry->nr_sector = blk_rq_sectors(rq); | ||
511 | __entry->old_dev = dev; | ||
512 | __entry->old_sector = from; | ||
513 | blk_fill_rwbs_rq(__entry->rwbs, rq); | ||
514 | ), | ||
515 | |||
516 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", | ||
517 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | ||
518 | (unsigned long long)__entry->sector, | ||
519 | __entry->nr_sector, | ||
520 | MAJOR(__entry->old_dev), MINOR(__entry->old_dev), | ||
521 | (unsigned long long)__entry->old_sector) | ||
522 | ); | ||
523 | |||
491 | #endif /* _TRACE_BLOCK_H */ | 524 | #endif /* _TRACE_BLOCK_H */ |
492 | 525 | ||
493 | /* This part must be outside protection */ | 526 | /* This part must be outside protection */ |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index cc0d9667e182..c9bbcab95fbe 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -120,9 +120,10 @@ | |||
120 | #undef __field | 120 | #undef __field |
121 | #define __field(type, item) \ | 121 | #define __field(type, item) \ |
122 | ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \ | 122 | ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \ |
123 | "offset:%u;\tsize:%u;\n", \ | 123 | "offset:%u;\tsize:%u;\tsigned:%u;\n", \ |
124 | (unsigned int)offsetof(typeof(field), item), \ | 124 | (unsigned int)offsetof(typeof(field), item), \ |
125 | (unsigned int)sizeof(field.item)); \ | 125 | (unsigned int)sizeof(field.item), \ |
126 | (unsigned int)is_signed_type(type)); \ | ||
126 | if (!ret) \ | 127 | if (!ret) \ |
127 | return 0; | 128 | return 0; |
128 | 129 | ||
@@ -132,19 +133,21 @@ | |||
132 | #undef __array | 133 | #undef __array |
133 | #define __array(type, item, len) \ | 134 | #define __array(type, item, len) \ |
134 | ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \ | 135 | ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \ |
135 | "offset:%u;\tsize:%u;\n", \ | 136 | "offset:%u;\tsize:%u;\tsigned:%u;\n", \ |
136 | (unsigned int)offsetof(typeof(field), item), \ | 137 | (unsigned int)offsetof(typeof(field), item), \ |
137 | (unsigned int)sizeof(field.item)); \ | 138 | (unsigned int)sizeof(field.item), \ |
139 | (unsigned int)is_signed_type(type)); \ | ||
138 | if (!ret) \ | 140 | if (!ret) \ |
139 | return 0; | 141 | return 0; |
140 | 142 | ||
141 | #undef __dynamic_array | 143 | #undef __dynamic_array |
142 | #define __dynamic_array(type, item, len) \ | 144 | #define __dynamic_array(type, item, len) \ |
143 | ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\ | 145 | ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\ |
144 | "offset:%u;\tsize:%u;\n", \ | 146 | "offset:%u;\tsize:%u;\tsigned:%u;\n", \ |
145 | (unsigned int)offsetof(typeof(field), \ | 147 | (unsigned int)offsetof(typeof(field), \ |
146 | __data_loc_##item), \ | 148 | __data_loc_##item), \ |
147 | (unsigned int)sizeof(field.__data_loc_##item)); \ | 149 | (unsigned int)sizeof(field.__data_loc_##item), \ |
150 | (unsigned int)is_signed_type(type)); \ | ||
148 | if (!ret) \ | 151 | if (!ret) \ |
149 | return 0; | 152 | return 0; |
150 | 153 | ||