scsi: fix tracing of scsi requests with simple backend
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 3 Jun 2011 12:57:06 +0000 (14:57 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 5 Jun 2011 15:05:35 +0000 (15:05 +0000)
The simple backend only supports a maximum of 6 arguments.  Split the
scsi_req_parsed event in two parts to cope with the limit.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/scsi-bus.c
trace-events

index 837f24e212275b2169673705069d7377e4e90d37..ad6a730be0fce732b94b16a931a0b677c3b28a6f 100644 (file)
@@ -413,7 +413,11 @@ int scsi_req_parse(SCSIRequest *req, uint8_t *buf)
     scsi_req_xfer_mode(req);
     req->cmd.lba = scsi_req_lba(req);
     trace_scsi_req_parsed(req->dev->id, req->lun, req->tag, buf[0],
-                          req->cmd.mode, req->cmd.xfer, req->cmd.lba);
+                          req->cmd.mode, req->cmd.xfer);
+    if (req->cmd.lba != -1) {
+        trace_scsi_req_parsed_lba(req->dev->id, req->lun, req->tag, buf[0],
+                              req->cmd.lba);
+    }
     return 0;
 }
 
index 3137a1518fb6a2c7128cf6f0dbc2bd02bf27e000..e0e9574d21fc3d614d2b7c4e7348f59fd5d09135 100644 (file)
@@ -210,7 +210,8 @@ disable scsi_req_alloc(int target, int lun, int tag) "target %d lun %d tag %d"
 disable scsi_req_data(int target, int lun, int tag, int len) "target %d lun %d tag %d len %d"
 disable scsi_req_dequeue(int target, int lun, int tag) "target %d lun %d tag %d"
 disable scsi_req_continue(int target, int lun, int tag) "target %d lun %d tag %d"
-disable scsi_req_parsed(int target, int lun, int tag, int cmd, int mode, int xfer, uint64_t lba) "target %d lun %d tag %d command %d dir %d length %d lba %"PRIu64""
+disable scsi_req_parsed(int target, int lun, int tag, int cmd, int mode, int xfer) "target %d lun %d tag %d command %d dir %d length %d"
+disable scsi_req_parsed_lba(int target, int lun, int tag, int cmd, uint64_t lba) "target %d lun %d tag %d command %d lba %"PRIu64""
 disable scsi_req_parse_bad(int target, int lun, int tag, int cmd) "target %d lun %d tag %d command %d"
 
 # vl.c