mirror of
https://github.com/FAUSheppy/colorredstderr-mirror
synced 2025-12-09 16:38:32 +01:00
Prevent inlining for more functions.
Clang is inlining quite aggressively.
This commit is contained in:
@@ -30,6 +30,12 @@
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
|
||||
static void *dlsym_function(char const *name)
|
||||
#ifdef HAVE___ATTRIBUTE__
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Load the function name using dlsym() and return it. Terminate program on
|
||||
* failure. Split in function and macro to reduce code inserted into the
|
||||
* function using the macro. */
|
||||
|
||||
@@ -300,7 +300,7 @@ static int tracked_fds_remove(int fd) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tracked_fds_find_slow(int fd);
|
||||
static int tracked_fds_find_slow(int fd) __noinline;
|
||||
/*
|
||||
* tracked_fds_find() is called for each hook call and should be as fast as
|
||||
* possible. As most file descriptors are < TRACKFDS_STATIC_COUNT, force the
|
||||
|
||||
Reference in New Issue
Block a user