Changeset 254393 in webkit


Ignore:
Timestamp:
Jan 10, 2020 10:54:45 PM (4 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Flush old tables in End phase
https://bugs.webkit.org/show_bug.cgi?id=206120
<rdar://problem/58039989>

Reviewed by Mark Lam.

JSTests:

  • stress/create-many-realms.js: Added.

(foo):

Source/JavaScriptCore:

stopThePeriphery is stopping compiler threads and main thread (mutator), which means making m_worldIsStopped = true.
It is not for stopping all heap threads including a concurrent marker. The concurrent collector can work while executing
stopThePeriphery. This means that concurrent collectors can access to the old StructureIDTable while it is destroyed
in stopThePeriphery. Destroying old StructureIDTable in GC End phase, this is appropriate phase that we can ensure no
other threads (accessing to heap) are working including concurrent markers, mutator, and compiler threads.

  • heap/Heap.cpp:

(JSC::Heap::runEndPhase):
(JSC::Heap::stopThePeriphery):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r254390 r254393  
     12020-01-10  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Flush old tables in End phase
     4        https://bugs.webkit.org/show_bug.cgi?id=206120
     5        <rdar://problem/58039989>
     6
     7        Reviewed by Mark Lam.
     8
     9        * stress/create-many-realms.js: Added.
     10        (foo):
     11
    1122020-01-10  Caitlin Potter  <caitp@igalia.com> and Alexey Shvayka  <shvaikalesh@gmail.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r254390 r254393  
     12020-01-10  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Flush old tables in End phase
     4        https://bugs.webkit.org/show_bug.cgi?id=206120
     5        <rdar://problem/58039989>
     6
     7        Reviewed by Mark Lam.
     8
     9        stopThePeriphery is stopping compiler threads and main thread (mutator), which means making m_worldIsStopped = true.
     10        It is not for stopping all heap threads including a concurrent marker. The concurrent collector can work while executing
     11        stopThePeriphery. This means that concurrent collectors can access to the old StructureIDTable while it is destroyed
     12        in stopThePeriphery. Destroying old StructureIDTable in GC End phase, this is appropriate phase that we can ensure no
     13        other threads (accessing to heap) are working including concurrent markers, mutator, and compiler threads.
     14
     15        * heap/Heap.cpp:
     16        (JSC::Heap::runEndPhase):
     17        (JSC::Heap::stopThePeriphery):
     18
    1192020-01-10  Caitlin Potter  <caitp@igalia.com> and Alexey Shvayka  <shvaikalesh@gmail.com>
    220
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r254087 r254393  
    15171517        vm().typeProfiler()->invalidateTypeSetCache(vm());
    15181518
     1519    m_structureIDTable.flushOldTables();
     1520
    15191521    reapWeakHandles();
    15201522    pruneStaleEntriesFromWeakGCMaps();
     
    16641666        shadowChicken->update(vm(), vm().topCallFrame);
    16651667   
    1666     m_structureIDTable.flushOldTables();
    16671668    m_objectSpace.stopAllocating();
    16681669   
Note: See TracChangeset for help on using the changeset viewer.