• 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
..
OWNERS Loading commit data...
counters-definitions.h Loading commit data...
counters-inl.h Loading commit data...
counters.cc Loading commit data...
counters.h Loading commit data...
log-inl.h Loading commit data...
log-utils.cc Loading commit data...
log-utils.h Loading commit data...
log.cc Loading commit data...
log.h Loading commit data...