Title: [94115] trunk/Source/WebKit2
Revision
94115
Author
[email protected]
Date
2011-08-30 15:09:21 -0700 (Tue, 30 Aug 2011)

Log Message

Laying some groundwork to fetch performance statistics from WebProcess.
https://bugs.webkit.org/show_bug.cgi?id=67160

Reviewed by Darin Adler.

Add WKContextGetStatistics() which sends a message to WebProcess to fetch the performance statistics.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetStatistics):
* UIProcess/API/C/WKContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::getWebCoreStatistics):
(WebKit::WebContext::didGetWebCoreStatistics):
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in: Add the DidGetWebCoreStatistics message that WebProcess can send when it has
the performance statistics ready.

Add WebProcess::getWebCoreStatistics().  Currently it just sends back an empty StatisticsData object.
It will gather the performance statistics to store in the StatisticsData object in a future patch.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWebCoreStatistics):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Add the skeleton for StatisticsData.
* Scripts/webkit2/messages.py:
* Shared/StatisticsData.cpp: Added.
(WebKit::StatisticsData::encode):
(WebKit::StatisticsData::decode):
(WebKit::StatisticsData::StatisticsData):
* Shared/StatisticsData.h: Added.

Add StatisticsData.h/cpp to project.
* CMakeLists.txt:
* GNUmakefile.am:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/CMakeLists.txt (94114 => 94115)


--- trunk/Source/WebKit2/CMakeLists.txt	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/CMakeLists.txt	2011-08-30 22:09:21 UTC (rev 94115)
@@ -150,6 +150,7 @@
 
     Shared/SecurityOriginData.cpp
     Shared/SessionState.cpp
+    Shared/StatisticsData.cpp
     Shared/UpdateInfo.cpp
     Shared/VisitedLinkTable.cpp
     Shared/WebBackForwardListItem.cpp

Modified: trunk/Source/WebKit2/ChangeLog (94114 => 94115)


--- trunk/Source/WebKit2/ChangeLog	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/ChangeLog	2011-08-30 22:09:21 UTC (rev 94115)
@@ -1,3 +1,44 @@
+2011-08-30  Ada Chan  <[email protected]>
+
+        Laying some groundwork to fetch performance statistics from WebProcess.
+        https://bugs.webkit.org/show_bug.cgi?id=67160
+
+        Reviewed by Darin Adler.
+
+        Add WKContextGetStatistics() which sends a message to WebProcess to fetch the performance statistics.
+        * UIProcess/API/C/WKContext.cpp:
+        (WKContextGetStatistics):
+        * UIProcess/API/C/WKContext.h:
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::~WebContext):
+        (WebKit::WebContext::getWebCoreStatistics):
+        (WebKit::WebContext::didGetWebCoreStatistics):
+        * UIProcess/WebContext.h:
+        * UIProcess/WebContext.messages.in: Add the DidGetWebCoreStatistics message that WebProcess can send when it has
+        the performance statistics ready.
+
+        Add WebProcess::getWebCoreStatistics().  Currently it just sends back an empty StatisticsData object.
+        It will gather the performance statistics to store in the StatisticsData object in a future patch.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::getWebCoreStatistics):
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+
+        Add the skeleton for StatisticsData.
+        * Scripts/webkit2/messages.py:
+        * Shared/StatisticsData.cpp: Added.
+        (WebKit::StatisticsData::encode):
+        (WebKit::StatisticsData::decode):
+        (WebKit::StatisticsData::StatisticsData):
+        * Shared/StatisticsData.h: Added.
+
+        Add StatisticsData.h/cpp to project.
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * WebKit2.pro:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * win/WebKit2.vcproj:
+
 2011-08-29  Alexey Proskuryakov  <[email protected]>
 
         DumpRenderTree should begin each test with an empty cookie store

Modified: trunk/Source/WebKit2/GNUmakefile.am (94114 => 94115)


--- trunk/Source/WebKit2/GNUmakefile.am	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/GNUmakefile.am	2011-08-30 22:09:21 UTC (rev 94115)
@@ -316,6 +316,8 @@
 	Source/WebKit2/Shared/SecurityOriginData.cpp \
 	Source/WebKit2/Shared/SessionState.cpp \
 	Source/WebKit2/Shared/SessionState.h \
+	Source/WebKit2/Shared/StatisticsData.cpp \
+	Source/WebKit2/Shared/StatisticsData.h \
 	Source/WebKit2/Shared/StringPairVector.h \
 	Source/WebKit2/Shared/TextCheckerState.h \
 	Source/WebKit2/Shared/UserMessageCoders.h \

Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (94114 => 94115)


--- trunk/Source/WebKit2/Scripts/webkit2/messages.py	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages.py	2011-08-30 22:09:21 UTC (rev 94115)
@@ -285,6 +285,7 @@
         'WebKit::PluginProcessCreationParameters',
         'WebKit::PrintInfo',
         'WebKit::SecurityOriginData',
+        'WebKit::StatisticsData',
         'WebKit::TextCheckerState',
         'WebKit::WebNavigationDataStore',
         'WebKit::WebOpenPanelParameters::Data',

Added: trunk/Source/WebKit2/Shared/StatisticsData.cpp (0 => 94115)


--- trunk/Source/WebKit2/Shared/StatisticsData.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/StatisticsData.cpp	2011-08-30 22:09:21 UTC (rev 94115)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "StatisticsData.h"
+
+#include "WebCoreArgumentCoders.h"
+
+namespace WebKit {
+
+void StatisticsData::encode(CoreIPC::ArgumentEncoder* encoder) const
+{
+    // FIXME: To be implemented.
+}
+
+bool StatisticsData::decode(CoreIPC::ArgumentDecoder* decoder, StatisticsData& statisticsData)
+{
+    // FIXME: To be implemented.
+    return true;
+}
+
+StatisticsData::StatisticsData()
+{    
+    // FIXME: To be implemented.
+}
+
+} // namespace WebKit

Added: trunk/Source/WebKit2/Shared/StatisticsData.h (0 => 94115)


--- trunk/Source/WebKit2/Shared/StatisticsData.h	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/StatisticsData.h	2011-08-30 22:09:21 UTC (rev 94115)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef StatisticsData_h
+#define StatisticsData_h
+
+#include "ArgumentDecoder.h"
+#include "ArgumentEncoder.h"
+
+namespace WebKit {
+
+struct StatisticsData {
+    void encode(CoreIPC::ArgumentEncoder*) const;
+    static bool decode(CoreIPC::ArgumentDecoder*, StatisticsData&);
+    
+    StatisticsData();
+};
+
+} // namespace WebKit
+
+#endif // StatisticsData_h

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp (94114 => 94115)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp	2011-08-30 22:09:21 UTC (rev 94115)
@@ -232,3 +232,8 @@
     toImpl(contextRef)->warmInitialProcess();
 }
 
+void WKContextGetStatistics(WKContextRef contextRef, void* context, WKContextGetStatisticsFunction callback)
+{
+    toImpl(contextRef)->getWebCoreStatistics(DictionaryCallback::create(context, callback));    
+}
+

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.h (94114 => 94115)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.h	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.h	2011-08-30 22:09:21 UTC (rev 94115)
@@ -137,6 +137,9 @@
 WK_EXPORT WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef context);
 WK_EXPORT WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context);
 WK_EXPORT WKResourceCacheManagerRef WKContextGetResourceCacheManager(WKContextRef context);
+    
+typedef void (*WKContextGetStatisticsFunction)(WKDictionaryRef statistics, WKErrorRef error, void* functionContext);
+WK_EXPORT void WKContextGetStatistics(WKContextRef context, void* functionContext, WKContextGetStatisticsFunction function);
 
 #ifdef __cplusplus
 }

Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (94114 => 94115)


--- trunk/Source/WebKit2/UIProcess/WebContext.cpp	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp	2011-08-30 22:09:21 UTC (rev 94115)
@@ -181,6 +181,8 @@
 
     m_resourceCacheManagerProxy->invalidate();
     m_resourceCacheManagerProxy->clearContext();
+    
+    invalidateCallbackMap(m_dictionaryCallbacks);
 
     platformInvalidateContext();
     
@@ -785,4 +787,26 @@
 #endif
 }
 
+void WebContext::getWebCoreStatistics(PassRefPtr<DictionaryCallback> prpCallback)
+{
+    RefPtr<DictionaryCallback> callback = prpCallback;
+    
+    uint64_t callbackID = callback->callbackID();
+    m_dictionaryCallbacks.set(callbackID, callback.get());
+    process()->send(Messages::WebProcess::GetWebCoreStatistics(callbackID), 0);
+}
+
+void WebContext::didGetWebCoreStatistics(const StatisticsData& statisticsData, uint64_t callbackID)
+{
+    RefPtr<DictionaryCallback> callback = m_dictionaryCallbacks.take(callbackID);
+    if (!callback) {
+        // FIXME: Log error or assert.
+        return;
+    }
+     
+    // FIXME: Store statistics data into a dictionary.
+    RefPtr<ImmutableDictionary> statistics = ImmutableDictionary::create();
+    callback->performCallbackWithReturnValue(statistics.get());
+}
+    
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (94114 => 94115)


--- trunk/Source/WebKit2/UIProcess/WebContext.h	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h	2011-08-30 22:09:21 UTC (rev 94115)
@@ -27,6 +27,7 @@
 #define WebContext_h
 
 #include "APIObject.h"
+#include "GenericCallback.h"
 #include "PluginInfoStore.h"
 #include "ProcessModel.h"
 #include "VisitedLinkProvider.h"
@@ -55,7 +56,10 @@
 class WebPageGroup;
 class WebPageProxy;
 class WebResourceCacheManagerProxy;
+struct StatisticsData;
 struct WebProcessCreationParameters;
+    
+typedef GenericCallback<WKDictionaryRef> DictionaryCallback;
 
 class WebContext : public APIObject {
 public:
@@ -175,6 +179,8 @@
     // Defaults to false.
     void setHTTPPipeliningEnabled(bool);
     bool httpPipeliningEnabled();
+    
+    void getWebCoreStatistics(PassRefPtr<DictionaryCallback>);
 
 private:
     WebContext(ProcessModel, const String& injectedBundlePath);
@@ -197,6 +203,8 @@
     void didGetSitesWithPluginData(const Vector<String>& sites, uint64_t callbackID);
     void didClearPluginSiteData(uint64_t callbackID);
 #endif
+    
+    void didGetWebCoreStatistics(const StatisticsData&, uint64_t callbackID);
         
     // Implemented in generated WebContextMessageReceiver.cpp
     void didReceiveWebContextMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
@@ -270,6 +278,8 @@
     String m_overrideLocalStorageDirectory;
 
     bool m_processTerminationEnabled;
+    
+    HashMap<uint64_t, RefPtr<DictionaryCallback> > m_dictionaryCallbacks;
 };
 
 template<typename U> inline bool WebContext::sendToAllProcesses(const U& message)

Modified: trunk/Source/WebKit2/UIProcess/WebContext.messages.in (94114 => 94115)


--- trunk/Source/WebKit2/UIProcess/WebContext.messages.in	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/UIProcess/WebContext.messages.in	2011-08-30 22:09:21 UTC (rev 94115)
@@ -40,4 +40,6 @@
     void DidClearPluginSiteData(uint64_t callbackID)
 #endif
 
+    DidGetWebCoreStatistics(WebKit::StatisticsData statisticsData, uint64_t callbackID)
+
 }

Modified: trunk/Source/WebKit2/WebKit2.pro (94114 => 94115)


--- trunk/Source/WebKit2/WebKit2.pro	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/WebKit2.pro	2011-08-30 22:09:21 UTC (rev 94115)
@@ -135,6 +135,7 @@
     Shared/SameDocumentNavigationType.h \
     Shared/SecurityOriginData.h \
     Shared/SessionState.h \
+    Shared/StatisticsData.h \
     Shared/StringPairVector.h \
     Shared/UpdateInfo.h \
     Shared/UserMessageCoders.h \
@@ -368,6 +369,7 @@
     Shared/PrintInfo.cpp \
     Shared/SecurityOriginData.cpp \
     Shared/SessionState.cpp \
+    Shared/StatisticsData.cpp \
     Shared/UpdateInfo.cpp \
     Shared/VisitedLinkTable.cpp \
     Shared/WebBackForwardListItem.cpp \

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (94114 => 94115)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-08-30 22:09:21 UTC (rev 94115)
@@ -385,6 +385,8 @@
 		51D130551382EAC000351EDD /* SecItemResponseData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D130511382EAC000351EDD /* SecItemResponseData.cpp */; };
 		51D130561382EAC000351EDD /* SecItemResponseData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D130521382EAC000351EDD /* SecItemResponseData.h */; };
 		51D130581382F10500351EDD /* WebProcessProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D130571382F10500351EDD /* WebProcessProxyMac.mm */; };
+		5272B28A1406985D0096A5D0 /* StatisticsData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5272B2881406985D0096A5D0 /* StatisticsData.cpp */; };
+		5272B28B1406985D0096A5D0 /* StatisticsData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5272B2891406985D0096A5D0 /* StatisticsData.h */; };
 		5D51845513BCF9CC00C7FF4A /* APIClientTraits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D51845313BCF9CC00C7FF4A /* APIClientTraits.cpp */; };
 		5D51845613BCF9CC00C7FF4A /* APIClientTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D51845413BCF9CC00C7FF4A /* APIClientTraits.h */; };
 		6501BD1A12F1243400E9F248 /* WKBundleInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65B86F1712F11D7B00B7DD8A /* WKBundleInspector.cpp */; };
@@ -1316,6 +1318,8 @@
 		51D130511382EAC000351EDD /* SecItemResponseData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecItemResponseData.cpp; sourceTree = "<group>"; };
 		51D130521382EAC000351EDD /* SecItemResponseData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecItemResponseData.h; sourceTree = "<group>"; };
 		51D130571382F10500351EDD /* WebProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessProxyMac.mm; sourceTree = "<group>"; };
+		5272B2881406985D0096A5D0 /* StatisticsData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StatisticsData.cpp; sourceTree = "<group>"; };
+		5272B2891406985D0096A5D0 /* StatisticsData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatisticsData.h; sourceTree = "<group>"; };
 		5D51845313BCF9CC00C7FF4A /* APIClientTraits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIClientTraits.cpp; sourceTree = "<group>"; };
 		5D51845413BCF9CC00C7FF4A /* APIClientTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIClientTraits.h; sourceTree = "<group>"; };
 		5DAD7294116FF70B00EE5396 /* WebProcess.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebProcess.xcconfig; sourceTree = "<group>"; };
@@ -2181,6 +2185,8 @@
 				518D2CC912D51DFB003BB93B /* SessionState.h */,
 				1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */,
 				1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */,
+				5272B2881406985D0096A5D0 /* StatisticsData.cpp */,
+				5272B2891406985D0096A5D0 /* StatisticsData.h */,
 				BCBD3C3A125BFA7A00D2C29F /* StringPairVector.h */,
 				1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */,
 				1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */,
@@ -3822,6 +3828,7 @@
 				1A3D610213A7CC2A00F95D4E /* PluginModuleInfo.h in Headers */,
 				5D51845613BCF9CC00C7FF4A /* APIClientTraits.h in Headers */,
 				1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */,
+				5272B28B1406985D0096A5D0 /* StatisticsData.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -4489,6 +4496,7 @@
 				1A3D610113A7CC2A00F95D4E /* PluginModuleInfo.cpp in Sources */,
 				1A3D610513A7F03A00F95D4E /* ArgumentCoders.cpp in Sources */,
 				5D51845513BCF9CC00C7FF4A /* APIClientTraits.cpp in Sources */,
+				5272B28A1406985D0096A5D0 /* StatisticsData.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (94114 => 94115)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2011-08-30 22:09:21 UTC (rev 94115)
@@ -33,6 +33,7 @@
 #include "InjectedBundleUserMessageCoders.h"
 #include "RunLoop.h"
 #include "SandboxExtension.h"
+#include "StatisticsData.h"
 #include "WebApplicationCacheManager.h"
 #include "WebContextMessages.h"
 #include "WebCookieManager.h"
@@ -816,6 +817,15 @@
     m_connection->send(Messages::WebContext::DidClearPluginSiteData(callbackID), 0);
 }
 #endif
+    
+void WebProcess::getWebCoreStatistics(uint64_t callbackID)
+{
+    StatisticsData data;
+    
+    // FIXME: Gather performance data.
+    
+    m_connection->send(Messages::WebContext::DidGetWebCoreStatistics(data, callbackID), 0);
+}
 
 #if ENABLE(PLUGIN_PROCESS)
 void WebProcess::pluginProcessCrashed(const String& pluginPath)

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (94114 => 94115)


--- trunk/Source/WebKit2/WebProcess/WebProcess.h	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h	2011-08-30 22:09:21 UTC (rev 94115)
@@ -176,6 +176,8 @@
     void cancelDownload(uint64_t downloadID);
 
     void setTextCheckerState(const TextCheckerState&);
+    
+    void getWebCoreStatistics(uint64_t callbackID);
 
     // ChildProcess
     virtual bool shouldTerminate();

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.messages.in (94114 => 94115)


--- trunk/Source/WebKit2/WebProcess/WebProcess.messages.in	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.messages.in	2011-08-30 22:09:21 UTC (rev 94115)
@@ -67,4 +67,6 @@
     SetTextCheckerState(WebKit::TextCheckerState textCheckerState)
 
     SetEnhancedAccessibility(bool flag)
+
+    GetWebCoreStatistics(uint64_t callbackID)
 }

Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (94114 => 94115)


--- trunk/Source/WebKit2/win/WebKit2.vcproj	2011-08-30 22:02:52 UTC (rev 94114)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj	2011-08-30 22:09:21 UTC (rev 94115)
@@ -559,6 +559,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\Shared\StatisticsData.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Shared\StatisticsData.h"
+				>
+			</File>
+			<File
 				RelativePath="..\Shared\StringPairVector.h"
 				>
 			</File>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to