]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use ptrace(2) LWP events to track threads reliably in truss.
authorjhb <jhb@FreeBSD.org>
Wed, 9 Mar 2016 18:45:41 +0000 (18:45 +0000)
committerjhb <jhb@FreeBSD.org>
Wed, 9 Mar 2016 18:45:41 +0000 (18:45 +0000)
commit5ca736c47710a4c3171b092f9de92ea17a9e68a9
tree84ed08ba40c0cafe374e42abb001e22bae7c8c5a
parente641458f7012aa8c7ad2bc4f3ea9cf9ee880e17e
Use ptrace(2) LWP events to track threads reliably in truss.

- truss can now log the system call invoked by a thread during a
  voluntary process exit.  No return value is logged, but the value passed
  to exit() is included in the trace output.  Arguments passed to thread
  exit system calls such as thr_exit() are not logged as voluntary thread
  exits cannot be distinguished from involuntary thread exits during a
  system call.
- New events are now reported for thread births and exits similar to the
  recently added events for new child processes when following forks.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D5561
usr.bin/truss/setup.c
usr.bin/truss/syscalls.c
usr.bin/truss/truss.h