setting attribute hot intelligently gives 0.5% speed

This commit is contained in:
van Hauser
2020-08-12 14:14:44 +02:00
parent c25479264d
commit b38837f4ff
4 changed files with 10 additions and 10 deletions

View File

@ -122,7 +122,7 @@ void afl_fsrv_init_dup(afl_forkserver_t *fsrv_to, afl_forkserver_t *from) {
Returns the time passed to read.
If the wait times out, returns timeout_ms + 1;
Returns 0 if an error occurred (fd closed, signal, ...); */
static u32 read_s32_timed(s32 fd, s32 *buf, u32 timeout_ms,
static u32 __attribute__ ((hot)) read_s32_timed(s32 fd, s32 *buf, u32 timeout_ms,
volatile u8 *stop_soon_p) {
fd_set readfds;
@ -322,7 +322,7 @@ static void report_error_and_exit(int error) {
cloning a stopped child. So, we just execute once, and then send commands
through a pipe. The other part of this logic is in afl-as.h / llvm_mode */
void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
void __attribute__ ((hot)) afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
volatile u8 *stop_soon_p, u8 debug_child_output) {
int st_pipe[2], ctl_pipe[2];