diff options
-rw-r--r-- | block/blk-core.c | 13 | ||||
-rw-r--r-- | block/elevator.c | 5 | ||||
-rw-r--r-- | drivers/md/dm.c | 2 | ||||
-rw-r--r-- | fs/bio.c | 2 | ||||
-rw-r--r-- | include/trace/block.h | 84 | ||||
-rw-r--r-- | mm/bounce.c | 2 |
6 files changed, 74 insertions, 34 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 04267d66a2b9..0c06cf5aaaf8 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -32,6 +32,19 @@ | |||
32 | 32 | ||
33 | #include "blk.h" | 33 | #include "blk.h" |
34 | 34 | ||
35 | DEFINE_TRACE(block_plug); | ||
36 | DEFINE_TRACE(block_unplug_io); | ||
37 | DEFINE_TRACE(block_unplug_timer); | ||
38 | DEFINE_TRACE(block_getrq); | ||
39 | DEFINE_TRACE(block_sleeprq); | ||
40 | DEFINE_TRACE(block_rq_requeue); | ||
41 | DEFINE_TRACE(block_bio_backmerge); | ||
42 | DEFINE_TRACE(block_bio_frontmerge); | ||
43 | DEFINE_TRACE(block_bio_queue); | ||
44 | DEFINE_TRACE(block_rq_complete); | ||
45 | DEFINE_TRACE(block_remap); /* Also used in drivers/md/dm.c */ | ||
46 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_remap); | ||
47 | |||
35 | static int __make_request(struct request_queue *q, struct bio *bio); | 48 | static int __make_request(struct request_queue *q, struct bio *bio); |
36 | 49 | ||
37 | /* | 50 | /* |
diff --git a/block/elevator.c b/block/elevator.c index 530fcfe2ef07..e5677fe4f412 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -42,6 +42,8 @@ | |||
42 | static DEFINE_SPINLOCK(elv_list_lock); | 42 | static DEFINE_SPINLOCK(elv_list_lock); |
43 | static LIST_HEAD(elv_list); | 43 | static LIST_HEAD(elv_list); |
44 | 44 | ||
45 | DEFINE_TRACE(block_rq_abort); | ||
46 | |||
45 | /* | 47 | /* |
46 | * Merge hash stuff. | 48 | * Merge hash stuff. |
47 | */ | 49 | */ |
@@ -53,6 +55,9 @@ static const int elv_hash_shift = 6; | |||
53 | #define rq_hash_key(rq) ((rq)->sector + (rq)->nr_sectors) | 55 | #define rq_hash_key(rq) ((rq)->sector + (rq)->nr_sectors) |
54 | #define ELV_ON_HASH(rq) (!hlist_unhashed(&(rq)->hash)) | 56 | #define ELV_ON_HASH(rq) (!hlist_unhashed(&(rq)->hash)) |
55 | 57 | ||
58 | DEFINE_TRACE(block_rq_insert); | ||
59 | DEFINE_TRACE(block_rq_issue); | ||
60 | |||
56 | /* | 61 | /* |
57 | * Query io scheduler to see if the current process issuing bio may be | 62 | * Query io scheduler to see if the current process issuing bio may be |
58 | * merged with rq. | 63 | * merged with rq. |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index d23fda178163..343094c3feeb 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -52,6 +52,8 @@ struct dm_target_io { | |||
52 | union map_info info; | 52 | union map_info info; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | DEFINE_TRACE(block_bio_complete); | ||
56 | |||
55 | union map_info *dm_get_mapinfo(struct bio *bio) | 57 | union map_info *dm_get_mapinfo(struct bio *bio) |
56 | { | 58 | { |
57 | if (bio && bio->bi_private) | 59 | if (bio && bio->bi_private) |
@@ -29,6 +29,8 @@ | |||
29 | #include <trace/block.h> | 29 | #include <trace/block.h> |
30 | #include <scsi/sg.h> /* for struct sg_iovec */ | 30 | #include <scsi/sg.h> /* for struct sg_iovec */ |
31 | 31 | ||
32 | DEFINE_TRACE(block_split); | ||
33 | |||
32 | static struct kmem_cache *bio_slab __read_mostly; | 34 | static struct kmem_cache *bio_slab __read_mostly; |
33 | 35 | ||
34 | static mempool_t *bio_split_pool __read_mostly; | 36 | static mempool_t *bio_split_pool __read_mostly; |
diff --git a/include/trace/block.h b/include/trace/block.h index 3cc2675ebf01..25c6a1fd5b77 100644 --- a/include/trace/block.h +++ b/include/trace/block.h | |||
@@ -4,57 +4,73 @@ | |||
4 | #include <linux/blkdev.h> | 4 | #include <linux/blkdev.h> |
5 | #include <linux/tracepoint.h> | 5 | #include <linux/tracepoint.h> |
6 | 6 | ||
7 | DEFINE_TRACE(block_rq_abort, | 7 | DECLARE_TRACE(block_rq_abort, |
8 | TPPROTO(struct request_queue *q, struct request *rq), | 8 | TPPROTO(struct request_queue *q, struct request *rq), |
9 | TPARGS(q, rq)); | 9 | TPARGS(q, rq)); |
10 | DEFINE_TRACE(block_rq_insert, | 10 | |
11 | DECLARE_TRACE(block_rq_insert, | ||
11 | TPPROTO(struct request_queue *q, struct request *rq), | 12 | TPPROTO(struct request_queue *q, struct request *rq), |
12 | TPARGS(q, rq)); | 13 | TPARGS(q, rq)); |
13 | DEFINE_TRACE(block_rq_issue, | 14 | |
15 | DECLARE_TRACE(block_rq_issue, | ||
14 | TPPROTO(struct request_queue *q, struct request *rq), | 16 | TPPROTO(struct request_queue *q, struct request *rq), |
15 | TPARGS(q, rq)); | 17 | TPARGS(q, rq)); |
16 | DEFINE_TRACE(block_rq_requeue, | 18 | |
19 | DECLARE_TRACE(block_rq_requeue, | ||
17 | TPPROTO(struct request_queue *q, struct request *rq), | 20 | TPPROTO(struct request_queue *q, struct request *rq), |
18 | TPARGS(q, rq)); | 21 | TPARGS(q, rq)); |
19 | DEFINE_TRACE(block_rq_complete, | 22 | |
23 | DECLARE_TRACE(block_rq_complete, | ||
20 | TPPROTO(struct request_queue *q, struct request *rq), | 24 | TPPROTO(struct request_queue *q, struct request *rq), |
21 | TPARGS(q, rq)); | 25 | TPARGS(q, rq)); |
22 | DEFINE_TRACE(block_bio_bounce, | 26 | |
27 | DECLARE_TRACE(block_bio_bounce, | ||
23 | TPPROTO(struct request_queue *q, struct bio *bio), | 28 | TPPROTO(struct request_queue *q, struct bio *bio), |
24 | TPARGS(q, bio)); | 29 | TPARGS(q, bio)); |
25 | DEFINE_TRACE(block_bio_complete, | 30 | |
31 | DECLARE_TRACE(block_bio_complete, | ||
26 | TPPROTO(struct request_queue *q, struct bio *bio), | 32 | TPPROTO(struct request_queue *q, struct bio *bio), |
27 | TPARGS(q, bio)); | 33 | TPARGS(q, bio)); |
28 | DEFINE_TRACE(block_bio_backmerge, | 34 | |
35 | DECLARE_TRACE(block_bio_backmerge, | ||
29 | TPPROTO(struct request_queue *q, struct bio *bio), | 36 | TPPROTO(struct request_queue *q, struct bio *bio), |
30 | TPARGS(q, bio)); | 37 | TPARGS(q, bio)); |
31 | DEFINE_TRACE(block_bio_frontmerge, | 38 | |
39 | DECLARE_TRACE(block_bio_frontmerge, | ||
32 | TPPROTO(struct request_queue *q, struct bio *bio), | 40 | TPPROTO(struct request_queue *q, struct bio *bio), |
33 | TPARGS(q, bio)); | 41 | TPARGS(q, bio)); |
34 | DEFINE_TRACE(block_bio_queue, | 42 | |
43 | DECLARE_TRACE(block_bio_queue, | ||
35 | TPPROTO(struct request_queue *q, struct bio *bio), | 44 | TPPROTO(struct request_queue *q, struct bio *bio), |
36 | TPARGS(q, bio)); | 45 | TPARGS(q, bio)); |
37 | DEFINE_TRACE(block_getrq, | 46 | |
47 | DECLARE_TRACE(block_getrq, | ||
38 | TPPROTO(struct request_queue *q, struct bio *bio, int rw), | 48 | TPPROTO(struct request_queue *q, struct bio *bio, int rw), |
39 | TPARGS(q, bio, rw)); | 49 | TPARGS(q, bio, rw)); |
40 | DEFINE_TRACE(block_sleeprq, | 50 | |
51 | DECLARE_TRACE(block_sleeprq, | ||
41 | TPPROTO(struct request_queue *q, struct bio *bio, int rw), | 52 | TPPROTO(struct request_queue *q, struct bio *bio, int rw), |
42 | TPARGS(q, bio, rw)); | 53 | TPARGS(q, bio, rw)); |
43 | DEFINE_TRACE(block_plug, | 54 | |
55 | DECLARE_TRACE(block_plug, | ||
44 | TPPROTO(struct request_queue *q), | 56 | TPPROTO(struct request_queue *q), |
45 | TPARGS(q)); | 57 | TPARGS(q)); |
46 | DEFINE_TRACE(block_unplug_timer, | 58 | |
59 | DECLARE_TRACE(block_unplug_timer, | ||
47 | TPPROTO(struct request_queue *q), | 60 | TPPROTO(struct request_queue *q), |
48 | TPARGS(q)); | 61 | TPARGS(q)); |
49 | DEFINE_TRACE(block_unplug_io, | 62 | |
63 | DECLARE_TRACE(block_unplug_io, | ||
50 | TPPROTO(struct request_queue *q), | 64 | TPPROTO(struct request_queue *q), |
51 | TPARGS(q)); | 65 | TPARGS(q)); |
52 | DEFINE_TRACE(block_split, | 66 | |
67 | DECLARE_TRACE(block_split, | ||
53 | TPPROTO(struct request_queue *q, struct bio *bio, unsigned int pdu), | 68 | TPPROTO(struct request_queue *q, struct bio *bio, unsigned int pdu), |
54 | TPARGS(q, bio, pdu)); | 69 | TPARGS(q, bio, pdu)); |
55 | DEFINE_TRACE(block_remap, | 70 | |
71 | DECLARE_TRACE(block_remap, | ||
56 | TPPROTO(struct request_queue *q, struct bio *bio, dev_t dev, | 72 | TPPROTO(struct request_queue *q, struct bio *bio, dev_t dev, |
57 | sector_t from, sector_t to), | 73 | sector_t from, sector_t to), |
58 | TPARGS(q, bio, dev, from, to)); | 74 | TPARGS(q, bio, dev, from, to)); |
59 | 75 | ||
60 | #endif | 76 | #endif |
diff --git a/mm/bounce.c b/mm/bounce.c index bd1caaa582b8..bf0cf7c8387b 100644 --- a/mm/bounce.c +++ b/mm/bounce.c | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | static mempool_t *page_pool, *isa_page_pool; | 23 | static mempool_t *page_pool, *isa_page_pool; |
24 | 24 | ||
25 | DEFINE_TRACE(block_bio_bounce); | ||
26 | |||
25 | #ifdef CONFIG_HIGHMEM | 27 | #ifdef CONFIG_HIGHMEM |
26 | static __init int init_emergency_pool(void) | 28 | static __init int init_emergency_pool(void) |
27 | { | 29 | { |