|
From: Yue C. <yc...@gm...> - 2015-09-08 06:10:55
|
Any approach that can distinguish which syscalls are from the application, and which syscalls are from Valgrind itself? On Tue, Sep 8, 2015 at 2:04 AM, Ivo Raisr <ivo...@gm...> wrote: > > > 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. > |