v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-statistics-collector.h
Go to the documentation of this file.
1// Copyright 2021 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_HEAP_CPPGC_HEAP_STATISTICS_COLLECTOR_H_
6#define V8_HEAP_CPPGC_HEAP_STATISTICS_COLLECTOR_H_
7
8#include <unordered_map>
9
12
13namespace cppgc {
14namespace internal {
15
16class HeapStatisticsCollector : private HeapVisitor<HeapStatisticsCollector> {
18
19 public:
21
22 private:
28
32 // Index from type name to final index in `HeapStats::type_names`.
33 // Canonicalizing based on `const void*` assuming stable addresses. If the
34 // implementation of `NameProvider` decides to return different type name
35 // c-strings, the final outcome is less compact.
36 std::unordered_map<const void*, size_t> type_name_to_index_map_;
37};
38
39} // namespace internal
40} // namespace cppgc
41
42#endif // V8_HEAP_CPPGC_HEAP_STATISTICS_COLLECTOR_H_
HeapStatistics::SpaceStatistics * current_space_stats_
HeapStatistics::PageStatistics * current_page_stats_
std::unordered_map< const void *, size_t > type_name_to_index_map_