From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSTwJ-0007fz-2W for qemu-devel@nongnu.org; Fri, 03 Jun 2011 08:57:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSTwG-00079v-NZ for qemu-devel@nongnu.org; Fri, 03 Jun 2011 08:57:22 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:42456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSTwG-00079Y-2g for qemu-devel@nongnu.org; Fri, 03 Jun 2011 08:57:20 -0400 Received: by pwi6 with SMTP id 6so1055271pwi.4 for ; Fri, 03 Jun 2011 05:57:18 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 3 Jun 2011 14:57:06 +0200 Message-Id: <1307105826-21517-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] scsi: fix tracing of scsi requests with simple backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- hw/scsi-bus.c | 6 +++++- trace-events | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 837f24e..ad6a730 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -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; } diff --git a/trace-events b/trace-events index 3137a15..e0e9574 100644 --- a/trace-events +++ b/trace-events @@ -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 -- 1.7.4.4