Changes should not affect the build. Renaming the RAPTOR_PERF_METRICS ifdef to MOZ_PERF_METRICS.

This commit is contained in:
nisheeth%netscape.com 1999-10-19 22:27:20 +00:00
Родитель bbb8c21318
Коммит ef75c33b3c
23 изменённых файлов: 48 добавлений и 76 удалений

Просмотреть файл

@ -31,7 +31,7 @@
#include "nsIStyleFrameConstruction.h"
#include "nsLayoutAtoms.h"
#include "stopwatch.h"
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
#include "nsITimeRecorder.h"
#endif
@ -40,7 +40,7 @@ static NS_DEFINE_IID(kIStyleFrameConstructionIID, NS_ISTYLE_FRAME_CONSTRUCTION_I
class StyleSetImpl : public nsIStyleSet
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
, public nsITimeRecorder
#endif
{
@ -164,7 +164,7 @@ public:
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0);
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
NS_DECL_NSITIMERECORDER
#endif
@ -196,7 +196,7 @@ protected:
nsIStyleFrameConstruction* mFrameConstructor;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mStyleResolutionWatch;
#endif
};
@ -222,7 +222,7 @@ StyleSetImpl::~StyleSetImpl()
NS_IF_RELEASE(mRecycler);
}
#ifndef RAPTOR_PERF_METRICS
#ifndef MOZ_PERF_METRICS
NS_IMPL_ISUPPORTS(StyleSetImpl, kIStyleSetIID)
#else
NS_IMPL_ISUPPORTS2(StyleSetImpl, nsIStyleSet, nsITimeRecorder)
@ -1096,7 +1096,7 @@ NS_NewStyleSet(nsIStyleSet** aInstancePtrResult)
// nsITimeRecorder implementation
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
NS_IMETHODIMP
StyleSetImpl::ResetTimer(PRUint32 aTimerID)
{

Просмотреть файл

@ -288,7 +288,7 @@ public:
}
#endif
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mWatch; // Measures content model creation time for current document
#endif
};
@ -1790,7 +1790,7 @@ NS_IMETHODIMP
HTMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
{
// NRA Dump stopwatch stop info here
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: nsHTMLContentSink::DidBuildModel(), this=%p\n", this));
NS_STOP_STOPWATCH(mWatch)
RAPTOR_STOPWATCH_TRACE(("Content creation time (this=%p): ", this));

Просмотреть файл

@ -489,7 +489,7 @@ protected:
// if there is no mWindow, this will keep track of the bounds --dwc0001
nsRect mBounds;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mTotalTime;
#endif
@ -2068,7 +2068,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
mProcessedEndDocumentLoad = PR_FALSE;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
{
char* url;
nsresult rv = NS_OK;
@ -3296,7 +3296,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
nsresult aStatus,
nsIDocumentLoaderObserver * aWebShell)
{
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: nsWebShell::OnEndDocumentLoad(), this=%p\n", this));
NS_STOP_STOPWATCH(mTotalTime)
RAPTOR_STOPWATCH_TRACE(("Total (Layout + Page Load) Time (webshell=%p): ", this));

Просмотреть файл

@ -81,7 +81,7 @@ static eHTMLTags gWhitespaceTags[]={
#include "nsElementTable.h"
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
# define START_TIMER() \
if(mParser) mParser->mParseTime.Start(PR_FALSE); \
if(mParser) mParser->mDTDTime.Start(PR_FALSE);

Просмотреть файл

@ -22,10 +22,6 @@ include <$(DEPTH)\config\config.mak>
LIBRARY_NAME=raptorhtmlpars
DEFINES=-D_IMPL_NS_HTMLPARS -DWIN32_LEAN_AND_MEAN -DXML_DTD
!if defined(MOZ_PERF)
DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS
!endif
MODULE=raptor
REQUIRES=xpcom raptor netlib
IS_COMPONENT = 1

Просмотреть файл

@ -197,7 +197,7 @@ nsParser::nsParser(nsITokenObserver* anObserver) : mCommand(""), mUnusedInput(""
mCharsetSource=kCharsetUninitialized;
mInternalState=NS_OK;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
RAPTOR_STOPWATCH_DEBUGTRACE(("Reset: Parse Time: nsParser::nsParser(), this=%p\n", this));
mParseTime.Reset();
mDTDTime.Reset();
@ -958,7 +958,7 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD, PRBool aIsFinalChunk) {
NS_STOP_STOPWATCH(mParseTime);
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
// XXX Don't print out Gecko layout time till I make the save/restore
// implementation use a stack. We'll calculate page load + layout time
// in the webshell and print that out for now because that is more easy to
@ -1308,7 +1308,7 @@ nsresult nsParser::OnDataAvailable(nsIURI* aURL, nsIInputStream *pIStream, PRUin
NS_PRECONDITION(((eOnStart==mParserContext->mStreamListenerState)||(eOnDataAvail==mParserContext->mStreamListenerState)),kOnStartNotCalled);
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
if (0 == sourceOffset) {
NS_RESET_AND_START_STOPWATCH(mTotalTime);
}

Просмотреть файл

@ -390,7 +390,7 @@ protected:
nsresult mInternalState;
CObserverService mObserverService;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
public:
Stopwatch mTotalTime;
Stopwatch mParseTime;

Просмотреть файл

@ -66,7 +66,7 @@
#include "nsIScrollPositionListener.h"
#include "nsICompositeListener.h"
#include "stopwatch.h"
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
#include "nsITimeRecorder.h"
#endif
@ -362,7 +362,7 @@ private:
void PushCurrentEventFrame();
void PopCurrentEventFrame();
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mReflowWatch; // Used for measuring time spent in reflow
Stopwatch mFrameCreationWatch; // Used for measuring time spent in frame creation
#endif
@ -1247,7 +1247,7 @@ PresShell::EndUpdate(nsIDocument *aDocument)
NS_IMETHODIMP
PresShell::BeginLoad(nsIDocument *aDocument)
{
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
// Reset style resolution stopwatch maintained by style set
nsresult rv = NS_OK;
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
@ -1262,7 +1262,7 @@ PresShell::BeginLoad(nsIDocument *aDocument)
NS_IMETHODIMP
PresShell::EndLoad(nsIDocument *aDocument)
{
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
// Dump reflow, style resolution and frame construction times here.
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: Reflow: PresShell::EndLoad(), this=%p\n", this));
NS_STOP_STOPWATCH(mReflowWatch)

Просмотреть файл

@ -22,10 +22,6 @@ DEFINES=-D_IMPL_NS_LAYOUT -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
!if defined(MOZ_PERF)
DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS
!endif
CPPSRCS = \
nsCommentNode.cpp \

Просмотреть файл

@ -31,7 +31,7 @@
#include "nsIStyleFrameConstruction.h"
#include "nsLayoutAtoms.h"
#include "stopwatch.h"
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
#include "nsITimeRecorder.h"
#endif
@ -40,7 +40,7 @@ static NS_DEFINE_IID(kIStyleFrameConstructionIID, NS_ISTYLE_FRAME_CONSTRUCTION_I
class StyleSetImpl : public nsIStyleSet
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
, public nsITimeRecorder
#endif
{
@ -164,7 +164,7 @@ public:
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0);
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
NS_DECL_NSITIMERECORDER
#endif
@ -196,7 +196,7 @@ protected:
nsIStyleFrameConstruction* mFrameConstructor;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mStyleResolutionWatch;
#endif
};
@ -222,7 +222,7 @@ StyleSetImpl::~StyleSetImpl()
NS_IF_RELEASE(mRecycler);
}
#ifndef RAPTOR_PERF_METRICS
#ifndef MOZ_PERF_METRICS
NS_IMPL_ISUPPORTS(StyleSetImpl, kIStyleSetIID)
#else
NS_IMPL_ISUPPORTS2(StyleSetImpl, nsIStyleSet, nsITimeRecorder)
@ -1096,7 +1096,7 @@ NS_NewStyleSet(nsIStyleSet** aInstancePtrResult)
// nsITimeRecorder implementation
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
NS_IMETHODIMP
StyleSetImpl::ResetTimer(PRUint32 aTimerID)
{

Просмотреть файл

@ -24,9 +24,6 @@ DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
!if defined(MOZ_PERF)
DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS
!endif
EXPORTS = \
nsIHTMLContent.h \

Просмотреть файл

@ -66,7 +66,7 @@
#include "nsIScrollPositionListener.h"
#include "nsICompositeListener.h"
#include "stopwatch.h"
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
#include "nsITimeRecorder.h"
#endif
@ -362,7 +362,7 @@ private:
void PushCurrentEventFrame();
void PopCurrentEventFrame();
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mReflowWatch; // Used for measuring time spent in reflow
Stopwatch mFrameCreationWatch; // Used for measuring time spent in frame creation
#endif
@ -1247,7 +1247,7 @@ PresShell::EndUpdate(nsIDocument *aDocument)
NS_IMETHODIMP
PresShell::BeginLoad(nsIDocument *aDocument)
{
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
// Reset style resolution stopwatch maintained by style set
nsresult rv = NS_OK;
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
@ -1262,7 +1262,7 @@ PresShell::BeginLoad(nsIDocument *aDocument)
NS_IMETHODIMP
PresShell::EndLoad(nsIDocument *aDocument)
{
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
// Dump reflow, style resolution and frame construction times here.
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: Reflow: PresShell::EndLoad(), this=%p\n", this));
NS_STOP_STOPWATCH(mReflowWatch)

Просмотреть файл

@ -25,9 +25,6 @@ DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
!if defined(MOZ_PERF)
DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS
!endif
CPPSRCS= \
nsHTMLContentSink.cpp \

Просмотреть файл

@ -288,7 +288,7 @@ public:
}
#endif
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mWatch; // Measures content model creation time for current document
#endif
};
@ -1790,7 +1790,7 @@ NS_IMETHODIMP
HTMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
{
// NRA Dump stopwatch stop info here
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: nsHTMLContentSink::DidBuildModel(), this=%p\n", this));
NS_STOP_STOPWATCH(mWatch)
RAPTOR_STOPWATCH_TRACE(("Content creation time (this=%p): ", this));

Просмотреть файл

@ -31,7 +31,7 @@
#include "nsIStyleFrameConstruction.h"
#include "nsLayoutAtoms.h"
#include "stopwatch.h"
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
#include "nsITimeRecorder.h"
#endif
@ -40,7 +40,7 @@ static NS_DEFINE_IID(kIStyleFrameConstructionIID, NS_ISTYLE_FRAME_CONSTRUCTION_I
class StyleSetImpl : public nsIStyleSet
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
, public nsITimeRecorder
#endif
{
@ -164,7 +164,7 @@ public:
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0);
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
NS_DECL_NSITIMERECORDER
#endif
@ -196,7 +196,7 @@ protected:
nsIStyleFrameConstruction* mFrameConstructor;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mStyleResolutionWatch;
#endif
};
@ -222,7 +222,7 @@ StyleSetImpl::~StyleSetImpl()
NS_IF_RELEASE(mRecycler);
}
#ifndef RAPTOR_PERF_METRICS
#ifndef MOZ_PERF_METRICS
NS_IMPL_ISUPPORTS(StyleSetImpl, kIStyleSetIID)
#else
NS_IMPL_ISUPPORTS2(StyleSetImpl, nsIStyleSet, nsITimeRecorder)
@ -1096,7 +1096,7 @@ NS_NewStyleSet(nsIStyleSet** aInstancePtrResult)
// nsITimeRecorder implementation
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
NS_IMETHODIMP
StyleSetImpl::ResetTimer(PRUint32 aTimerID)
{

Просмотреть файл

@ -10,7 +10,7 @@ const double gTicks = 1.0e-7;
#define R__MAC
#endif
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
# define NS_RESET_AND_START_STOPWATCH(_sw) \
_sw.Start(PR_TRUE);
@ -35,7 +35,7 @@ const double gTicks = 1.0e-7;
#endif
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
static PRLogModuleInfo* gLogStopwatchModule = PR_NewLogModule("timing");

Просмотреть файл

@ -20,15 +20,8 @@ DEPTH=..\..\..
CSRCS=obs.c
REQUIRES=nspr util
LIBRARY_NAME=util
!if defined(MOZ_PERF)
DEFINES=-DRAPTOR_PERF_METRICS
CPPSRCS=stopwatch.cpp
CPP_OBJS=.\$(OBJDIR)\stopwatch.obj
LCFLAGS = \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
!endif
C_OBJS=.\$(OBJDIR)\obs.obj

Просмотреть файл

@ -81,7 +81,7 @@ static eHTMLTags gWhitespaceTags[]={
#include "nsElementTable.h"
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
# define START_TIMER() \
if(mParser) mParser->mParseTime.Start(PR_FALSE); \
if(mParser) mParser->mDTDTime.Start(PR_FALSE);

Просмотреть файл

@ -22,10 +22,6 @@ include <$(DEPTH)\config\config.mak>
LIBRARY_NAME=raptorhtmlpars
DEFINES=-D_IMPL_NS_HTMLPARS -DWIN32_LEAN_AND_MEAN -DXML_DTD
!if defined(MOZ_PERF)
DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS
!endif
MODULE=raptor
REQUIRES=xpcom raptor netlib
IS_COMPONENT = 1

Просмотреть файл

@ -197,7 +197,7 @@ nsParser::nsParser(nsITokenObserver* anObserver) : mCommand(""), mUnusedInput(""
mCharsetSource=kCharsetUninitialized;
mInternalState=NS_OK;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
RAPTOR_STOPWATCH_DEBUGTRACE(("Reset: Parse Time: nsParser::nsParser(), this=%p\n", this));
mParseTime.Reset();
mDTDTime.Reset();
@ -958,7 +958,7 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD, PRBool aIsFinalChunk) {
NS_STOP_STOPWATCH(mParseTime);
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
// XXX Don't print out Gecko layout time till I make the save/restore
// implementation use a stack. We'll calculate page load + layout time
// in the webshell and print that out for now because that is more easy to
@ -1308,7 +1308,7 @@ nsresult nsParser::OnDataAvailable(nsIURI* aURL, nsIInputStream *pIStream, PRUin
NS_PRECONDITION(((eOnStart==mParserContext->mStreamListenerState)||(eOnDataAvail==mParserContext->mStreamListenerState)),kOnStartNotCalled);
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
if (0 == sourceOffset) {
NS_RESET_AND_START_STOPWATCH(mTotalTime);
}

Просмотреть файл

@ -390,7 +390,7 @@ protected:
nsresult mInternalState;
CObserverService mObserverService;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
public:
Stopwatch mTotalTime;
Stopwatch mParseTime;

Просмотреть файл

@ -20,9 +20,6 @@ include <$(DEPTH)/config/config.mak>
DEFINES=-D_IMPL_NS_WEB -DWIN32_LEAN_AND_MEAN
!if defined(MOZ_PERF)
DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS
!endif
MODULE=raptor
CPPSRCS= \

Просмотреть файл

@ -489,7 +489,7 @@ protected:
// if there is no mWindow, this will keep track of the bounds --dwc0001
nsRect mBounds;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
Stopwatch mTotalTime;
#endif
@ -2068,7 +2068,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
mProcessedEndDocumentLoad = PR_FALSE;
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
{
char* url;
nsresult rv = NS_OK;
@ -3296,7 +3296,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
nsresult aStatus,
nsIDocumentLoaderObserver * aWebShell)
{
#ifdef RAPTOR_PERF_METRICS
#ifdef MOZ_PERF_METRICS
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: nsWebShell::OnEndDocumentLoad(), this=%p\n", this));
NS_STOP_STOPWATCH(mTotalTime)
RAPTOR_STOPWATCH_TRACE(("Total (Layout + Page Load) Time (webshell=%p): ", this));