henesyinit from p9f0ed2a895 years agoHistory
20 lines · 450 B · Text
RawDownload
#!/bin/rc # usage: showleak leakfile [8.out] switch($#*){case 2	leakfile=$1	objfile=$2case 1	leakfile=$1	objfile=/dev/nullcase *	echo 'usage: showleak leakfile [8.out]' >[1=2]	exit usage} awk -f /sys/src/libdebugmalloc/leaks.awk $leakfile | {if(test -x $objfile) nm $objfile; cat} | 	awk -f /sys/src/libdebugmalloc/symproc.awk |sort | uniq -c | sort -nr |	awk -f /sys/src/libdebugmalloc/summary.awk | sed 's/0x0+([0-9a-fA-F])/0x\1/g'