Simplify syscall recording logic.