Date: Tue, 11 Apr 2017 16:47:13 -0700 From: Conrad Meyer <cem@freebsd.org> To: Christopher Bowman <crb@chrisbowman.com> Cc: "freebsd-hackers@freebsd.org" <hackers@freebsd.org> Subject: Re: Dtrace oddity Message-ID: <CAG6CVpV7WwqBXZs%2B78Q3xak6UjjBG1X%2BWiAPJOnTx1V17DpWEw@mail.gmail.com> In-Reply-To: <CD5E9B03-6147-4E4D-BED6-6C45022051E3@chrisbowman.com> References: <CD5E9B03-6147-4E4D-BED6-6C45022051E3@chrisbowman.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 11, 2017 at 12:16 AM, Christopher Bowman
<crb@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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpV7WwqBXZs%2B78Q3xak6UjjBG1X%2BWiAPJOnTx1V17DpWEw>
