Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1576164
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] stacktrace: fix spaces and annoying extra newlines |
| Date | 2017-02-08 00:30 +0100 |
| Message-ID | <t8nmW-ST-11@gated-at.bofh.it> (permalink) |
| References | <t8mKe-q3-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hmm.
Looks ok, except I think we migth want to go even further:
On Tue, Feb 7, 2017 at 2:44 PM, Omar Sandoval <osandov@osandov.com> wrote:
>
> Since KERN_CONT became meaningful again, lockdep stack traces have
> looked like this:
[ removed really ugly trace ]
> This is what it should look like:
>
> [ 6.650322] -> #1 (B){+.+...}:
> [ 6.651053] [<ffffffff810d8873>] lock_acquire+0xc3/0x210
> [ 6.652000] [<ffffffff816f6414>] mutex_lock_nested+0x74/0x6d0
> [ 6.652664] [<ffffffffa01b43c3>] init_btrfs_fs+0x21/0x196 [btrfs]
> [ 6.653288] [<ffffffff81000472>] do_one_initcall+0x52/0x1b0
> [ 6.653858] [<ffffffff811a3ae6>] do_init_module+0x5f/0x209
> [ 6.654426] [<ffffffff81122f3d>] load_module+0x218d/0x2b80
> [ 6.654992] [<ffffffff81123bdb>] SyS_finit_module+0xeb/0x120
> [ 6.655591] [<ffffffff816fd241>] entry_SYSCALL_64_fastpath+0x1f/0xc2
That's still pretty ugly.
Actually, let's just remove those hex numbers too, which buy you nothing at all.
> - printk("%*c", 1 + spaces, ' ');
> - print_ip_sym(trace->entries[i]);
> + ip = (void *)trace->entries[i];
> + printk("%*c[<%p>] %pS\n", 1 + spaces, ' ', ip, ip);
So how does it look if we make that just be
printk("%*c%pS\n", 1 + spaces, ' ', (void *)trace->entries[i]);
which also avoids the extra variable because the thing is only used
once anyway. We've removed the hex numbers from other printouts, and
they really are completely useless with modules and kernel randomized
addresses.
Would you mind testing such a thing and re-submitting?
Linus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] stacktrace: fix spaces and annoying extra newlines Omar Sandoval <osandov@osandov.com> - 2017-02-07 23:50 +0100
Re: [PATCH] stacktrace: fix spaces and annoying extra newlines Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-08 00:30 +0100
[PATCH v2] stacktrace: fix address, newline ugliness Omar Sandoval <osandov@osandov.com> - 2017-02-08 00:50 +0100
[tip:locking/urgent] stacktrace, lockdep: Fix address, newline ugliness tip-bot for Omar Sandoval <tipbot@zytor.com> - 2017-02-08 08:30 +0100
csiph-web