Hello, There is something that I am puzzling over. I am measuring the time from when a signal arrives until it gets delivered to the handler function using ltrace.
1612897982.841251 --- SIGUSR2 (User defined signal 2) --- 1612897982.841384 __errno_location() = 0x7fdd1c4be808 1612897982.842219 write(11, "\001", 8) = 8 1612897982.843213 <... epoll_wait resumed> ) = 0xffffffff 1612897982.843330 __errno_location() = 0x7fdd1c4be808 1612897982.844055 clock_gettime(1, 0x7ffe4d6fb370, 0, 0x7fdd1c9f3e9e) = 0 1612897982.844738 gettimeofday(0x7ffe4d6fb370, nil) = 0 1612897982.845328 clock_gettime(1, 0x7ffe4d6fb370, 0, 0) = 0 1612897982.845954 epoll_wait(6, 0x5577def2a7c0, 64, 0xe95f) = 1 1612897982.846651 clock_gettime(1, 0x7ffe4d6fb370, 0xffffffff, 16) = 0 1612897982.846991 __errno_location() = 0x7fdd1c4be808 1612897982.847174 read(11, "\001", 8) = 8 1612897982.847397 audit_request_signal_info(3, 0x7ffe4d6fb250, 1024, 0x7ffe4d6fb250) = 5 If my math is correct, this is taking about 6.1 milliseconds to deliver. What I'm puzzling over is why there are so many calls to gettimeofday & clock_gettime? I do not use any timeouts or periodic timers. So, I'm wondering why a program that has no cares about what time it is winds up making so many calls about the current time? It would appear that around 2 milliseconds of the time is spent in those syscalls. (This is libev 4.31.) Also, is there a faster way to get signal delivery? I'm using the ev_default_loop and only passing EVFLAG_NOENV. Any advice/insights would be greatly appreciated. Best Regards, -Steve _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/mailman/listinfo/libev
