Date: Thu, 10 Jan 2013 10:16:46 -0500 From: Alfred Perlstein <bright@mu.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Daniel Eischen <deischen@freebsd.org>, hackers@freebsd.org, Jason Evans <jasone@freebsd.org> Subject: Re: malloc+utrace, tracking memory leaks in a running program. Message-ID: <50EEDB5E.2010906@mu.org> In-Reply-To: <20130110073854.GQ2561@kib.kiev.ua> References: <50D52B10.1060205@mu.org> <A0AD197D-B72D-4FF5-B9AF-5E4F2AAAA421@freebsd.org> <50EE6281.7030602@mu.org> <50EE6630.2010902@mu.org> <20130110073854.GQ2561@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/10/13 2:38 AM, Konstantin Belousov wrote: > On Thu, Jan 10, 2013 at 01:56:48AM -0500, Alfred Perlstein wrote: >> Here are more convenient links that give diffs against FreeBSD and >> jemalloc for the proposed changes: >> >> FreeBSD: >> https://github.com/alfredperlstein/freebsd/compare/13e7228d5b83c8fcfc63a0803a374212018f6b68~1...utrace2 >> > Why do you need to expedite the records through the ktrace at all ? > Wouldn't direct write(2)s to a file allow for better performance > due to not stressing kernel memory allocator and single writing thread ? > Also, the malloc coupling to the single-system interface would be > prevented. > > I believe that other usermode tracers also behave in the similar way, > using writes and not private kernel interface. > > Also, what /proc issues did you mentioned ? There is > sysctl kern.proc.vmmap which is much more convenient than /proc/pid/map > and does not require /proc mounted. > >> jemalloc: >> https://github.com/alfredperlstein/jemalloc/compare/master...utrace2 >> Konstantin, you are right, it is a strange thing this utrace. I am not sure why it was done this way. You are correct in that much more efficient system could be made using writes gathered into a single write(2). Do you think there is any reason they may have re-used the kernel paths for ktrace even at the cost of efficiency? About kern.proc.vmmap I will look into that. -Alfred
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50EEDB5E.2010906>