On Fri, Aug 07, 2020 at 02:29:12PM -0700, Jonathan Adams wrote:
Count kernel warnings by function name of the caller.
Each time WARN() is called, which includes WARN_ON(), increment a counter
in a 256-entry hash table. The table key is the entry point of the calling
function, which is found using kallsyms.
Why is this needed?
As systems seem to like to reboot when WARN() is called, will this only
ever show 1? :)
We store the name of the function in the table (because it may be a
module address); reporting the metric just walks the table and prints
the values.
The "warnings" metric is cumulative.
If you are creating specific files in a specific location that people
can rely on, shouldn't they show up in Documentation/ABI/ as well?
But again, is this feature something that anyone really needs/wants?
What can the number of warnings show you?
thanks,
greg k-h