HomeFreeBSD

Add support for displaying thread IDs to truss(1).

Description

Add support for displaying thread IDs to truss(1).

  • Consolidate duplicate code for printing the metadata at the start of each line into a shared function.
  • Add an -H option which will log the thread ID of the relevant thread for each event.

While here, remove some extraneous calls to clock_gettime() in
print_syscall() and print_syscall_ret(). The caller of print_syscall_ret()
always updates the current thread's "after" time before it is called.

Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D5363

Details

Provenance
jhbAuthored on
Reviewer
kib
Differential Revision
D5363: Add support for displaying thread IDs to truss(1).
Parents
rS295929: Don't leak an address in an error path.
Branches
Unknown
Tags
Unknown