Date: Tue, 15 Apr 2008 16:27:32 +0200 From: "Antoine Brodin" <antoine@FreeBSD.org> To: "Antoine Brodin" <antoine@freebsd.org> Cc: Volker <volker@vwsoft.com>, hackers@freebsd.org Subject: Re: "visualize" kernel memory allocations Message-ID: <f19c444a0804150727r299e95e8h1a03b1e1e0043b12@mail.gmail.com> In-Reply-To: <f19c444a0804150537t11378638w998c1716dd7750cc@mail.gmail.com> References: <4803AE07.9010106@vwsoft.com> <f19c444a0804150537t11378638w998c1716dd7750cc@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 15, 2008 at 2:37 PM, Antoine Brodin <antoine@freebsd.org> wrote: > On Mon, Apr 14, 2008 at 9:18 PM, Volker <volker@vwsoft.com> wrote: > > Hi hackers! > > > > I need to hunt kernel memory allocations done by a kld. Unfortunately > > the kld in question is a blob, no access to source code, so I need to > > check for kmem_alloc() + kmem_malloc() + kmem_free() and print > > information from there to the console screen. > > Hi Volker, > > You could patch your kld (hexadecimal editor or something like that) > to call wrappers around the interesting functions that print the > arguments. "objcopy --redefine-syms" seems to be easier to use than a hexadecimal editor. Cheers, Antoine
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f19c444a0804150727r299e95e8h1a03b1e1e0043b12>