mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
* show only totals for memdebug
git-svn-id: trunk@5196 -
This commit is contained in:
parent
398aed09fc
commit
5cd8775d38
@ -155,6 +155,13 @@ implementation
|
|||||||
verbose,
|
verbose,
|
||||||
aasmtai;
|
aasmtai;
|
||||||
|
|
||||||
|
{$ifdef MEMDEBUG}
|
||||||
|
var
|
||||||
|
memasmsymbols,
|
||||||
|
memasmcfi,
|
||||||
|
memasmlists : TMemDebug;
|
||||||
|
{$endif MEMDEBUG}
|
||||||
|
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
TAsmCFI
|
TAsmCFI
|
||||||
@ -284,33 +291,33 @@ implementation
|
|||||||
|
|
||||||
destructor TAsmData.destroy;
|
destructor TAsmData.destroy;
|
||||||
var
|
var
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
d : tmemdebug;
|
|
||||||
{$endif}
|
|
||||||
hal : TAsmListType;
|
hal : TAsmListType;
|
||||||
begin
|
begin
|
||||||
|
{ Symbols }
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d:=tmemdebug.create(name+' - AsmSymbols');
|
memasmsymbols.start;
|
||||||
{$endif}
|
{$endif}
|
||||||
FAltSymbolList.free;
|
FAltSymbolList.free;
|
||||||
FAsmSymbolDict.free;
|
FAsmSymbolDict.free;
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d.free;
|
memasmsymbols.stop;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{ CFI }
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d:=tmemdebug.create(name+' - AsmCFI');
|
memasmcfi.start;
|
||||||
{$endif}
|
{$endif}
|
||||||
FAsmCFI.free;
|
FAsmCFI.free;
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d.free;
|
memasmcfi.stop;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{ Lists }
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d:=tmemdebug.create(name+' - AsmLists');
|
memasmlists.start;
|
||||||
{$endif}
|
{$endif}
|
||||||
for hal:=low(TAsmListType) to high(TAsmListType) do
|
for hal:=low(TAsmListType) to high(TAsmListType) do
|
||||||
AsmLists[hal].free;
|
AsmLists[hal].free;
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d.free;
|
memasmlists.stop;
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -403,6 +410,22 @@ implementation
|
|||||||
inc(FNextLabelNr[alt_addr]);
|
inc(FNextLabelNr[alt_addr]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
initialization
|
||||||
|
{$ifdef MEMDEBUG}
|
||||||
|
memasmsymbols:=TMemDebug.create('AsmSymbols');
|
||||||
|
memasmsymbols.stop;
|
||||||
|
memasmcfi:=TMemDebug.create('AsmCFI');
|
||||||
|
memasmcfi.stop;
|
||||||
|
memasmlists:=TMemDebug.create('AsmLists');
|
||||||
|
memasmlists.stop;
|
||||||
|
{$endif MEMDEBUG}
|
||||||
CAsmCFI:=TAsmCFI;
|
CAsmCFI:=TAsmCFI;
|
||||||
|
|
||||||
|
finalization
|
||||||
|
{$ifdef MEMDEBUG}
|
||||||
|
memasmsymbols.free;
|
||||||
|
memasmcfi.free;
|
||||||
|
memasmlists.free;
|
||||||
|
{$endif MEMDEBUG}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -628,21 +628,11 @@ Implementation
|
|||||||
|
|
||||||
|
|
||||||
destructor TInternalAssembler.destroy;
|
destructor TInternalAssembler.destroy;
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
var
|
|
||||||
d : tmemdebug;
|
|
||||||
{$endif}
|
|
||||||
begin
|
begin
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
d := tmemdebug.create(name+' - agbin');
|
|
||||||
{$endif}
|
|
||||||
if assigned(ObjData) then
|
if assigned(ObjData) then
|
||||||
ObjData.free;
|
ObjData.free;
|
||||||
if assigned(ObjOutput) then
|
if assigned(ObjOutput) then
|
||||||
ObjOutput.free;
|
ObjOutput.free;
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
d.free;
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1361,9 +1351,6 @@ Implementation
|
|||||||
|
|
||||||
var to_do:set of TasmlistType;
|
var to_do:set of TasmlistType;
|
||||||
i:TasmlistType;
|
i:TasmlistType;
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
d : tmemdebug;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
procedure addlist(p:TAsmList);
|
procedure addlist(p:TAsmList);
|
||||||
begin
|
begin
|
||||||
@ -1385,23 +1372,6 @@ Implementation
|
|||||||
writetreesmart
|
writetreesmart
|
||||||
else
|
else
|
||||||
writetree;
|
writetree;
|
||||||
|
|
||||||
(*
|
|
||||||
if assigned(objectlibrary) then
|
|
||||||
begin
|
|
||||||
if objectlibrary<>current_module.librarydata then
|
|
||||||
internalerror(200603013);
|
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
d:=tmemdebug.create(modulename^+' - librarydata');
|
|
||||||
{$endif}
|
|
||||||
current_asmdata.free;
|
|
||||||
objectlibrary:=nil;
|
|
||||||
current_module.librarydata:=nil;
|
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
d.free;
|
|
||||||
{$endif}
|
|
||||||
end;
|
|
||||||
*)
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,10 +114,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
aasmcpu;
|
aasmcpu;
|
||||||
|
|
||||||
{$ifdef EXTDEBUG}
|
{$if defined(EXTDEBUG) or defined(MEMDEBUG)}
|
||||||
{$define SHOWUSEDMEM}
|
|
||||||
{$endif}
|
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
{$define SHOWUSEDMEM}
|
{$define SHOWUSEDMEM}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
@ -209,6 +209,10 @@ implementation
|
|||||||
scanner,ppu,
|
scanner,ppu,
|
||||||
procinfo;
|
procinfo;
|
||||||
|
|
||||||
|
{$ifdef MEMDEBUG}
|
||||||
|
var
|
||||||
|
memsymtable : TMemDebug;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
Global Functions
|
Global Functions
|
||||||
@ -445,9 +449,6 @@ implementation
|
|||||||
|
|
||||||
destructor tmodule.Destroy;
|
destructor tmodule.Destroy;
|
||||||
var
|
var
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
d : tmemdebug;
|
|
||||||
{$endif}
|
|
||||||
i : longint;
|
i : longint;
|
||||||
hpi : tprocinfo;
|
hpi : tprocinfo;
|
||||||
begin
|
begin
|
||||||
@ -516,7 +517,7 @@ implementation
|
|||||||
localincludesearchpath.free;
|
localincludesearchpath.free;
|
||||||
locallibrarysearchpath.free;
|
locallibrarysearchpath.free;
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d:=tmemdebug.create(modulename^+' - symtable');
|
memsymtable.start;
|
||||||
{$endif}
|
{$endif}
|
||||||
derefdata.free;
|
derefdata.free;
|
||||||
deflist.free;
|
deflist.free;
|
||||||
@ -530,7 +531,7 @@ implementation
|
|||||||
if assigned(localmacrosymtable) then
|
if assigned(localmacrosymtable) then
|
||||||
localmacrosymtable.free;
|
localmacrosymtable.free;
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d.free;
|
memsymtable.stop;
|
||||||
{$endif}
|
{$endif}
|
||||||
stringdispose(modulename);
|
stringdispose(modulename);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
@ -846,4 +847,15 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
initialization
|
||||||
|
{$ifdef MEMDEBUG}
|
||||||
|
memsymtable:=TMemDebug.create('Symtables');
|
||||||
|
memsymtable.stop;
|
||||||
|
{$endif MEMDEBUG}
|
||||||
|
|
||||||
|
finalization
|
||||||
|
{$ifdef MEMDEBUG}
|
||||||
|
memsymtable.free;
|
||||||
|
{$endif MEMDEBUG}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -740,13 +740,9 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
destructor TObjData.destroy;
|
destructor TObjData.destroy;
|
||||||
{$ifdef MEMDEBUG}
|
|
||||||
var
|
|
||||||
d : tmemdebug;
|
|
||||||
{$endif}
|
|
||||||
begin
|
begin
|
||||||
|
{ Symbols }
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d:=tmemdebug.create(name+' - ObjData symbols');
|
|
||||||
MemObjSymbols.Start;
|
MemObjSymbols.Start;
|
||||||
{$endif}
|
{$endif}
|
||||||
ResetCachedAsmSymbols;
|
ResetCachedAsmSymbols;
|
||||||
@ -754,16 +750,14 @@ implementation
|
|||||||
FObjSymbolList.free;
|
FObjSymbolList.free;
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
MemObjSymbols.Stop;
|
MemObjSymbols.Stop;
|
||||||
d.free;
|
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{ Sections }
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
d:=tmemdebug.create(name+' - ObjData sections');
|
|
||||||
MemObjSections.Start;
|
MemObjSections.Start;
|
||||||
{$endif}
|
{$endif}
|
||||||
FObjSectionList.free;
|
FObjSectionList.free;
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
MemObjSections.Stop;
|
MemObjSections.Stop;
|
||||||
d.free;
|
|
||||||
{$endif}
|
{$endif}
|
||||||
inherited destroy;
|
inherited destroy;
|
||||||
end;
|
end;
|
||||||
|
@ -181,7 +181,6 @@ interface
|
|||||||
|
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
var
|
var
|
||||||
memrealnames,
|
|
||||||
memmanglednames,
|
memmanglednames,
|
||||||
memprocpara,
|
memprocpara,
|
||||||
memprocparast,
|
memprocparast,
|
||||||
@ -949,8 +948,6 @@ implementation
|
|||||||
|
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
initialization
|
initialization
|
||||||
memrealnames:=TMemDebug.create('Realnames');
|
|
||||||
memrealnames.stop;
|
|
||||||
memmanglednames:=TMemDebug.create('Manglednames');
|
memmanglednames:=TMemDebug.create('Manglednames');
|
||||||
memmanglednames.stop;
|
memmanglednames.stop;
|
||||||
memprocpara:=TMemDebug.create('ProcPara');
|
memprocpara:=TMemDebug.create('ProcPara');
|
||||||
@ -963,7 +960,6 @@ initialization
|
|||||||
memprocnodetree.stop;
|
memprocnodetree.stop;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
memrealnames.free;
|
|
||||||
memmanglednames.free;
|
memmanglednames.free;
|
||||||
memprocpara.free;
|
memprocpara.free;
|
||||||
memprocparast.free;
|
memprocparast.free;
|
||||||
|
Loading…
Reference in New Issue
Block a user