зеркало из https://github.com/mozilla/gecko-dev.git
Count various classes in leak/bloat logs. r=waterson@netscape.com
This commit is contained in:
Родитель
dd0c6672be
Коммит
5695245ccb
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "xptiprivate.h"
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(xptiFile);
|
||||
|
||||
xptiFile::xptiFile()
|
||||
: mSize(),
|
||||
|
@ -32,6 +33,7 @@ xptiFile::xptiFile()
|
|||
mGuts(nsnull)
|
||||
{
|
||||
// empty
|
||||
MOZ_COUNT_CTOR(xptiFile);
|
||||
}
|
||||
|
||||
xptiFile::xptiFile(const nsInt64& aSize,
|
||||
|
@ -50,6 +52,8 @@ xptiFile::xptiFile(const nsInt64& aSize,
|
|||
|
||||
if(aHeader)
|
||||
SetHeader(aHeader);
|
||||
|
||||
MOZ_COUNT_CTOR(xptiFile);
|
||||
}
|
||||
|
||||
xptiFile::xptiFile(const xptiFile& r, xptiWorkingSet* aWorkingSet,
|
||||
|
@ -64,12 +68,16 @@ xptiFile::xptiFile(const xptiFile& r, xptiWorkingSet* aWorkingSet,
|
|||
|
||||
if(cloneGuts && r.mGuts)
|
||||
mGuts = r.mGuts->Clone();
|
||||
|
||||
MOZ_COUNT_CTOR(xptiFile);
|
||||
}
|
||||
|
||||
xptiFile::~xptiFile()
|
||||
{
|
||||
if(mGuts)
|
||||
delete mGuts;
|
||||
|
||||
MOZ_COUNT_DTOR(xptiFile);
|
||||
}
|
||||
|
||||
PRBool
|
||||
|
|
|
@ -54,10 +54,14 @@ xptiFileType::Type xptiFileType::GetType(const char* name)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(xptiAutoLog);
|
||||
|
||||
xptiAutoLog::xptiAutoLog(xptiInterfaceInfoManager* mgr,
|
||||
nsILocalFile* logfile, PRBool append)
|
||||
: mMgr(nsnull), mOldFileDesc(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(xptiAutoLog);
|
||||
|
||||
if(mgr && logfile)
|
||||
{
|
||||
PRFileDesc* fd;
|
||||
|
@ -87,6 +91,8 @@ xptiAutoLog::xptiAutoLog(xptiInterfaceInfoManager* mgr,
|
|||
|
||||
xptiAutoLog::~xptiAutoLog()
|
||||
{
|
||||
MOZ_COUNT_DTOR(xptiAutoLog);
|
||||
|
||||
if(mMgr)
|
||||
{
|
||||
PRFileDesc* fd = mMgr->SetOpenLogFile(mOldFileDesc);
|
||||
|
|
|
@ -24,10 +24,14 @@
|
|||
|
||||
#include "xptiprivate.h"
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(xptiTypelibGuts);
|
||||
|
||||
xptiTypelibGuts::xptiTypelibGuts(XPTHeader* aHeader)
|
||||
: mHeader(aHeader),
|
||||
mInfoArray(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(xptiTypelibGuts);
|
||||
|
||||
NS_ASSERTION(mHeader, "bad param");
|
||||
|
||||
if(mHeader->num_interfaces)
|
||||
|
@ -42,6 +46,8 @@ xptiTypelibGuts::xptiTypelibGuts(XPTHeader* aHeader)
|
|||
|
||||
xptiTypelibGuts::~xptiTypelibGuts()
|
||||
{
|
||||
MOZ_COUNT_DTOR(xptiTypelibGuts);
|
||||
|
||||
if(mHeader && mInfoArray)
|
||||
for(PRUint16 i = 0; i < GetInfoCount(); ++i)
|
||||
NS_IF_RELEASE(mInfoArray[i]);
|
||||
|
|
|
@ -40,6 +40,8 @@ xpti_CompareIIDs(const void *v1, const void *v2)
|
|||
return (PRIntn) ((const nsID*)v1)->Equals(*((const nsID*)v2));
|
||||
}
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(xptiWorkingSet);
|
||||
|
||||
xptiWorkingSet::xptiWorkingSet()
|
||||
: mFileCount(0),
|
||||
mMaxFileCount(0),
|
||||
|
@ -60,6 +62,7 @@ xptiWorkingSet::xptiWorkingSet()
|
|||
mFileMergeOffsetMap(nsnull),
|
||||
mZipItemMergeOffsetMap(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(xptiWorkingSet);
|
||||
// do nothing else...
|
||||
}
|
||||
|
||||
|
@ -135,6 +138,8 @@ xptiWorkingSet::ClearZipItems()
|
|||
|
||||
xptiWorkingSet::~xptiWorkingSet()
|
||||
{
|
||||
MOZ_COUNT_DTOR(xptiWorkingSet);
|
||||
|
||||
ClearFiles();
|
||||
ClearZipItems();
|
||||
ClearHashTables();
|
||||
|
|
|
@ -24,11 +24,13 @@
|
|||
|
||||
#include "xptiprivate.h"
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(xptiZipItem);
|
||||
|
||||
xptiZipItem::xptiZipItem()
|
||||
: mName(nsnull),
|
||||
mGuts(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(xptiZipItem);
|
||||
// empty
|
||||
}
|
||||
|
||||
|
@ -39,6 +41,8 @@ xptiZipItem::xptiZipItem(const char* aName,
|
|||
: mName(aName),
|
||||
mGuts(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(xptiZipItem);
|
||||
|
||||
NS_ASSERTION(aWorkingSet,"bad param");
|
||||
mName = XPT_STRDUP(aWorkingSet->GetStringArena(), aName);
|
||||
|
||||
|
@ -51,6 +55,8 @@ xptiZipItem::xptiZipItem(const xptiZipItem& r, xptiWorkingSet* aWorkingSet,
|
|||
: mName(nsnull),
|
||||
mGuts(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(xptiZipItem);
|
||||
|
||||
NS_ASSERTION(aWorkingSet,"bad param");
|
||||
mName = XPT_STRDUP(aWorkingSet->GetStringArena(), r.mName);
|
||||
|
||||
|
@ -60,6 +66,8 @@ xptiZipItem::xptiZipItem(const xptiZipItem& r, xptiWorkingSet* aWorkingSet,
|
|||
|
||||
xptiZipItem::~xptiZipItem()
|
||||
{
|
||||
MOZ_COUNT_DTOR(xptiZipItem);
|
||||
|
||||
if(mGuts)
|
||||
delete mGuts;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче