2005-03-10 20:22:12

by [email protected]

[permalink] [raw]
Subject: [RFC][SPARC64][kernel 2.4] __show_regs() calls to printk()


Hello,

in the file arch/sparc64/kernel/process.c, the function __show_regs()
prints the content of the registers four by four, but every register's
content needs 16 caracters to be printed; the name of the register needs 4
caracters; and one caracter is needed to separate this value from the next
register's name.

Therefore, it uses 84 caracters per line, but the VT100 has only 80, so we
are using two lines instead of only one, shortening the content of the
(eventual) Oops one could sent.

I think we could perform better, by suppressing the space between the name
of the register and it's value. By this way, instead of writing :

g4: fffff80000000000 g5: 0000000000000004 g6: fffff80001348000 g7: 000000000000
0000

we would have :

g4:fffff80000000000 g5:0000000000000004 g6:fffff80001348000 g7:0000000000000000

It remains fully understandable, I think. Alternately, we could print only
3 registers per line, but since the registers are grouped 8 by 8,
it would be less logical.

This would also have a sense for Sparc32 computers, and, in the same file,
for the functions show_stackframe and show_regwindow.

Any comments? Should I make a patch?


--
Emmanuel Colbus
Club GNU/Linux
ENSIMAG - Departement Telecoms




2005-03-10 20:50:00

by David Miller

[permalink] [raw]
Subject: Re: [RFC][SPARC64][kernel 2.4] __show_regs() calls to printk()

On Thu, 10 Mar 2005 21:19:24 +0100 (MET)
"[email protected]" <[email protected]> wrote:

> Therefore, it uses 84 caracters per line, but the VT100 has only 80, so we
> are using two lines instead of only one, shortening the content of the
> (eventual) Oops one could sent.

Nobody really cares, and changing the output format is not a good
idea since automated tools parse this output.