|
From: Ivo R. <ivo...@gm...> - 2015-09-08 06:04:46
|
2015-09-08 1:35 GMT+02:00 Yue Chen <yc...@gm...>: > I tried to use Valgrind syscall tracing utility on FreeBSD 10.1. I found > that that the results of ``truss'' and ``valgrind --trace-syscalls=yes'' > are a little different. For example, the result of Valgrind has extra > syscalls like sys_sysctl, sys_fstatfs6 and [async]. > Is it because Valgrind result contains the syscalls issued from the > instrumentation code, or something else? > Thanks. > Think of Valgrind as a virtual machine. Truss observes behaviour of the host (Valgrind itself) while --trace-syscalls traces behavior of the guest (your application). Valgrind syscall machinery intercepts all syscalls from the application and in general they are not mapped 1:1 to native ones. Some of these might be changed or intercepted completely. Valgrind will also issue syscalls on its own. I. |