History

vsnprintf: inline skip_atoi() again

At some point skip_atoi() had been marked 'noinline_for_stack', but it turns out that this is now a pessimization, and not inlining it actually results in a stack frame in format decoding due to the call and thus hurts stack usage rather than helping. With the simplistic atoi function inlined, the format decoding now needs no frame at all.

Linus Torvalds committed 1 year ago

Commit f372b221 parent 614d1341 file · +1 −2Browse files

Showing the changes to lib/vsprintf.c (1 of 1 file). Show all

Unified · Split

lib/vsprintf.c+1−2
@@ -160,8 +160,7 @@ long long simple_strtoll(const char *cp, char **endp, unsigned int base) · 159 unmodified lines
160}160}
161EXPORT_SYMBOL(simple_strtoll);161EXPORT_SYMBOL(simple_strtoll);
162 162
163static noinline_for_stack163static inline int skip_atoi(const char **s)
164int skip_atoi(const char **s)
165{164{
166 int i = 0;165 int i = 0;
167 166

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t