Web Inspector: JSC Sampling Profiler thread not getting subtracted in CPU Usage Timeline
authorpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Mar 2019 16:38:17 +0000 (16:38 +0000)
committerpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Mar 2019 16:38:17 +0000 (16:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196419
<rdar://problem/49444023>

Reviewed by Devin Rousso.

* page/ResourceUsageThread.cpp:
(WebCore::ResourceUsageThread::addObserver):
We forgot to call the function that would setup platform state
allowing us to subtract out the sampling profiler thread.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243679 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/ResourceUsageThread.cpp

index 12784dc..90b2ea5 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-30  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: JSC Sampling Profiler thread not getting subtracted in CPU Usage Timeline
+        https://bugs.webkit.org/show_bug.cgi?id=196419
+        <rdar://problem/49444023>
+
+        Reviewed by Devin Rousso.
+
+        * page/ResourceUsageThread.cpp:
+        (WebCore::ResourceUsageThread::addObserver):
+        We forgot to call the function that would setup platform state
+        allowing us to subtract out the sampling profiler thread.
+
 2019-03-30  Zalan Bujtas  <zalan@apple.com>
 
         [ContentChangeObserver] Add iFrame elements to the list of "considered clickable" elements.
index 5036260..022d64b 100644 (file)
@@ -58,8 +58,10 @@ void ResourceUsageThread::addObserver(void* key, ResourceUsageCollectionMode mod
 
         resourceUsageThread.recomputeCollectionMode();
 
-        if (wasEmpty)
+        if (wasEmpty) {
+            resourceUsageThread.platformSaveStateBeforeStarting();
             resourceUsageThread.m_condition.notifyAll();
+        }
     }
 }