mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
also include isc_mem_stats output for allocations with non-0 remaining
This commit is contained in:
@@ -3,8 +3,14 @@
|
|||||||
# Massage the output from ISC_MEM_DEBUG to extract mem_get() calls
|
# Massage the output from ISC_MEM_DEBUG to extract mem_get() calls
|
||||||
# with no corresponding mem_put().
|
# with no corresponding mem_put().
|
||||||
|
|
||||||
|
$mem_stats = '';
|
||||||
|
|
||||||
while (<>) {
|
while (<>) {
|
||||||
$gets{$1.$2} = $_ if /mem(pool)?_get.*-> 0x([0-9a-f]+)/;
|
$gets{$1.$2} = $_ if /mem(pool)?_get.*-> 0x([0-9a-f]+)/;
|
||||||
delete $gets{$1.$2} if /mem(pool)?_put\(0x[0-9a-f]+, 0x([0-9a-f]+)/;
|
delete $gets{$1.$2} if /mem(pool)?_put\(0x[0-9a-f]+, 0x([0-9a-f]+)/;
|
||||||
|
$mem_stats .= $_ if /\d+ gets, +(\d+) rem/ && $1 > 0;
|
||||||
}
|
}
|
||||||
print join('', values %gets);
|
print join('', values %gets);
|
||||||
|
print $mem_stats;
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
Reference in New Issue
Block a user