mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 538388 - Make find-leakers.pl work with the output of XPCOM_MEM_ALLOC_LOG as it dose with XPCOM_MEM_REFCNT_LOG, r=dbaron
This commit is contained in:
parent
cbf5d72da1
commit
5b4cf2e3f8
@ -52,6 +52,8 @@ LINE: while (<>) {
|
||||
my $op = shift(@fields);
|
||||
my $cnt = shift(@fields);
|
||||
|
||||
# for AddRef/Release $cnt is the refcount, for Ctor/Dtor it's the size
|
||||
|
||||
if ($op eq 'AddRef' && $cnt == 1) {
|
||||
# Example: <nsStringBuffer> 0x01AFD3B8 1 AddRef 1
|
||||
|
||||
@ -61,6 +63,18 @@ LINE: while (<>) {
|
||||
elsif ($op eq 'Release' && $cnt == 0) {
|
||||
# Example: <nsStringBuffer> 0x01AFD3B8 1 Release 0
|
||||
|
||||
delete($allocs{$obj});
|
||||
delete($classes{$obj});
|
||||
}
|
||||
elsif ($op eq 'Ctor') {
|
||||
# Example: <PStreamNotifyParent> 0x08880BD0 8 Ctor (20)
|
||||
|
||||
$allocs{$obj} = ++$counter{$class};
|
||||
$classes{$obj} = $class;
|
||||
}
|
||||
elsif ($op eq 'Dtor') {
|
||||
# Example: <PStreamNotifyParent> 0x08880BD0 8 Dtor (20)
|
||||
|
||||
delete($allocs{$obj});
|
||||
delete($classes{$obj});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user