All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: John Snow <jsnow@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	"open list:Floppy" <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 10/11] hw/block/fdc: Convert from FLOPPY_DPRINTF() macro to trace events
Date: Thu, 21 Jun 2018 15:07:47 -0300	[thread overview]
Message-ID: <ee2ec992-6a76-5685-06f5-0e1373909e3e@amsat.org> (raw)
In-Reply-To: <4aa9b48d-1934-bf06-0bae-9d8d2721f199@redhat.com>

On 06/21/2018 02:41 PM, John Snow wrote:
> 
> 
> On 06/21/2018 01:12 PM, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>  hw/block/fdc.c        | 6 +++---
>>  hw/block/trace-events | 4 ++++
>>  2 files changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
>> index cd29e27d8f..c7b4fe9b3e 100644
>> --- a/hw/block/fdc.c
>> +++ b/hw/block/fdc.c
>> @@ -40,6 +40,7 @@
>>  #include "sysemu/blockdev.h"
>>  #include "sysemu/sysemu.h"
>>  #include "qemu/log.h"
>> +#include "trace.h"
>>  
>>  /********************************************************/
>>  /* debug Floppy devices */
>> @@ -934,7 +935,7 @@ static uint32_t fdctrl_read (void *opaque, uint32_t reg)
>>          retval = (uint32_t)(-1);
>>          break;
>>      }
>> -    FLOPPY_DPRINTF("read reg%d: 0x%02x\n", reg & 7, retval);
>> +    trace_fdc_ioport_read(reg, retval);
> 
> Earlier in this function we've already masked the register number, which
> is not clear from context.

Sorry this is an old patch, I then learned to fill commit messages as if
you are going to send upstream, even if it will be in months...

> Reviewed-by: John Snow <jsnow@redhat.com>

Thanks.

> 
> (and ACK, to whomever stages this outside of my branch. --js)
> 
>>  
>>      return retval;
>>  }
>> @@ -943,9 +944,8 @@ static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value)
>>  {
>>      FDCtrl *fdctrl = opaque;
>>  
>> -    FLOPPY_DPRINTF("write reg%d: 0x%02x\n", reg & 7, value);
>> -
>>      reg &= 7;
>> +    trace_fdc_ioport_write(reg, value);
>>      switch (reg) {
>>      case FD_REG_DOR:
>>          fdctrl_write_dor(fdctrl, value);
>> diff --git a/hw/block/trace-events b/hw/block/trace-events
>> index 6b9e733412..d842c45409 100644
>> --- a/hw/block/trace-events
>> +++ b/hw/block/trace-events
>> @@ -1,5 +1,9 @@
>>  # See docs/devel/tracing.txt for syntax documentation.
>>  
>> +# hw/block/fdc.c
>> +fdc_ioport_read(uint8_t reg, uint8_t value) "read reg 0x%02x val 0x%02x"
>> +fdc_ioport_write(uint8_t reg, uint8_t value) "write reg 0x%02x val 0x%02x"
>> +
>>  # hw/block/virtio-blk.c
>>  virtio_blk_req_complete(void *vdev, void *req, int status) "vdev %p req %p status %d"
>>  virtio_blk_rw_complete(void *vdev, void *req, int ret) "vdev %p req %p ret %d"
>>

  reply	other threads:[~2018-06-21 18:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 17:12 [Qemu-devel] [PATCH 00/11] hw: various conversions to trace-events Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 01/11] trace: Fix format string for the struct timeval members casted to size_t Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 02/11] sdcard: Reduce sdcard_set_blocklen() trace digits Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 03/11] hw/char/serial: Convert from DPRINTF macro to trace events Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 04/11] hw/char/parallel: Convert from pdebug() " Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 06/11] hw/input/tsc2005: Convert a fprintf() call " Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 07/11] hw/net/ne2000: Add " Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 08/11] hw/net/ne2000: Convert printf() calls to " Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 09/11] hw/net/etraxfs_eth: " Philippe Mathieu-Daudé
2018-06-21 17:12 ` [Qemu-devel] [PATCH 10/11] hw/block/fdc: Convert from FLOPPY_DPRINTF() macro " Philippe Mathieu-Daudé
2018-06-21 17:41   ` John Snow
2018-06-21 18:07     ` Philippe Mathieu-Daudé [this message]
2018-06-21 17:12 ` [Qemu-devel] [PATCH 11/11] hw/block/pflash_cfi: Convert from DPRINTF() " Philippe Mathieu-Daudé
2018-06-24 16:43   ` Philippe Mathieu-Daudé
     [not found] ` <20180621171257.14897-6-f4bug@amsat.org>
2018-06-22  6:22   ` [Qemu-devel] [PATCH 05/11] hw/display/cirrus: Convert printf() calls " Gerd Hoffmann
2018-06-22 12:07     ` Philippe Mathieu-Daudé
2018-06-22 12:31       ` Gerd Hoffmann
2018-06-30 16:57         ` Philippe Mathieu-Daudé
2018-06-28 12:50 ` [Qemu-devel] [PATCH 00/11] hw: various conversions to trace-events Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee2ec992-6a76-5685-06f5-0e1373909e3e@amsat.org \
    --to=f4bug@amsat.org \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.