Add the call function tracking to isc_mem API

As we already track __func__, __FILE__, __LINE__ triplet in most places,
add the function tracking to the isc_mem tracking API.
This commit is contained in:
Ondřej Surý
2024-09-09 13:59:43 +02:00
parent eab9fc22e7
commit 1fae6ccea1
4 changed files with 49 additions and 44 deletions

View File

@@ -17,8 +17,8 @@
$mem_stats = '';
while (<>) {
$gets{$1.$2} = $_ if (/add (?:0x)?([0-9a-f]+) size (?:0x)?([0-9]+) file/);
delete $gets{$1.$2} if /del (?:0x)?([0-9a-f]+) size (?:0x)?([0-9]+) file/;
$gets{$1.$2} = $_ if (/add (?:0x)?([0-9a-f]+) size (?:0x)?([0-9]+) func/);
delete $gets{$1.$2} if /del (?:0x)?([0-9a-f]+) size (?:0x)?([0-9]+) func/;
$mem_stats .= $_ if /\d+ gets, +(\d+) rem/ && $1 > 0;
}
print join('', values %gets);