From d86a5e14c25630538608cb29ce2776b0f010604f Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Sun, 9 Aug 1998 20:28:53 +0000 Subject: [PATCH] Added some more timing traces to WinFE. Approved by blythe. --- cmd/winfe/cfe.cpp | 6 ++++++ cmd/winfe/cxabstra.cpp | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cmd/winfe/cfe.cpp b/cmd/winfe/cfe.cpp index d456ed8025e..f9571c9c85d 100644 --- a/cmd/winfe/cfe.cpp +++ b/cmd/winfe/cfe.cpp @@ -34,6 +34,7 @@ extern "C" { #include "httpurl.h" } +#include "timing.h" #ifdef DEBUG_WHITEBOX #include "qa.h" @@ -79,6 +80,7 @@ void CFE_Alert(MWContext *pContext, const char *pMessage) { } void CFE_AllConnectionsComplete(MWContext *pContext) { + TIMING_STOPCLOCK_OBJECT("fe:doc-load", pContext, pContext, "ok"); if(ABSTRACTCX(pContext)->IsDestroyed()) { // Don't allow this to happen if the context has been destroyed... @@ -1174,6 +1176,7 @@ void CFE_GetUrlExitRoutine(URL_Struct *pUrl, int iStatus, MWContext *pContext) // Report any error. if(iStatus < 0 && pUrl->error_msg != NULL) { + TIMING_STOPCLOCK_OBJECT("fe:doc-xfer", pUrl, pContext, "error"); FE_Alert(pContext, pUrl->error_msg); } @@ -1181,9 +1184,12 @@ void CFE_GetUrlExitRoutine(URL_Struct *pUrl, int iStatus, MWContext *pContext) // out from under us while we were displaying the modal dialog box (and in // a sub-dispatch message loop) if (!XP_IsContextInList(pContext)) { + TIMING_STOPCLOCK_OBJECT("fe:doc-xfer", pUrl, pContext, "destroyed"); return; } + TIMING_STOPCLOCK_OBJECT("fe:doc-xfer", pUrl, pContext, "ok"); + #ifdef EDITOR // Do stuff specific to the editor FE_EditorGetUrlExitRoutine(pUrl, iStatus, pContext); diff --git a/cmd/winfe/cxabstra.cpp b/cmd/winfe/cxabstra.cpp index 1d03aa8366e..1ecdfe336af 100755 --- a/cmd/winfe/cxabstra.cpp +++ b/cmd/winfe/cxabstra.cpp @@ -44,6 +44,7 @@ #include "edt.h" #endif /* EDITOR */ #include "mozilla.h" +#include "timing.h" CAbstractCX::CAbstractCX() { // Purpose: Constructor for the abstract base class. @@ -673,8 +674,14 @@ int CAbstractCX::GetUrl(URL_Struct *pUrl, FO_Present_Types iFormatOut, BOOL bRea StartAnimation(); if ( m_cxType == IconCX) iRetval = NET_GetURL(pUrl, iFormatOut, GetContext(), Icon_GetUrlExitRoutine); - else + else { + TIMING_MESSAGE(("begin-document,%08x,%08x,%s", + GetContext(), pUrl, pUrl->address)); + + TIMING_STARTCLOCK_OBJECT("fe:doc-xfer", pUrl); + TIMING_STARTCLOCK_OBJECT("fe:doc-load", GetContext()); iRetval = NET_GetURL(pUrl, iFormatOut, GetContext(), CFE_GetUrlExitRoutine); + } FE_UpdateStopState(GetContext()); winfeInProcessNet = iOldInProcessNet;