diff options
| author | David Laight <david.laight.linux@gmail.com> | 2026-03-08 11:37:31 +0000 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2026-03-20 17:46:10 +0100 |
| commit | b3d30efd052360c11abe1259a15dfcf2448b37be (patch) | |
| tree | 8a35c58a65082654cbbaad40dcfd19e8c3c3618c /tools/perf/scripts/python | |
| parent | a2fa5a752ce67c11a9d6d6535165195073ce0c46 (diff) | |
tools/nolibc/printf: Simplify __nolibc_printf()
Move the check for the length modifiers into the format processing
between the field width and conversion specifier.
This lets the loop be simplified and a 'fast scan' for a format start
used.
If an error is detected (eg an invalid conversion specifier) then
copy the invalid format to the output buffer.
Reduces code size by about 10% on x86-64.
Some versions of gcc bloat this version by generating a jump table.
All goes away in the later patches.
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260308113742.12649-7-david.laight.linux@gmail.com
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
