printk_index: Fix false positives
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | printk: Let no_printk() use _printk()include/ | +1 | 0 replies | |
| 2/4 | dev_printk: Add and use dev_no_printk()include/ | +13 | 3 replies | |
| 3/4 | dyndbg: Use *no_printk() helpersinclude/ | +2 | 0 replies | |
| 4/4 | ceph: Use no_printk() helperinclude/ | +7 | 0 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Andy Shevchenko | Xiubo Li | Chris Down | Petr Mladek |
|---|---|---|---|---|
| Series | R-b | R-b | R-b | R-b |
| 1/4 | ||||
| 2/4 | ||||
| 3/4 | ||||
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/4] printk_index: Fix false positives
Hi all,
When printk-indexing is enabled, each printk() invocation emits a pi_entry structure, containing the format string and other information related to its location in the kernel sources. This is even true when the printk() is protected by an always-false check, as is typically the case for debug messages: while the actual code to print the message is optimized out by the compiler, the pi_entry structure is still emitted. Hence when debugging is disabled, this leads to the inclusion in the index of lots of printk formats that cannot be emitted by the current kernel.
This series fixes that for the common debug helpers under include/. It reduces the size of an arm64 defconfig kernel with CONFIG_PRINTK_INDEX=y by ca. 1.5 MiB, or 28% of the overhead of enabling CONFIG_PRINTK_INDEX=y.
Notes:
- netdev_(v)dbg() and netif_(v)dbg() are not affected, as net{dev,if}_printk() do not implement printk-indexing, except for the single global internal instance of __netdev_printk().
- This series fixes only debug code in global header files under include/. There are more cases to fix in subsystem-specific header files and in sources files.
Thanks for your comments!
Geert Uytterhoeven (4):
printk: Let no_printk() use _printk()
dev_printk: Add and use dev_no_printk()
dyndbg: Use *no_printk() helpers
ceph: Use no_printk() helper
include/linux/ceph/ceph_debug.h | 18 +++++++----------- include/linux/dev_printk.h | 25 +++++++++++++------------ include/linux/dynamic_debug.h | 4 ++-- include/linux/printk.h | 2 +- 4 files changed, 23 insertions(+), 26 deletions(-)
Signature · 12 lines
2.34.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds