Title: [277118] trunk/Source/_javascript_Core
Revision
277118
Author
fpi...@apple.com
Date
2021-05-06 13:55:29 -0700 (Thu, 06 May 2021)

Log Message

Make some things easier to dataLog in wasm
https://bugs.webkit.org/show_bug.cgi?id=225472

Reviewed by Yusuke Suzuki.

* wasm/WasmMemoryMode.cpp:
(WTF::printInternal):
* wasm/WasmMemoryMode.h:
* wasm/WasmWorklist.cpp:
(JSC::Wasm::Worklist::dump const):
* wasm/WasmWorklist.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (277117 => 277118)


--- trunk/Source/_javascript_Core/ChangeLog	2021-05-06 20:54:16 UTC (rev 277117)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-05-06 20:55:29 UTC (rev 277118)
@@ -1,5 +1,19 @@
 2021-05-06  Filip Pizlo  <fpi...@apple.com>
 
+        Make some things easier to dataLog in wasm
+        https://bugs.webkit.org/show_bug.cgi?id=225472
+
+        Reviewed by Yusuke Suzuki.
+
+        * wasm/WasmMemoryMode.cpp:
+        (WTF::printInternal):
+        * wasm/WasmMemoryMode.h:
+        * wasm/WasmWorklist.cpp:
+        (JSC::Wasm::Worklist::dump const):
+        * wasm/WasmWorklist.h:
+
+2021-05-06  Filip Pizlo  <fpi...@apple.com>
+
         Reduce use of dmb ish on ARM64
         https://bugs.webkit.org/show_bug.cgi?id=225465
 

Modified: trunk/Source/_javascript_Core/wasm/WasmMemoryMode.cpp (277117 => 277118)


--- trunk/Source/_javascript_Core/wasm/WasmMemoryMode.cpp	2021-05-06 20:54:16 UTC (rev 277117)
+++ trunk/Source/_javascript_Core/wasm/WasmMemoryMode.cpp	2021-05-06 20:55:29 UTC (rev 277118)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2021 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -29,6 +29,7 @@
 #if ENABLE(WEBASSEMBLY)
 
 #include <wtf/Assertions.h>
+#include <wtf/PrintStream.h>
 
 namespace JSC { namespace Wasm {
 
@@ -54,4 +55,18 @@
 
 } } // namespace JSC::Wasm
 
+namespace WTF {
+
+void printInternal(PrintStream& out, JSC::Wasm::MemoryMode mode)
+{
+    out.print(JSC::Wasm::makeString(mode));
+}
+
+void printInternal(PrintStream& out, JSC::Wasm::MemorySharingMode mode)
+{
+    out.print(JSC::Wasm::makeString(mode));
+}
+
+} // namespace WTF
+
 #endif // ENABLE(WEBASSEMBLY)

Modified: trunk/Source/_javascript_Core/wasm/WasmMemoryMode.h (277117 => 277118)


--- trunk/Source/_javascript_Core/wasm/WasmMemoryMode.h	2021-05-06 20:54:16 UTC (rev 277117)
+++ trunk/Source/_javascript_Core/wasm/WasmMemoryMode.h	2021-05-06 20:55:29 UTC (rev 277118)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2021 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,4 +49,12 @@
 
 } } // namespace JSC::Wasm
 
+namespace WTF {
+
+class PrintStream;
+void printInternal(PrintStream&, JSC::Wasm::MemoryMode);
+void printInternal(PrintStream&, JSC::Wasm::MemorySharingMode);
+
+} // namespace WTF
+
 #endif // ENABLE(WEBASSEMBLY)

Modified: trunk/Source/_javascript_Core/wasm/WasmWorklist.cpp (277117 => 277118)


--- trunk/Source/_javascript_Core/wasm/WasmWorklist.cpp	2021-05-06 20:54:16 UTC (rev 277117)
+++ trunk/Source/_javascript_Core/wasm/WasmWorklist.cpp	2021-05-06 20:55:29 UTC (rev 277118)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2021 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,6 +49,11 @@
     RELEASE_ASSERT_NOT_REACHED();
 }
 
+void Worklist::dump(PrintStream& out) const
+{
+    out.print("Queue Size = ", m_queue.size());
+}
+
 // The Thread class is designed to prevent threads from blocking when there is still work
 // in the queue. Wasm's Plans have some phases, Validiation, Preparation, and Completion,
 // that can only be done by one thread, and another phase, Compilation, that can be done

Modified: trunk/Source/_javascript_Core/wasm/WasmWorklist.h (277117 => 277118)


--- trunk/Source/_javascript_Core/wasm/WasmWorklist.h	2021-05-06 20:54:16 UTC (rev 277117)
+++ trunk/Source/_javascript_Core/wasm/WasmWorklist.h	2021-05-06 20:55:29 UTC (rev 277118)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2021 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,6 +30,7 @@
 #include <queue>
 
 #include <wtf/AutomaticThread.h>
+#include <wtf/PrintStream.h>
 #include <wtf/PriorityQueue.h>
 #include <wtf/Vector.h>
 
@@ -59,6 +60,8 @@
     };
     const char* priorityString(Priority);
 
+    void dump(PrintStream&) const;
+
 private:
     class Thread;
     friend class Thread;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to