"visualize" kernel memory allocations
Antoine Brodin
antoine at FreeBSD.org
Tue Apr 15 14:27:34 UTC 2008
On Tue, Apr 15, 2008 at 2:37 PM, Antoine Brodin <antoine at freebsd.org> wrote:
> On Mon, Apr 14, 2008 at 9:18 PM, Volker <volker at 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
More information about the freebsd-hackers
mailing list