• 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
benchmarks Loading commit data...
build Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...