Dtrace oddity
Conrad Meyer
cem at freebsd.org
Wed Apr 12 00:10:58 UTC 2017
On Tue, Apr 11, 2017 at 12:16 AM, Christopher Bowman
<crb at chrisbowman.com> wrote:
> Here is the oddity: when I run Dtrace and then run my test program I get the following output from Dtrace:
>
> crb at retread:60> dtrace -n 'syscall:freebsd:mmap:entry /execname == "test"/ {}'
> dtrace: description 'syscall:freebsd:mmap:entry ' matched 1 probe
> CPU ID FUNCTION:NAME
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
> 0 63401 mmap:entry
>
> I think Dtrace is indicating that the mmap syscall was called 12 times by my test program yet I can see how the program below would have done that.
A configuration file for dynamic linking is mapped; libc needs to be
mapped (several different regions); jemalloc sets up some memory for
allocations with anonymous mmap. So this is not unreasonable as part
of crt0 / program startup.
Best,
Conrad
More information about the freebsd-hackers
mailing list