• Andreas Haas's avatar
    [platform][cleanup] Fix --enable-tracing · 61367a25
    Andreas Haas authored
    The flag --enable-tracing can be used to measure how much time is spent
    in a scope. In d8 this flag did not work properly for the following
    reasons:
    
    * The tracing file is not written when the JavaScript code calls quit().
    
    * The tracing file is not written when the JavaScript code throws an
    uncaught exception, except if the --throws flag is passed to d8.
    
    The reason for these two issues is that both call Shell::Exit(), which
    end d8 immediately without calling any destructors. In addition I moved
    in a recent CL the destruction of the platform after the destruction of
    the file handle for the tracing file. Thereby the tracing file did not
    get filled with content even destructors were executed.
    
    With this CL I also call the destructors of the platform and of the file
    handle in the Shell::Exit() function. For this I make Shell::Exit()
    platform independent and let it call the platform dependent
    Shell::OSExit() at the end.
    
    R=rmcilroy@chromium.org
    
    Change-Id: I14425b6a5c25b757211bc8b9959a9cc8bfa0602c
    Reviewed-on: https://chromium-review.googlesource.com/789038Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49659}
    61367a25
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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 Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm 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...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...