Title: [282561] trunk/Source/bmalloc
Revision
282561
Author
fpi...@apple.com
Date
2021-09-16 11:07:01 -0700 (Thu, 16 Sep 2021)

Log Message

Stub out the footprint() API when libpas is in use
https://bugs.webkit.org/show_bug.cgi?id=230362

Reviewed by Yusuke Suzuki.

The Gigacage's footprint API is called from some test-only code in JSC, evidently to no
meaningful effect. It's possible for libpas to support such an API but it currently
doesn't. So, stub it out. To my knowledge we don't actually use this API for anything
other than tests, and even tests seem to use it only in the sense that they expect to be
able to call it without crashing.

* bmalloc/Gigacage.cpp:
(Gigacage::footprint):

Modified Paths

Diff

Modified: trunk/Source/bmalloc/ChangeLog (282560 => 282561)


--- trunk/Source/bmalloc/ChangeLog	2021-09-16 17:32:46 UTC (rev 282560)
+++ trunk/Source/bmalloc/ChangeLog	2021-09-16 18:07:01 UTC (rev 282561)
@@ -1,3 +1,19 @@
+2021-09-16  Filip Pizlo  <fpi...@apple.com>
+
+        Stub out the footprint() API when libpas is in use
+        https://bugs.webkit.org/show_bug.cgi?id=230362
+
+        Reviewed by Yusuke Suzuki.
+
+        The Gigacage's footprint API is called from some test-only code in JSC, evidently to no
+        meaningful effect. It's possible for libpas to support such an API but it currently
+        doesn't. So, stub it out. To my knowledge we don't actually use this API for anything
+        other than tests, and even tests seem to use it only in the sense that they expect to be
+        able to call it without crashing.
+
+        * bmalloc/Gigacage.cpp:
+        (Gigacage::footprint):
+
 2021-09-09  Filip Pizlo  <fpi...@apple.com>
 
         [libpas] Update to 38b9b0b92ccc9628627c742523de6200acc08211 and fully enable on AS

Modified: trunk/Source/bmalloc/bmalloc/Gigacage.cpp (282560 => 282561)


--- trunk/Source/bmalloc/bmalloc/Gigacage.cpp	2021-09-16 17:32:46 UTC (rev 282560)
+++ trunk/Source/bmalloc/bmalloc/Gigacage.cpp	2021-09-16 18:07:01 UTC (rev 282561)
@@ -323,7 +323,12 @@
 
 size_t footprint(Kind kind)
 {
+#if BUSE(LIBPAS)
+    BUNUSED(kind);
+    return 0;
+#else
     return PerProcess<PerHeapKind<Heap>>::get()->at(heapKind(kind)).footprint();
+#endif
 }
 
 } // namespace Gigacage
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to