Changeset 92224 in webkit for trunk/Source/JavaScriptCore/jsc.cpp


Ignore:
Timestamp:
Aug 2, 2011, 1:40:17 PM (14 years ago)
Author:
[email protected]
Message:

JSC GC is far too conservative about growing the heap size, particularly
on desktop platforms
https://bugs.webkit.org/show_bug.cgi?id=65438

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

The minimum heap size is now 16MB instead of 512KB, provided all of the
following are true:
a) ENABLE(LARGE_HEAP) is set, which currently only happens on

x86 targets, but could reasonably happen on any platform that is
known to have a decent amount of RAM.

b) JSGlobalData is initialized with HeapSize = LargeHeap, which

currently only happens when it's the JSDOMWindowBase in WebCore or
in the jsc command-line tool.

This is a 4.1% speed-up on SunSpider.

(JSC::Heap::Heap):
(JSC::Heap::collect):

  • heap/Heap.h:
  • jsc.cpp:

(main):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::createContextGroup):
(JSC::JSGlobalData::create):
(JSC::JSGlobalData::createLeaked):
(JSC::JSGlobalData::sharedInstance):

  • runtime/JSGlobalData.h:
  • wtf/Platform.h:

Source/WebCore:

No change in behavior, thus no new tests.

Pass the LargeHeap hint to JSGlobalData when creating the JSC runtime
instance corresponding to non-worker JS code.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::commonJSGlobalData):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r91817 r92224  
    383383    // Structured Exception Handling
    384384    int res = 0;
    385     JSGlobalData* globalData = JSGlobalData::create(ThreadStackTypeLarge).leakRef();
     385    JSGlobalData* globalData = JSGlobalData::create(ThreadStackTypeLarge, LargeHeap).leakRef();
    386386    TRY
    387387        res = jscmain(argc, argv, globalData);
Note: See TracChangeset for help on using the changeset viewer.