diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-10-30 03:34:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-26 06:13:34 -0500 |
commit | 5f3ea37c7716db4e894a480e0c18b24399595b6b (patch) | |
tree | db6784635d024894f641b340dcd7c5060c446077 /block/elevator.c | |
parent | 509dceef6470442d8c7b8a43ec34125205840b3c (diff) |
blktrace: port to tracepoints
This was a forward port of work done by Mathieu Desnoyers, I changed it to
encode the 'what' parameter on the tracepoint name, so that one can register
interest in specific events and not on classes of events to then check the
'what' parameter.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/block/elevator.c b/block/elevator.c index 9ac82dde99dd..530fcfe2ef07 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/compiler.h> | 33 | #include <linux/compiler.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/blktrace_api.h> | 35 | #include <linux/blktrace_api.h> |
36 | #include <trace/block.h> | ||
36 | #include <linux/hash.h> | 37 | #include <linux/hash.h> |
37 | #include <linux/uaccess.h> | 38 | #include <linux/uaccess.h> |
38 | 39 | ||
@@ -586,7 +587,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where) | |||
586 | unsigned ordseq; | 587 | unsigned ordseq; |
587 | int unplug_it = 1; | 588 | int unplug_it = 1; |
588 | 589 | ||
589 | blk_add_trace_rq(q, rq, BLK_TA_INSERT); | 590 | trace_block_rq_insert(q, rq); |
590 | 591 | ||
591 | rq->q = q; | 592 | rq->q = q; |
592 | 593 | ||
@@ -772,7 +773,7 @@ struct request *elv_next_request(struct request_queue *q) | |||
772 | * not be passed by new incoming requests | 773 | * not be passed by new incoming requests |
773 | */ | 774 | */ |
774 | rq->cmd_flags |= REQ_STARTED; | 775 | rq->cmd_flags |= REQ_STARTED; |
775 | blk_add_trace_rq(q, rq, BLK_TA_ISSUE); | 776 | trace_block_rq_issue(q, rq); |
776 | } | 777 | } |
777 | 778 | ||
778 | if (!q->boundary_rq || q->boundary_rq == rq) { | 779 | if (!q->boundary_rq || q->boundary_rq == rq) { |
@@ -921,7 +922,7 @@ void elv_abort_queue(struct request_queue *q) | |||
921 | while (!list_empty(&q->queue_head)) { | 922 | while (!list_empty(&q->queue_head)) { |
922 | rq = list_entry_rq(q->queue_head.next); | 923 | rq = list_entry_rq(q->queue_head.next); |
923 | rq->cmd_flags |= REQ_QUIET; | 924 | rq->cmd_flags |= REQ_QUIET; |
924 | blk_add_trace_rq(q, rq, BLK_TA_ABORT); | 925 | trace_block_rq_abort(q, rq); |
925 | __blk_end_request(rq, -EIO, blk_rq_bytes(rq)); | 926 | __blk_end_request(rq, -EIO, blk_rq_bytes(rq)); |
926 | } | 927 | } |
927 | } | 928 | } |