afsd: Improve syscall tracing
When afsd is started with the -debug flag, extensive debug output is
generated including tracing for each syscall. Unfortunately the
existing syscall tracing is not especially helpful. It dumps out two
constants that we already knew at compile time, the first parameter of
the syscall along with the syscall's return code. Specifically it does
not tell you which syscall is currently being traced. Here's a current
example of afsd -debug:
afsd: cacheFiles autotuned to 581250
afsd: dCacheSize autotuned to 10000
afsd: cacheStatEntries autotuned to 15000
SScall(183, 28, 6860800)=0
SScall(183, 28, -
847416368)=0
SScall(183, 28, 1)=0
afsd: Forking rx listener daemon.
afsd: Forking rx callback listener.
afsd: Forking rxevent daemon.
SScall(183, 28, 0)=0
SScall(183, 28, 1)=0
...
This patch drops the compile time constants (183 and 28 in the above
sample output) and replaces them with the name of the syscall being
traced. Additionally the first parameter to a syscall is as likely to
be an address as a decimal value so display it in hex. Here's an example
of afsd -debug with these changes:
afsd: cacheFiles autotuned to 581250
afsd: dCacheSize autotuned to 10000
afsd: cacheStatEntries autotuned to 15000
os_syscall(AFSOP_SET_THISCELL, 0x68bf80)=0
os_syscall(AFSOP_SEED_ENTROPY, 0x7fff9ce40c10)=0
os_syscall(AFSOP_ADVISEADDR, 0x1)=0
afsd: Forking rx listener daemon.
afsd: Forking rx callback listener.
afsd: Forking rxevent daemon.
os_syscall(AFSOP_RXEVENT_DAEMON, 0x0)=0
os_syscall(AFSOP_BASIC_INIT, 0x1)=0
...
[mmeffie@sinenomine.net: avoid c99 array initialization.]
Change-Id: I4f3d46d420d19abeddbf719efa04aef7e553d51f
Reviewed-on: https://gerrit.openafs.org/11858
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>