1. 16 Aug, 2021 1 commit
    • Michael Lippautz's avatar
      cppgc: Introduce cppgc_enable_verify_heap · 334d439c
      Michael Lippautz authored
      Adds a heap verification GN arg to gate the marking verifier and live
      bytes verification on. The flag may be used in future for other more
      expensive checks as well.
      
      Currently, the flag is automatically enabled in dcheck_is_on and debug
      builds.
      
      The change enables live bytes verification for the library in regular
      debug builds which may flush out issues.
      
      Bug: v8:11785
      Change-Id: I0f41bc0d76ebea9f6a8c9315c947598015ee5d68
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097868
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76325}
      334d439c
  2. 12 Jul, 2021 2 commits
    • Michael Lippautz's avatar
      cppgc: Wire up discarded size · fb28cfe6
      Michael Lippautz authored
      So far, discarded size was maintained by the sweeper but not wired up
      anywere.
      
      Changes in this patch:
      - Wire up resident size in heap statistics collection.
      - Fix bugs in reporting committed and resident size.
      - Sweeper test: Enforce some internal details. The details should not
        not be checked broadly but be kept as a detail to the sweeper
        itself.
      - Stats collection: Test that committed and resident set size are
        reported and differ after discarding GCs.
      
      Bug: chromium:1056170
      Change-Id: Icf8871c7ea3b28253233485c736b2ca4816fd6f2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3020971Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75684}
      fb28cfe6
    • Michael Lippautz's avatar
      cppgc: Discard memory on memory reducing GCs · 0665568d
      Michael Lippautz authored
      Add discarded of memory on memory reducing garbage collections. In
      addition, add tracking of discarded memory and properly adjust the
      resident memory of heap dumps.
      
      - Memory is discarded during sweeping and the counter is persistent
        across garbage collection cycles.
      - Subsequent sweep calls are not supposed to touch the memory anymore.
      - As a simplification, discarded memory is tracked on page granularity
        and assumed to be fully paged in as soon as a page's free list entries
        are reused for allocation.
      
      Change-Id: Icfd58f49f3400c4df0d482e20326a0c43c1ca9f5
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3015563
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75677}
      0665568d
  3. 27 May, 2021 3 commits
  4. 16 Mar, 2021 1 commit
  5. 08 Mar, 2021 1 commit
  6. 03 Mar, 2021 1 commit
  7. 17 Feb, 2021 1 commit
    • Omer Katz's avatar
      cppgc: Implement process-global state accessors. · c174643b
      Omer Katz authored
      Process global accessors for total physical size and used size are
      needed for blink. These are implemented via an allocation observer that
      atomically updates static counters.
      
      The public api only provides getters for the counters. An internal class
      is in charge of updating the counters as needed. A similar split is also
      applied to IsAnyIncrementalOrConcurrentMarking().
      
      Drive-by: ProcessHeap is merged into cppgc::internal::WriteBarrier.
      
      Bug: chromium:1056170
      Change-Id: Iaedebd1ac9d49238ce6bdd52ffa5d1ef4d28203d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695394
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72832}
      c174643b
  8. 15 Feb, 2021 1 commit
  9. 11 Feb, 2021 1 commit
  10. 28 Jan, 2021 1 commit
  11. 27 Jan, 2021 2 commits
  12. 22 Jan, 2021 2 commits
    • Omer Katz's avatar
      cppgc: Add object/memory size histograms for UMA · ae893000
      Omer Katz authored
      Bug: chromium:1056170
      Change-Id: I3d6cbff3e37bb541481a014056e539bd4824c37c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642259
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72266}
      ae893000
    • Omer Katz's avatar
      cppgc: Add UMA support · adda4c5f
      Omer Katz authored
      This CL introduces cppgc::HistogramRecorder api which is similar to the
      v8::metrics::Recorder api and is used by cppgc to report histogram
      samples to embedders. Embedders should implement the api if they want to
      collect histograms and provide an instance of it on heap creation.
      
      CppHeap uses an adaptor class that implements the HistogramRecorder api
      and is used to forward the relevant info to the relevant
      v8::metrics::Recorder.
      
      The api used 3 data structures: 2 for incremental steps that need to be
      reported as they come (marking and sweeping) and 1 for the end of a GC
      cycle that aggregates statistics over the entire cycle.
      The data structure only provide the "raw" samples (e.g. atomic mark
      time, incremental mark time, etc...). The embedder is expected to
      compute aggregate histogram on its own (e.g. overall marking time).
      
      Bug: chromium:1056170
      Change-Id: If63ef50a29a21594f654edb83084598980d221ce
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642258
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72256}
      adda4c5f
  13. 19 Nov, 2020 1 commit
    • Omer Katz's avatar
      cppgc: Add tracing scopes · 6a1a3a10
      Omer Katz authored
      This CL adds tracing scopes for the various cppgc classes.
      Scopes use TRACE_EVENT_BEGIN and TRACE_EVENT_END macros to report trace
      events. To do so they need to include trace-event.h. For unified heap
      builds, trace-event.h forwards to v8's src/tracing/trace-event.h. For
      other builds, trace-event.h provides a subset of
      src/tracing/trace-event.h that covers just the parts used by cppgc.
      
      This CL covers what we need for traces and blink gc metrics (up to
      renaming events from BlinkGC.* to CppGC.*). UMA and UKM are not yet
      handled.
      
      Bug: chromium:1056170
      Change-Id: Id92e84b27259ff0aadae7692f3d79d30896fb8e7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2540548
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71284}
      6a1a3a10
  14. 31 Aug, 2020 1 commit
  15. 05 Jun, 2020 1 commit
  16. 03 Jun, 2020 1 commit
    • Michael Lippautz's avatar
      cppgc: Add HeapStatsCollector · ab671ee8
      Michael Lippautz authored
      This ports HeapStatsCollector (former ThreadHeapStatsCollector) from
      Blink. The CL only ports accounting of allocated object size which is
      needed for a simple growing strategy in a follow up.
      
      HeapStatsCollector is a global dependency for most sub components as
      it provides infrastructure for measuring time (through trace scopes)
      and space.
      
      The general idea of HeapStatsCollector is to act as sink where all sub
      components push time and space information. This information is then
      gathered and made available via an event that is implemented as POD.
      Time-dependent info is available through regular getters (pull) and
      observers (push).
      
      Change-Id: I40b4d76e1a40c56e5df1a7353622318cde730e26
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225902
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68150}
      ab671ee8