Re: [PATCH v5] printk: Userspace format enumeration support
From: Chris Down
Date: Thu Apr 22 2021 - 10:59:38 EST
Joe Perches writes:
You really should evaluate the utility of log level monitoring and
reconsider adding some compiler extension use of __printf to generate
this format tracking ability.
Asking again, because you're repeating what you said last time without any
further clarification: how is __printf tracking supposed to be sufficient? That
tells one which arguments will have printf semantics, so sure, one can get the
format, but (for example) you don't have any access to information about the
log level, which is essential since otherwise it's not known whether the printk
is capable of being emitted or not. Without that, you're suggesting replacing a
functioning implementation with a "solution" which is not fit for the intended
purpose.
For the use case described in the changelog, more or less all of the essential
printks that must be monitored use printk() infrastructure directly. We're not
trying to monitor the world here when we have plenty of better metrics. I'm
sure there will be others which come up with time, but this doesn't have to
cover every single possible subsystem's fancy printk-like out of the gate.