[JSC] Use Fast Malloc as much as possible
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Feb 2019 01:04:01 +0000 (01:04 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Feb 2019 01:04:01 +0000 (01:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194316

Reviewed by Mark Lam.

We should use Fast Malloc as much as possible to offer the whole memory view to bmalloc.

* inspector/scripts/codegen/cpp_generator_templates.py:
* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
* jit/ExecutableAllocator.h:
* jsc.cpp:
* runtime/JSRunLoopTimer.h:
* tools/VMInspector.h:
* wasm/WasmThunks.h:

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

12 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py
Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result
Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/JSRunLoopTimer.h
Source/JavaScriptCore/tools/VMInspector.h
Source/JavaScriptCore/wasm/WasmThunks.h

index fcab6e3..c068b84 100644 (file)
@@ -1,3 +1,24 @@
+2019-02-21  Yusuke Suzuki  <ysuzuki@apple.com>
+
+        [JSC] Use Fast Malloc as much as possible
+        https://bugs.webkit.org/show_bug.cgi?id=194316
+
+        Reviewed by Mark Lam.
+
+        We should use Fast Malloc as much as possible to offer the whole memory view to bmalloc.
+
+        * inspector/scripts/codegen/cpp_generator_templates.py:
+        * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
+        * inspector/scripts/tests/generic/expected/enum-values.json-result:
+        * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
+        * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
+        * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
+        * jit/ExecutableAllocator.h:
+        * jsc.cpp:
+        * runtime/JSRunLoopTimer.h:
+        * tools/VMInspector.h:
+        * wasm/WasmThunks.h:
+
 2019-02-20  Yusuke Suzuki  <ysuzuki@apple.com>
 
         [JSC] Remove WatchpointSet creation for SymbolTable entries if VM::canUseJIT() returns false
index fe4fb2c..a954382 100755 (executable)
@@ -196,6 +196,7 @@ ${outParameterAssignments}
 
     FrontendDispatcherDomainDispatcherDeclaration = (
 """${classAndExportMacro} ${domainName}FrontendDispatcher {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     ${domainName}FrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
 ${eventDeclarations}
index 1234ca9..163be7c 100644 (file)
@@ -306,6 +306,7 @@ namespace Inspector {
 class FrontendRouter;
 
 class NetworkFrontendDispatcher {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     NetworkFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
     void resourceLoaded();
index ff6e9e0..4d94ad9 100644 (file)
@@ -325,6 +325,7 @@ namespace Inspector {
 class FrontendRouter;
 
 class EventDomainFrontendDispatcher {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     EventDomainFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
         // Named after parameter 'parameter' while generating command/event eventWithEnumParameter.
index 8f743f5..d8e7d54 100644 (file)
@@ -232,6 +232,7 @@ namespace Inspector {
 class FrontendRouter;
 
 class DatabaseFrontendDispatcher {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     DatabaseFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
     void didExecuteOptionalParameters(RefPtr<JSON::ArrayOf<String>> columnNames, const String* notes, const double* timestamp, RefPtr<JSON::Object> values, RefPtr<JSON::Value> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const String* screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String* printColor);
index b5f9e6a..431ab21 100644 (file)
@@ -322,6 +322,7 @@ class FrontendRouter;
 
 #if PLATFORM(WEB_EVENTS)
 class Network3FrontendDispatcher {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     Network3FrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
     void resourceLoaded();
index 1234ca9..163be7c 100644 (file)
@@ -306,6 +306,7 @@ namespace Inspector {
 class FrontendRouter;
 
 class NetworkFrontendDispatcher {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     NetworkFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
     void resourceLoaded();
index 13ed346..bb98f52 100644 (file)
@@ -123,6 +123,8 @@ static inline void* performJITMemcpy(void *dst, const void *src, size_t n)
 }
 
 class ExecutableAllocator {
+    WTF_MAKE_FAST_ALLOCATED;
+    WTF_MAKE_NONCOPYABLE(ExecutableAllocator);
     enum ProtectionSetting { Writable, Executable };
 
 public:
index 7575142..8ec1d29 100644 (file)
@@ -255,6 +255,8 @@ private:
 };
 
 class Workers {
+    WTF_MAKE_FAST_ALLOCATED;
+    WTF_MAKE_NONCOPYABLE(Workers);
 public:
     Workers();
     ~Workers();
index b9a2f43..3626ab6 100644 (file)
@@ -48,11 +48,14 @@ public:
     using TimerNotificationCallback = RefPtr<WTF::SharedTask<TimerNotificationType>>;
 
     class Manager {
+        WTF_MAKE_FAST_ALLOCATED;
+        WTF_MAKE_NONCOPYABLE(Manager);
 #if USE(CF)
         static void timerDidFireCallback(CFRunLoopTimerRef, void*);
 #else
         void timerDidFireCallback();
 #endif
+        Manager() = default;
 
         void timerDidFire();
 
index 3f3f33b..3a3b7ee 100644 (file)
@@ -34,6 +34,9 @@
 namespace JSC {
 
 class VMInspector {
+    WTF_MAKE_FAST_ALLOCATED;
+    WTF_MAKE_NONCOPYABLE(VMInspector);
+    VMInspector() = default;
 public:
     enum class Error {
         None,
index cc05b6d..f92fa5d 100644 (file)
@@ -39,6 +39,8 @@ MacroAssemblerCodeRef<JITThunkPtrTag> triggerOMGTierUpThunkGenerator(const Abstr
 typedef MacroAssemblerCodeRef<JITThunkPtrTag> (*ThunkGenerator)(const AbstractLocker&);
 
 class Thunks {
+    WTF_MAKE_FAST_ALLOCATED;
+    WTF_MAKE_NONCOPYABLE(Thunks);
 public:
     static void initialize();
     static Thunks& singleton();