Title: [138336] trunk/Source/WebKit2
Revision
138336
Author
commit-qu...@webkit.org
Date
2012-12-20 18:35:48 -0800 (Thu, 20 Dec 2012)

Log Message

Set timer coalescing policy for WebKit2 processes on Mac until process visible assertion handles it automatically
https://bugs.webkit.org/show_bug.cgi?id=105594

Patch by Kiran Muppala <cmupp...@apple.com> on 2012-12-20
Reviewed by Mark Rowe.

* Shared/mac/ChildProcessMac.mm:
(WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate
for visible applications.
(WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (138335 => 138336)


--- trunk/Source/WebKit2/ChangeLog	2012-12-21 02:18:21 UTC (rev 138335)
+++ trunk/Source/WebKit2/ChangeLog	2012-12-21 02:35:48 UTC (rev 138336)
@@ -1,3 +1,15 @@
+2012-12-20  Kiran Muppala  <cmupp...@apple.com>
+
+        Set timer coalescing policy for WebKit2 processes on Mac until process visible assertion handles it automatically
+        https://bugs.webkit.org/show_bug.cgi?id=105594
+
+        Reviewed by Mark Rowe.
+
+        * Shared/mac/ChildProcessMac.mm:
+        (WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate
+        for visible applications.
+        (WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy.
+
 2012-12-20  Anders Carlsson  <ander...@apple.com>
 
         Stop building WebKit2 for Windows

Modified: trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm (138335 => 138336)


--- trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm	2012-12-21 02:18:21 UTC (rev 138335)
+++ trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm	2012-12-21 02:35:48 UTC (rev 138336)
@@ -44,10 +44,21 @@
 #endif
 }
 
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+static void initializeTimerCoalescingPolicy()
+{
+    // Set task_latency and task_throughput QOS tiers as appropriate for a visible application.
+    struct task_qos_policy qosinfo = { LATENCY_QOS_TIER_0, THROUGHPUT_QOS_TIER_0 };
+    kern_return_t kr = task_policy_set(mach_task_self(), TASK_BASE_QOS_POLICY, (task_policy_t)&qosinfo, TASK_QOS_POLICY_COUNT);
+    ASSERT_UNUSED(kr, kr == KERN_SUCCESS);
+}
+#endif
+
 void ChildProcess::platformInitialize()
 {
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     setpriority(PRIO_DARWIN_PROCESS, 0, 0);
+    initializeTimerCoalescingPolicy();
 #endif
     setApplicationIsOccluded(false);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to