lkml.org 
[lkml]   [2017]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] bug: Add _ONCE logic to report_bug()

* Peter Zijlstra <peterz@infradead.org> wrote:

>
> Josh suggested moving the _ONCE logic inside the trap handler, using a
> bit in the bug_entry::flags field, avoiding the need for the extra
> variable.

This looks interesting, as the _ONCE() methods of warning are far more
user-friendly than WARN() spam.

> Sadly this only works for WARN_ON_ONCE(), since the others have
> printk() statements prior to triggering the trap.

Which one is problematic to convert, WARN_ONCE()?

> Still, this saves some text and data:
>
> text data bss dec hex filename
> 10469505 4443448 843776 15756729 f06db9 defconfig-build/vmlinux-ud0
> 10452803 4442616 843776 15739195 f0293b defconfig-build/vmlinux-ud0-once
>
> (Only compile tested on x86_64 so far.)

That looks pretty sweet, as various almost never triggered _ONCE() checks tend to
disturb the generated machine code quite a bit ...

Thanks,

Ingo

\
 
 \ /
  Last update: 2017-02-25 10:20    [W:0.071 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site