lkml.org 
[lkml]   [2015]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 00/11] mm: debug: formatting memory management structs
On 04/15/2015 04:45 AM, Kirill A. Shutemov wrote:
> On Tue, Apr 14, 2015 at 04:56:22PM -0400, Sasha Levin wrote:
>> > This patch series adds knowledge about various memory management structures
>> > to the standard print functions.
>> >
>> > In essence, it allows us to easily print those structures:
>> >
>> > printk("%pZp %pZm %pZv", page, mm, vma);
> Notably, you don't have \n in your format line. And it brings question how
> well dump_page() and friends fit printk-like interface. dump_page()
> produces multi-line print out.
> Is it something printk() users would expect?

Since were printing large amount of data out of multiple fields (rather than just
one potentially long field like "path"), the way I see it we could print it in one
line, and let it wrap.

While this is what printk users would most likely expect in theory, in practice it
might scroll off the screen, making us miss important output, it would also be awkward
making that long line part of anything else; what else would you add there?

While if we break it up into multiple lines, we keep it working the same way it worked
so far. Also, using any of those new printk format specifiers wouldn't be too common, so
we can hope that whoever uses them knows what he's doing and how the output will look
like.

Is there a usecase where we'd want to keep it as a single line?


Thanks,
Sasha


\
 
 \ /
  Last update: 2015-04-15 15:21    [W:0.142 / U:4.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site