diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-08-16 11:32:46 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-08-19 09:25:23 +0200 |
commit | e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4 (patch) | |
tree | 6c6bed9804be9df6162b2483f0a56f371f66464d /deps/v8/src/heap/embedder-tracing.h | |
parent | ec16fdae540adaf710b1a86c620170b2880088f0 (diff) | |
download | node-new-e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4.tar.gz |
deps: update V8 to 7.7.299.4
PR-URL: https://github.com/nodejs/node/pull/28918
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps/v8/src/heap/embedder-tracing.h')
-rw-r--r-- | deps/v8/src/heap/embedder-tracing.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/deps/v8/src/heap/embedder-tracing.h b/deps/v8/src/heap/embedder-tracing.h index 4309fb722a..eae29cbf5c 100644 --- a/deps/v8/src/heap/embedder-tracing.h +++ b/deps/v8/src/heap/embedder-tracing.h @@ -77,8 +77,8 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final { } void IncreaseAllocatedSize(size_t bytes) { + remote_stats_.used_size += bytes; remote_stats_.allocated_size += bytes; - remote_stats_.accumulated_allocated_size += bytes; if (remote_stats_.allocated_size > remote_stats_.allocated_size_limit_for_check) { StartIncrementalMarkingIfNeeded(); @@ -87,12 +87,15 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final { } } + void DecreaseAllocatedSize(size_t bytes) { + DCHECK_GE(remote_stats_.used_size, bytes); + remote_stats_.used_size -= bytes; + } + void StartIncrementalMarkingIfNeeded(); + size_t used_size() const { return remote_stats_.used_size; } size_t allocated_size() const { return remote_stats_.allocated_size; } - size_t accumulated_allocated_size() const { - return remote_stats_.accumulated_allocated_size; - } private: static constexpr size_t kEmbedderAllocatedThreshold = 128 * KB; @@ -109,16 +112,16 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final { bool embedder_worklist_empty_ = false; struct RemoteStatistics { - // Allocated size of objects in bytes reported by the embedder. Updated via + // Used size of objects in bytes reported by the embedder. Updated via // TraceSummary at the end of tracing and incrementally when the GC is not // in progress. + size_t used_size = 0; + // Totally bytes allocated by the embedder. Monotonically + // increasing value. Used to approximate allocation rate. size_t allocated_size = 0; - // Limit for |allocated_size_| in bytes to avoid checking for starting a GC + // Limit for |allocated_size| in bytes to avoid checking for starting a GC // on each increment. size_t allocated_size_limit_for_check = 0; - // Totally accumulated bytes allocated by the embedder. Monotonically - // increasing value. Used to approximate allocation rate. - size_t accumulated_allocated_size = 0; } remote_stats_; friend class EmbedderStackStateScope; |