Hi,
I have some single-threaded code that uses sockets, timer FDs and usbdevfs, and I'm using epoll for event notification. I even have epolls watching other epolls.
Is there anything better than reading strace logs manually (see extract below) and keeping track of FDs and flags using pen and paper to see what's going on?
1862 write(2, "[2022-08-07T16:11:09.386Z DEBUG xxx::pax] Number of interfaces: 1\n", 77) = 77
1862 write(2, "[2022-08-07T16:11:09.386Z DEBUG xxx::pax] Bulk endpoint addresses: input 0x81, output 0x01\n", 102) = 102
1862 epoll_create1(0) = 9
1862 fcntl(8, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
1862 epoll_ctl(9, EPOLL_CTL_ADD, 8, {EPOLLERR, {u32=8, u64=8}}) = 0
1862 timerfd_create(CLOCK_MONOTONIC, 0) = 10
1862 epoll_ctl(9, EPOLL_CTL_ADD, 10, {EPOLLIN, {u32=10, u64=10}}) = 0
1862 write(2, "[2022-08-07T16:11:09.386Z DEBUG xxx::rate_controller] New interval: 0.0001 s\n", 88) = 88
1862 timerfd_settime(10, 0, {it_interval={tv_sec=0, tv_nsec=100000}, it_value={tv_sec=0, tv_nsec=100000}}, NULL) = 0
1862 munmap(0x7fc76ce63000, 4096) = 0
1862 munmap(0x7fc76ce50000, 4096) = 0
1862 munmap(0x7fc76ce16000, 4096) = 0
1862 munmap(0x7fc76cdbd000, 4096) = 0
1862 munmap(0x7fc76cda9000, 4096) = 0
1862 munmap(0x7fc76cd95000, 8192) = 0
1862 epoll_ctl(6, EPOLL_CTL_ADD, 9, {EPOLLIN, {u32=9, u64=9}}) = 0
1862 epoll_pwait(7, [{EPOLLIN, {u32=3, u64=3}}], 32, 1000, NULL, 8) = 1
1862 write(2, "[2022-08-07T16:11:09.963Z TRACE xxx::event_loop] Events: [EpollEvent { event: epoll_event { events: 1, u64: 3 }
}]\n", 126) = 126
1862 write(2, "[2022-08-07T16:11:09.963Z TRACE xxx::event_loop] Event status: EventStatus { server_epoll: true, pax_epoll: fal
se }\n", 127) = 127
1862 epoll_pwait(3, [{EPOLLIN, {u32=5, u64=5}}], 32, 0, NULL, 8) = 1
1862 write(2, "[2022-08-07T16:11:09.963Z TRACE xxx::server] Server events: [EpollEvent { event: epoll_event { events: 1, u64:
5 } }], connections: 0\n", 145) = 145