• Pierre Langlois's avatar
    [tracing] Emit heap statistics at every GC. · 990084ba
    Pierre Langlois authored
    When the 'disabled-by-default-v8.gc' category is enabled, emit an instant event
    with heap statistics after every GC. The data that's emitted is the same as what
    the V8 API gives you with `GetHeapStatistics()` and `GetHeapSpaceStatistics()`.
    
    We generate JSON with the following format:
    
    ```
    {
     "isolate": "0x55dd5cf03b50",
     "id": 1,
     "time_ms": 42.619,
    
     "total_heap_size": 3981312,
     "total_heap_size_executable": 573440,
     "total_physical_size": 2820440,
     "total_available_size": 2195254440,
    
     "used_heap_size": 1799616,
     "heap_size_limit": 2197815296,
     "malloced_memory": 251024,
     "external_memory": 2981,
     "peak_malloced_memory": 589280,
    
     "spaces": [
       {
         "name": "read_only_space",
         "size": 262144,
         "used_size": 32568,
         "available_size": 229256,
         "physical_size": 32888
       },
       {
         "name": "new_space",
         "size": 2097152,
         "used_size": 903392,
         "available_size": 143904,
         "physical_size": 1856136
       },
       ...
     ]
    }
    ```
    
    Bug: v8:9186
    Change-Id: I0d07aa37b65d45778d6b47dbe6e07a9dd25d1097
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619763Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
    Cr-Commit-Position: refs/heads/master@{#61667}
    990084ba
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni 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...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes 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...
COMMON_OWNERS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS 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...
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...