From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Aleksandar Markovic <amarkovic@wavecomp.com>,
qemu-block@nongnu.org, qemu-trivial@nongnu.org,
Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH v2 1/3] hw/block/pflash: Remove dynamic field width from trace events
Date: Mon, 18 Nov 2019 21:39:09 +0100 [thread overview]
Message-ID: <6923dbfc-7171-eaa6-e7f3-db560a8b1857@redhat.com> (raw)
In-Reply-To: <159b1679-72cf-bb0d-ca2f-0f626adebaf3@redhat.com>
On 11/18/19 8:21 PM, Eric Blake wrote:
> On 11/14/19 3:26 PM, Philippe Mathieu-Daudé wrote:
>
>>>> - trace_pflash_data_read(offset, width << 1, ret);
>>>> + trace_pflash_data_read(offset, width << 3, ret);
>>>
>>> Umm, why is width changing? That's not mentioned in the commit message.
>>
>> Previously it was used to set the format width: [1, 2, 4] -> [2, 4, 8].
>>
>> We usually log the width in byte (accessed at memory location) or bits
>> (used by the bus). When using this device I'm custom to think in bus
>> access width.
>>
>> Regardless whichever format we prefer, a change is needed.
>>
>
>>
>> Do you prefer using a "-bit" suffix? As
>>
>> "offset:0x%04"PRIx64" width:%d-bit value:0x%04x cmd:0x%02x wcycle:%u"
>>
>> I can also simply remove this information. Ideally I'd revert this
>> patch once the we get this format parsable by the SystemTap backend.
>
> Reporting either 'width:8-bit'/'width:16-bit' (explicit bits) or
> 'width:1'/'width:2' (implying byte) is fine by me. Showing a bus width
> in bytes adequately explains why you are using <<3 (aka converting bits
> to bytes), and how it compares to the previous <<1 (converting bits to
> number of hex characters). But whichever you pick (tracing bit width
> vs. byte width, and how it differs from previous usage of width as
> output-character count), documenting it in the commit message will make
> life easier to understand the change.
Yes you are right, I should have documented to avoid wasting review time
clearing the confusion.
next prev parent reply other threads:[~2019-11-18 20:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 14:40 [PATCH v2 0/3] hw: Remove dynamic field width from trace events Philippe Mathieu-Daudé
2019-11-08 14:40 ` [PATCH v2 1/3] hw/block/pflash: " Philippe Mathieu-Daudé
2019-11-08 15:56 ` Eric Blake
2019-11-14 21:26 ` Philippe Mathieu-Daudé
2019-11-18 19:21 ` Eric Blake
2019-11-18 20:39 ` Philippe Mathieu-Daudé [this message]
2019-11-08 14:40 ` [PATCH v2 2/3] hw/mips/gt64xxx: " Philippe Mathieu-Daudé
2019-11-08 15:58 ` Eric Blake
2019-11-14 21:24 ` Philippe Mathieu-Daudé
2019-11-18 19:10 ` Philippe Mathieu-Daudé
2019-11-18 19:15 ` Eric Blake
2019-11-08 14:40 ` [PATCH v2 3/3] trace: Forbid dynamic field width in event format Philippe Mathieu-Daudé
2019-11-08 16:07 ` Eric Blake
2019-11-18 18:42 ` Eric Blake
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=6923dbfc-7171-eaa6-e7f3-db560a8b1857@redhat.com \
--to=philmd@redhat.com \
--cc=aleksandar.rikalo@rt-rk.com \
--cc=amarkovic@wavecomp.com \
--cc=aurelien@aurel32.net \
--cc=eblake@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).