Very simple question. Why the discrepancy between
on the other hand,
dtrace and truss?
Code:
jb@p1 ~> doas dtrace -n 'syscall:::entry /execname == "zstd"/ { @[probefunc] = count(); }' -c 'zstd -b'
dtrace: description 'syscall:::entry ' matched 1612 probes
3#Lorem ipsum : 10000000 -> 2987328 (x3.347), 236.9 MB/s, 1102.1 MB/s
dtrace: pid 6615 has exited
exit 1
fstat 1
ioctl 1
mprotect 1
madvise 3
mmap 4
write 9
on the other hand,
truss reports many more syscalls for zstd -b. Why so? Is it that dtrace does not count the loader, or it's more involved/non-deterministic?