• chunyang.dai's avatar
    Fix the failure when enabling v8 profiler or vtune profiler in chromium. · 8ae236c0
    chunyang.dai authored
       When enabling the v8 profiler (Using the following command parameters: --js-flags=--prof)
       or vtune profiling in chromium. it will break. This failure is introduced by this CL:
       https://codereview.chromium.org/1218863002.
    
       The reason is that V8 will enable the JITted code logging if --prof is set for V8. And under
       this condition, the function Logger::LogCodeObjects() will be invoked and it will trigger a
       mark-compact GC when deserializing the snapshot. This GC will use MemoryReducer to post a
       delay task by invoking V8Platform::CallDelayedOnForegroundThread() function. But at this point
       V8 isolation is still under initialization and the PerIsolationData of this isolation has not
       been created. (isolation_holder.cc:39~40 line). This leads to V8Platform::CallDelayedOnForegroundThread()
       failure because of segment fault.
    
       According to my understanding, I proposed the following fix. If the heap deserialization has not
       be completed, it does not post the delay task for next GC.
    
    BUG=
    
    Review URL: https://codereview.chromium.org/1270493002
    
    Cr-Commit-Position: refs/heads/master@{#29937}
    8ae236c0
Name
Last commit
Last update
..
OWNERS Loading commit data...
gc-idle-time-handler.cc Loading commit data...
gc-idle-time-handler.h Loading commit data...
gc-tracer.cc Loading commit data...
gc-tracer.h Loading commit data...
heap-inl.h Loading commit data...
heap.cc Loading commit data...
heap.h Loading commit data...
identity-map.cc Loading commit data...
identity-map.h Loading commit data...
incremental-marking-inl.h Loading commit data...
incremental-marking.cc Loading commit data...
incremental-marking.h Loading commit data...
mark-compact-inl.h Loading commit data...
mark-compact.cc Loading commit data...
mark-compact.h Loading commit data...
memory-reducer.cc Loading commit data...
memory-reducer.h Loading commit data...
objects-visiting-inl.h Loading commit data...
objects-visiting.cc Loading commit data...
objects-visiting.h Loading commit data...
spaces-inl.h Loading commit data...
spaces.cc Loading commit data...
spaces.h Loading commit data...
store-buffer-inl.h Loading commit data...
store-buffer.cc Loading commit data...
store-buffer.h Loading commit data...