From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Petr Mladek <pmladek@suse.com>,
David Laight <david.laight.linux@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Jonathan Corbet <corbet@lwn.net>,
John Ogness <john.ogness@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] hexdump: Print the prefix after the last line to show the dump is over
Date: Wed, 19 Mar 2025 18:44:04 +0200 [thread overview]
Message-ID: <Z9r0VK0UWF1-mco9@smile.fi.intel.com> (raw)
In-Reply-To: <20250319-perso-hexdump-v3-3-a6ba3a9f3742@bootlin.com>
On Wed, Mar 19, 2025 at 05:08:12PM +0100, Miquel Raynal wrote:
> When skipping duplicated lines, the end of the log can just be a
> star ("*") which may be confusing (?), so in order to clarify the end of
> the log, tell the user how many lines where skipped and mimic the
> userspace hexdump output, let's add in this case a new line with the
> next offset.
>
> With the following data:
>
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
>
> When skipping identical lines we were seeing:
>
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> *
>
> And now we will have:
>
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> *
> 00000080
>
> However if the output was (first bit of first byte on last line changed):
>
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> 00000070: fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> ^
>
> When skipping identical lines we would see:
>
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
> *
> 00000070: fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
>
> And in this case the output would not change with this patch.
Thanks!
LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
...
> This change is not related to the two first patches and is just an
> addition that was requested by Andy who felt like it was not clear where
> the dump was ending with the 'SKIP_DUPLICATE' flag when the last line
> was skipped. Honestly this never bothered me, so depending on the
> maintainers wishes, this can either be applied or skipped.
I was also referring to userpsace `hexdump` behaviour. And I find it logical.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-03-19 16:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 16:08 [PATCH v3 0/3] hexdump: Allow skipping identical lines Miquel Raynal
2025-03-19 16:08 ` [PATCH v3 1/3] hexdump: Simplify print_hex_dump() Miquel Raynal
2025-03-19 16:37 ` Andy Shevchenko
2025-03-19 17:53 ` Miquel Raynal
2025-03-19 16:08 ` [PATCH v3 2/3] hexdump: Allow skipping identical lines Miquel Raynal
2025-03-19 16:41 ` Andy Shevchenko
2025-03-19 18:08 ` Miquel Raynal
2025-03-19 16:08 ` [PATCH v3 3/3] hexdump: Print the prefix after the last line to show the dump is over Miquel Raynal
2025-03-19 16:44 ` Andy Shevchenko [this message]
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=Z9r0VK0UWF1-mco9@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=david.laight.linux@gmail.com \
--cc=john.ogness@linutronix.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=miquel.raynal@bootlin.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=thomas.petazzoni@bootlin.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
all inboxes | Powered by JetHome®