Changeset 138336 in webkit


Ignore:
Timestamp:
Dec 20, 2012, 6:35:48 PM (13 years ago)
Author:
commit-queue@webkit.org
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 <cmuppala@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.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r138331 r138336  
     12012-12-20  Kiran Muppala  <cmuppala@apple.com>
     2
     3        Set timer coalescing policy for WebKit2 processes on Mac until process visible assertion handles it automatically
     4        https://bugs.webkit.org/show_bug.cgi?id=105594
     5
     6        Reviewed by Mark Rowe.
     7
     8        * Shared/mac/ChildProcessMac.mm:
     9        (WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate
     10        for visible applications.
     11        (WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy.
     12
    1132012-12-20  Anders Carlsson  <andersca@apple.com>
    214
  • trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm

    r138226 r138336  
    4545}
    4646
     47#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     48static void initializeTimerCoalescingPolicy()
     49{
     50    // Set task_latency and task_throughput QOS tiers as appropriate for a visible application.
     51    struct task_qos_policy qosinfo = { LATENCY_QOS_TIER_0, THROUGHPUT_QOS_TIER_0 };
     52    kern_return_t kr = task_policy_set(mach_task_self(), TASK_BASE_QOS_POLICY, (task_policy_t)&qosinfo, TASK_QOS_POLICY_COUNT);
     53    ASSERT_UNUSED(kr, kr == KERN_SUCCESS);
     54}
     55#endif
     56
    4757void ChildProcess::platformInitialize()
    4858{
    4959#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    5060    setpriority(PRIO_DARWIN_PROCESS, 0, 0);
     61    initializeTimerCoalescingPolicy();
    5162#endif
    5263    setApplicationIsOccluded(false);
Note: See TracChangeset for help on using the changeset viewer.