Title: [184203] trunk/Source/WebKit2
Revision
184203
Author
[email protected]
Date
2015-05-12 09:25:32 -0700 (Tue, 12 May 2015)

Log Message

ChildProcess should take an os_activity
https://bugs.webkit.org/show_bug.cgi?id=141781

Reviewed by Ryosuke Niwa.

* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(PluginServiceInitializer):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
Start an os_activity in the initializer for each XPC service.

* config.h:
Add HAVE_OS_ACTIVITY where available.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (184202 => 184203)


--- trunk/Source/WebKit2/ChangeLog	2015-05-12 14:31:05 UTC (rev 184202)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-12 16:25:32 UTC (rev 184203)
@@ -1,3 +1,23 @@
+2015-05-11  Sam Weinig  <[email protected]>
+
+        ChildProcess should take an os_activity
+        https://bugs.webkit.org/show_bug.cgi?id=141781
+
+        Reviewed by Ryosuke Niwa.
+
+        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
+        (DatabaseServiceInitializer):
+        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
+        (NetworkServiceInitializer):
+        * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
+        (PluginServiceInitializer):
+        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
+        (WebContentServiceInitializer):
+        Start an os_activity in the initializer for each XPC service.
+
+        * config.h:
+        Add HAVE_OS_ACTIVITY where available.
+
 2015-05-12  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix GTK+ debug build after r184197.

Modified: trunk/Source/WebKit2/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm (184202 => 184203)


--- trunk/Source/WebKit2/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm	2015-05-12 14:31:05 UTC (rev 184202)
+++ trunk/Source/WebKit2/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm	2015-05-12 16:25:32 UTC (rev 184203)
@@ -30,11 +30,23 @@
 #import "WKBase.h"
 #import "XPCServiceEntryPoint.h"
 
+#if HAVE(OS_ACTIVITY)
+#include <os/activity.h>
+#endif
+
 using namespace WebKit;
 
 extern "C" WK_EXPORT void DatabaseServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage);
 
 void DatabaseServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage)
 {
+#if HAVE(OS_ACTIVITY)
+    os_activity_t activity = os_activity_start("com.apple.WebKit.Databases", OS_ACTIVITY_FLAG_DEFAULT);
+#endif
+
     XPCServiceInitializer<DatabaseProcess, XPCServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage);
+
+#if HAVE(OS_ACTIVITY)
+    os_activity_end(activity);
+#endif
 }

Modified: trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm (184202 => 184203)


--- trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm	2015-05-12 14:31:05 UTC (rev 184202)
+++ trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm	2015-05-12 16:25:32 UTC (rev 184203)
@@ -30,6 +30,10 @@
 #import "WKBase.h"
 #import "XPCServiceEntryPoint.h"
 
+#if HAVE(OS_ACTIVITY)
+#include <os/activity.h>
+#endif
+
 namespace WebKit {
 
 class NetworkServiceInitializerDelegate : public XPCServiceInitializerDelegate {
@@ -53,6 +57,14 @@
     // the this process don't try to insert the shim and crash.
     EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib");
 
+#if HAVE(OS_ACTIVITY)
+    os_activity_t activity = os_activity_start("com.apple.WebKit.Networking", OS_ACTIVITY_FLAG_DEFAULT);
+#endif
+
     XPCServiceInitializer<NetworkProcess, NetworkServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage);
+
+#if HAVE(OS_ACTIVITY)
+    os_activity_end(activity);
 #endif
+#endif
 }

Modified: trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm (184202 => 184203)


--- trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm	2015-05-12 14:31:05 UTC (rev 184202)
+++ trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm	2015-05-12 16:25:32 UTC (rev 184203)
@@ -31,6 +31,10 @@
 #import "XPCServiceEntryPoint.h"
 #import <wtf/RunLoop.h>
 
+#if HAVE(OS_ACTIVITY)
+#include <os/activity.h>
+#endif
+
 #if ENABLE(NETSCAPE_PLUGIN_API)
 
 namespace WebKit {
@@ -76,6 +80,14 @@
     // spawned by the PluginProcess don't try to insert the shim and crash.
     EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/PluginProcessShim.dylib");
 
+#if HAVE(OS_ACTIVITY)
+    os_activity_t activity = os_activity_start("com.apple.WebKit.Plugin", OS_ACTIVITY_FLAG_DEFAULT);
+#endif
+
     XPCServiceInitializer<PluginProcess, PluginServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage);
+
+#if HAVE(OS_ACTIVITY)
+    os_activity_end(activity);
+#endif
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 }

Modified: trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm (184202 => 184203)


--- trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm	2015-05-12 14:31:05 UTC (rev 184202)
+++ trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm	2015-05-12 16:25:32 UTC (rev 184203)
@@ -36,6 +36,10 @@
 #import <WebCore/WebCoreThreadSystemInterface.h>
 #endif
 
+#if HAVE(OS_ACTIVITY)
+#include <os/activity.h>
+#endif
+
 using namespace WebCore;
 using namespace WebKit;
 
@@ -47,10 +51,18 @@
     // the this process don't try to insert the shim and crash.
     EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/WebProcessShim.dylib");
 
+#if HAVE(OS_ACTIVITY)
+    os_activity_t activity = os_activity_start("com.apple.WebKit.WebContent", OS_ACTIVITY_FLAG_DEFAULT);
+#endif
+
 #if PLATFORM(IOS)
     GSInitialize();
     InitWebCoreThreadSystemInterface();
 #endif // PLATFORM(IOS)
 
     XPCServiceInitializer<WebProcess, XPCServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage);
+
+#if HAVE(OS_ACTIVITY)
+    os_activity_end(activity);
+#endif
 }

Modified: trunk/Source/WebKit2/config.h (184202 => 184203)


--- trunk/Source/WebKit2/config.h	2015-05-12 14:31:05 UTC (rev 184202)
+++ trunk/Source/WebKit2/config.h	2015-05-12 16:25:32 UTC (rev 184203)
@@ -81,6 +81,12 @@
 #endif
 #endif
 
+#ifndef HAVE_OS_ACTIVITY
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000)
+#define HAVE_OS_ACTIVITY 1
+#endif
+#endif
+
 #ifndef ENABLE_NETWORK_CACHE
 #if ENABLE(NETWORK_PROCESS) && (PLATFORM(COCOA) || PLATFORM(GTK))
 #define ENABLE_NETWORK_CACHE 1
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to