Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2007 16:07:58 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        cvs-src@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/usr.bin/kdump kdump.c
Message-ID:  <200701051607.59334.jhb@freebsd.org>
In-Reply-To: <200701052104.l05L4cO7037092@repoman.freebsd.org>
References:  <200701052104.l05L4cO7037092@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 05 January 2007 16:04, John Baldwin wrote:
> jhb         2007-01-05 21:04:37 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     usr.bin/kdump        kdump.c 
>   Log:
>   Add code to parse the utrace(2) entries generated by malloc(3) in a more
>   human-readable format.  Note that we report 'realloc(p, 0)' as 'free(p)'
>   since both cases are encoded the same way and 'free()' is more common
>   than a realloc() to 0.
>   
>   MFC after:      1 week

Sample before and after from a trivial case:

old:
  9320 kdump    USER  12  00 00 00 00 00 00 00 00 00 00 00 00
  9320 kdump    USER  12  00 00 00 00 01 04 00 00 00 08 21 08

new:
  9320 kdump    USER  malloc_init()
  9320 kdump    USER  0x8210800 = malloc(1025)

I also have patches I use at work that allow kdump to recognize a 32-bit 
malloc utrace on an amd64 machine (for when you run an i386 binary) if folks 
are interested.  I'm not sure how many i386 on amd64 hacks we want in the 
official CVS tree. :)

I also have another set of patches to add various utrace(2) events to the 
runtime linker as well as logic in kdump to parse them that I hope to commit 
in the near future.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701051607.59334.jhb>