[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:37:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d2d4b88b589fca3621a844f46cdb58d4bce79249
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Apr 14 21:43:09 2003 +0000

    	Log time spent loading each plug-in.
    
            Reviewed by mjs.
    
            * Misc.subproj/WebIconDatabase.m:
            (-[WebIconDatabase _iconsForIconURLString:]): fixed logging code
            (-[WebIconDatabase _scaleIcon:toSize:]): fixed logging code
            * Plugins.subproj/WebNetscapePluginPackage.m:
            (-[WebNetscapePluginPackage load]): log time spent loading a plug-in
            * Plugins.subproj/WebPluginController.m:
            (-[WebPluginController startAllPlugins]): only log if there are plug-ins to start
            (-[WebPluginController stopAllPlugins]): only log if there are plug-ins to stop
            (-[WebPluginController destroyAllPlugins]): only log if there are plug-ins to destroy
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4102 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index bb0660d..a680e37 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2003-04-14  Chris Blumenberg  <cblu at apple.com>
+
+	Log time spent loading each plug-in.
+
+        Reviewed by mjs.
+
+        * Misc.subproj/WebIconDatabase.m:
+        (-[WebIconDatabase _iconsForIconURLString:]): fixed logging code
+        (-[WebIconDatabase _scaleIcon:toSize:]): fixed logging code
+        * Plugins.subproj/WebNetscapePluginPackage.m:
+        (-[WebNetscapePluginPackage load]): log time spent loading a plug-in
+        * Plugins.subproj/WebPluginController.m:
+        (-[WebPluginController startAllPlugins]): only log if there are plug-ins to start
+        (-[WebPluginController stopAllPlugins]): only log if there are plug-ins to stop
+        (-[WebPluginController destroyAllPlugins]): only log if there are plug-ins to destroy
+
 2003-04-13  Trey Matteson  <trey at apple.com>
 
 	3150693 - open new window on "same page" doesn't give me the same frame content
diff --git a/WebKit/Misc.subproj/WebIconDatabase.m b/WebKit/Misc.subproj/WebIconDatabase.m
index bf07eaf..540c5b7 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.m
+++ b/WebKit/Misc.subproj/WebIconDatabase.m
@@ -392,7 +392,7 @@ NSSize WebIconLargeSize = {128, 128};
     }
 
     
-#if LOG_ENABLED         
+#if !LOG_DISABLED         
     double start = CFAbsoluteTimeGetCurrent();
 #endif
     NSData *iconData = [_private->fileDatabase objectForKey:iconURLString];
@@ -407,7 +407,7 @@ NSSize WebIconLargeSize = {128, 128};
 	icons = [self _iconsBySplittingRepresentationsOfIcon:icon];
 	
 	if(icons){
-#if LOG_ENABLED 
+#if !LOG_DISABLED 
 	    double duration = CFAbsoluteTimeGetCurrent() - start;
 	    LOG(Timing, "loading and creating icon %@ took %f seconds", iconURLString, duration);
 #endif
@@ -725,14 +725,14 @@ NSSize WebIconLargeSize = {128, 128};
     ASSERT(size.width);
     ASSERT(size.height);
     
-#if LOG_ENABLED        
+#if !LOG_DISABLED        
     double start = CFAbsoluteTimeGetCurrent();
 #endif
     
     [icon setScalesWhenResized:YES];
     [icon setSize:size];
     
-#if LOG_ENABLED
+#if !LOG_DISABLED
     double duration = CFAbsoluteTimeGetCurrent() - start;
     LOG(Timing, "scaling icon took %f seconds.", duration);
 #endif
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginPackage.m b/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
index 6fd5fe1..22ffba7 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
@@ -321,16 +321,25 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
     NPError npErr;
     OSErr err;
 
+#if !LOG_DISABLED
+    CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
+#endif
+    LOG(Plugins, "%f Load timing started for: %@", start, [self name]);
+
     if (isLoaded) {
         return YES;
     }
-    
+
     if (isBundle) {
         CFBundleRef cfBundle = [bundle _cfBundle];
         if (!CFBundleLoadExecutable(cfBundle)) {
             goto abort;
         }
-        
+#if !LOG_DISABLED
+        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
+        CFAbsoluteTime duration = currentTime - start;
+#endif
+        LOG(Plugins, "%f CFBundleLoadExecutable took %f seconds", currentTime, duration);
         isLoaded = YES;
         
         if (isCFM) {
@@ -367,7 +376,11 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
             ERROR("GetDiskFragment failed. Error=%d", err);
             goto abort;
         }
-        
+#if !LOG_DISABLED
+        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
+        CFAbsoluteTime duration = currentTime - start;
+#endif
+        LOG(Plugins, "%f GetDiskFragment took %f seconds", currentTime, duration);
         isLoaded = YES;
         
         pluginMainFunc = (MainFuncPtr)functionPointerForTVector((TransitionVector)pluginMainFunc);
@@ -410,11 +423,20 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
         browserFuncs.getJavaEnv = (NPN_GetJavaEnvProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetJavaEnv);
         browserFuncs.getJavaPeer = (NPN_GetJavaPeerProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetJavaPeer);
 
+#if !LOG_DISABLED
+        CFAbsoluteTime mainStart = CFAbsoluteTimeGetCurrent();
+#endif
+        LOG(Plugins, "%f main timing started", mainStart);
         npErr = pluginMainFunc(&browserFuncs, &pluginFuncs, &NPP_Shutdown);
         if (npErr != NPERR_NO_ERROR) {
             [self unload];
             return NO;
         }
+#if !LOG_DISABLED
+        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
+        CFAbsoluteTime duration = currentTime - mainStart;
+#endif
+        LOG(Plugins, "%f main took %f seconds", currentTime, duration);
         
         pluginSize = pluginFuncs.size;
         pluginVersion = pluginFuncs.version;
@@ -459,11 +481,21 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
         browserFuncs.getJavaEnv = NPN_GetJavaEnv;
         browserFuncs.getJavaPeer = NPN_GetJavaPeer;
 
+#if !LOG_DISABLED
+        CFAbsoluteTime initializeStart = CFAbsoluteTimeGetCurrent();
+#endif
+        LOG(Plugins, "%f NP_Initialize timing started", initializeStart);
         npErr = NP_Initialize(&browserFuncs);
         if (npErr != NPERR_NO_ERROR) {
             [self unload];
             return NO;
         }
+#if !LOG_DISABLED
+        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
+        CFAbsoluteTime duration = currentTime - initializeStart;
+#endif
+        LOG(Plugins, "%f NP_Initialize took %f seconds", currentTime, duration);
+
         npErr = NP_GetEntryPoints(&pluginFuncs);
         if (npErr != NPERR_NO_ERROR) {
             [self unload];
@@ -487,8 +519,13 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
         NPP_GetValue = pluginFuncs.getvalue;
         NPP_SetValue = pluginFuncs.setvalue;
     }
-    
-    LOG(Plugins, "Plugin Loaded");
+
+#if !LOG_DISABLED
+    CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
+    CFAbsoluteTime duration = currentTime - start;
+#endif
+    LOG(Plugins, "%f Total load time: %f seconds", currentTime, duration);
+
     return YES;
 
 abort:
diff --git a/WebKit/Plugins.subproj/WebPluginController.m b/WebKit/Plugins.subproj/WebPluginController.m
index c53028f..9c4f8d9 100644
--- a/WebKit/Plugins.subproj/WebPluginController.m
+++ b/WebKit/Plugins.subproj/WebPluginController.m
@@ -37,8 +37,10 @@
         return;
     }
     
-    LOG(Plugins, "starting all plugins");
-
+    if ([_views count] > 0) {
+        LOG(Plugins, "starting WebKit plugins : %@", [_views description]);
+    }
+    
     [_views makeObjectsPerformSelector:@selector(pluginStart)];
     _started = YES;
 }
@@ -48,9 +50,11 @@
     if (!_started) {
         return;
     }
-    
-    LOG(Plugins, "stopping all plugins");
 
+    if ([_views count] > 0) {
+        LOG(Plugins, "stopping WebKit plugins: %@", [_views description]);
+    }
+    
     [_views makeObjectsPerformSelector:@selector(pluginStop)];
     _started = NO;
 }
@@ -76,10 +80,13 @@
 }
 
 - (void)destroyAllPlugins
-{
-    LOG(Plugins, "destroying all plug-ins");
-    
+{    
     [self stopAllPlugins];
+
+    if ([_views count] > 0) {
+        LOG(Plugins, "destroying WebKit plugins: %@", [_views description]);
+    }
+    
     [_views makeObjectsPerformSelector:@selector(removeFromSuperviewWithoutNeedingDisplay)];
     [_views makeObjectsPerformSelector:@selector(pluginDestroy)];
     [_views release];
diff --git a/WebKit/Plugins.subproj/WebPluginPackage.m b/WebKit/Plugins.subproj/WebPluginPackage.m
index 6a0eb98..8549a9a 100644
--- a/WebKit/Plugins.subproj/WebPluginPackage.m
+++ b/WebKit/Plugins.subproj/WebPluginPackage.m
@@ -8,6 +8,8 @@
 
 #import <WebKit/WebPluginPackage.h>
 
+#import <WebKit/WebKitLogging.h>
+
 #import <Foundation/NSBundle_Private.h>
 
 @implementation WebPluginPackage
@@ -44,7 +46,20 @@
 
 - (BOOL)load
 {
+#if !LOG_DISABLED
+    BOOL wasLoaded = [self isLoaded];
+    CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
+#endif
+    
     [bundle principalClass];
+
+#if !LOG_DISABLED
+    if (!wasLoaded) {
+        CFAbsoluteTime duration = CFAbsoluteTimeGetCurrent() - start;
+        LOG(Plugins, "principalClass took %f seconds for: %@", duration, [self name]);
+    }
+#endif
+   
     return YES;
 }
 
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index a1c1133..ac767a8 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -587,6 +587,8 @@
         nil];
 
     LOG(Plugins, "arguments:\n%@", arguments);
+
+    [pluginPackage load];
     
     return [[pluginPackage viewFactory] pluginViewWithArguments:arguments];
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list