- Revision
- 281221
- Author
- ddkil...@apple.com
- Date
- 2021-08-18 20:40:37 -0700 (Wed, 18 Aug 2021)
Log Message
Bug 229265: run-webkit-tests --leaks should check for leaks in the GPU process
<https://webkit.org/b/229265>
<rdar://problem/82101453>
Reviewed by Alex Christensen.
Source/WebKit:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetGPUProcessIdentifier): Add.
* UIProcess/API/C/WKPagePrivate.h:
(WKPageGetGPUProcessIdentifier): Add.
- Add function to return the PID for the GPU process.
Tools:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::findAndDumpWebKitProcessIdentifiers):
- Include the GPU process PID if it's enabled when sending a
list of PIDs back to run-webkit-tests.
(WTR::TestController::gpuProcessName): Add.
* WebKitTestRunner/TestController.h:
(WTR::TestController::databaseProcessName): Delete.
- The implementation was removed a while ago.
(WTR::TestController::gpuProcessName): Add.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (281220 => 281221)
--- trunk/Source/WebKit/ChangeLog 2021-08-19 03:34:19 UTC (rev 281220)
+++ trunk/Source/WebKit/ChangeLog 2021-08-19 03:40:37 UTC (rev 281221)
@@ -1,3 +1,17 @@
+2021-08-18 David Kilzer <ddkil...@apple.com>
+
+ Bug 229265: run-webkit-tests --leaks should check for leaks in the GPU process
+ <https://webkit.org/b/229265>
+ <rdar://problem/82101453>
+
+ Reviewed by Alex Christensen.
+
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageGetGPUProcessIdentifier): Add.
+ * UIProcess/API/C/WKPagePrivate.h:
+ (WKPageGetGPUProcessIdentifier): Add.
+ - Add function to return the PID for the GPU process.
+
2021-08-18 Megan Gardner <megan_gard...@apple.com>
Remove unneeded UIKitSPI declarations
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (281220 => 281221)
--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2021-08-19 03:34:19 UTC (rev 281220)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2021-08-19 03:40:37 UTC (rev 281221)
@@ -3023,6 +3023,18 @@
return toImpl(page)->processIdentifier();
}
+ProcessID WKPageGetGPUProcessIdentifier(WKPageRef page)
+{
+#if ENABLE(GPU_PROCESS)
+ auto* gpuProcess = toImpl(page)->process().processPool().gpuProcess();
+ if (!gpuProcess)
+ return 0;
+ return gpuProcess->processIdentifier();
+#else
+ return 0;
+#endif
+}
+
#ifdef __BLOCKS__
void WKPageGetApplicationManifest_b(WKPageRef pageRef, WKPageGetApplicationManifestBlock block)
{
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h (281220 => 281221)
--- trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h 2021-08-19 03:34:19 UTC (rev 281220)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h 2021-08-19 03:40:37 UTC (rev 281221)
@@ -163,6 +163,7 @@
WK_EXPORT void WKPageSetIgnoresViewportScaleLimits(WKPageRef page, bool ignoresViewportScaleLimits);
WK_EXPORT WKProcessID WKPageGetProcessIdentifier(WKPageRef page);
+WK_EXPORT WKProcessID WKPageGetGPUProcessIdentifier(WKPageRef page);
#ifdef __BLOCKS__
typedef void (^WKPageGetApplicationManifestBlock)(void);
Modified: trunk/Tools/ChangeLog (281220 => 281221)
--- trunk/Tools/ChangeLog 2021-08-19 03:34:19 UTC (rev 281220)
+++ trunk/Tools/ChangeLog 2021-08-19 03:40:37 UTC (rev 281221)
@@ -1,3 +1,21 @@
+2021-08-18 David Kilzer <ddkil...@apple.com>
+
+ Bug 229265: run-webkit-tests --leaks should check for leaks in the GPU process
+ <https://webkit.org/b/229265>
+ <rdar://problem/82101453>
+
+ Reviewed by Alex Christensen.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::findAndDumpWebKitProcessIdentifiers):
+ - Include the GPU process PID if it's enabled when sending a
+ list of PIDs back to run-webkit-tests.
+ (WTR::TestController::gpuProcessName): Add.
+ * WebKitTestRunner/TestController.h:
+ (WTR::TestController::databaseProcessName): Delete.
+ - The implementation was removed a while ago.
+ (WTR::TestController::gpuProcessName): Add.
+
2021-08-18 Jonathan Bedard <jbed...@apple.com>
[run-webkit-tests] Remember failures when repeating test
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (281220 => 281221)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2021-08-19 03:34:19 UTC (rev 281220)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2021-08-19 03:40:37 UTC (rev 281221)
@@ -1126,10 +1126,17 @@
void TestController::findAndDumpWebKitProcessIdentifiers()
{
#if PLATFORM(COCOA)
- dumpResponse(makeString(TestController::webProcessName(), ": ",
- WKPageGetProcessIdentifier(TestController::singleton().mainWebView()->page()), '\n',
- TestController::networkProcessName(), ": ",
- WKWebsiteDataStoreGetNetworkProcessIdentifier(websiteDataStore()), '\n'));
+ auto page = TestController::singleton().mainWebView()->page();
+ dumpResponse(makeString(
+ TestController::webProcessName(), ": "
+ , WKPageGetProcessIdentifier(page), '\n'
+ , TestController::networkProcessName(), ": "
+ , WKWebsiteDataStoreGetNetworkProcessIdentifier(websiteDataStore()), '\n'
+#if ENABLE(GPU_PROCESS)
+ , TestController::gpuProcessName(), ": "
+ , WKPageGetGPUProcessIdentifier(page), '\n'
+#endif
+ ));
#else
dumpResponse("\n"_s);
#endif
@@ -1214,6 +1221,18 @@
#endif
}
+const char* TestController::gpuProcessName()
+{
+ // FIXME: Find a way to not hardcode the process name.
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)
+ return "com.apple.WebKit.GPU";
+#elif PLATFORM(COCOA)
+ return "com.apple.WebKit.GPU.Development";
+#else
+ return "GPUProcess";
+#endif
+}
+
#if !PLATFORM(COCOA)
void TestController::setAllowsAnySSLCertificate(bool allows)
Modified: trunk/Tools/WebKitTestRunner/TestController.h (281220 => 281221)
--- trunk/Tools/WebKitTestRunner/TestController.h 2021-08-19 03:34:19 UTC (rev 281220)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2021-08-19 03:40:37 UTC (rev 281221)
@@ -172,7 +172,7 @@
static const char* webProcessName();
static const char* networkProcessName();
- static const char* databaseProcessName();
+ static const char* gpuProcessName();
WorkQueueManager& workQueueManager() { return m_workQueueManager; }