how to distinguish entry/exit of a syscall when using ptrace?

Hi all,
I am using ptrace to keep track of clone syscalls in a program. However, I found that the traced syscall cant be paired. for example, there are some syscalls that have entry, but without exit showing up in the traced sequences. So, is there anyway to distinguish the entry and exit of a system call, when using ptrace? Any idea is appreciated, thanks

Tang