]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for displaying thread IDs to truss(1).
authorjhb <jhb@FreeBSD.org>
Tue, 23 Feb 2016 19:56:29 +0000 (19:56 +0000)
committerjhb <jhb@FreeBSD.org>
Tue, 23 Feb 2016 19:56:29 +0000 (19:56 +0000)
commitdbabd325530e7767fe427e64ff9bdec867e18af9
tree49834446e23d2ff28b0b80a241668fc54ebb1bdc
parent63d9199ac684a4ec295d9512910bac7287ba2b1a
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
usr.bin/truss/extern.h
usr.bin/truss/main.c
usr.bin/truss/setup.c
usr.bin/truss/syscalls.c
usr.bin/truss/truss.1
usr.bin/truss/truss.h