5#ifndef V8_COMPILER_ZONE_STATS_H_
6#define V8_COMPILER_ZONE_STATS_H_
22 bool support_zone_compression =
false)
23 : zone_name_(zone_name),
24 zone_stats_(zone_stats),
26 support_zone_compression_(support_zone_compression) {}
31 : zone_name_(other.zone_name_),
32 zone_stats_(other.zone_stats_),
34 support_zone_compression_(other.support_zone_compression_) {
35 std::swap(
zone_, other.zone_);
40 zone_name_ = other.zone_name_;
41 zone_stats_ = other.zone_stats_;
42 support_zone_compression_ = other.support_zone_compression_;
44 std::swap(
zone_, other.zone_);
51 zone_stats_->NewEmptyZone(zone_name_, support_zone_compression_);
55 if (
zone_ !=
nullptr) zone_stats_->ReturnZone(
zone_);
75 size_t GetMaxAllocatedBytes();
76 size_t GetCurrentAllocatedBytes();
77 size_t GetTotalAllocatedBytes();
81 void ZoneReturned(
Zone* zone);
96 size_t GetMaxAllocatedBytes()
const;
97 size_t GetTotalAllocatedBytes()
const;
98 size_t GetCurrentAllocatedBytes()
const;
101 Zone* NewEmptyZone(
const char* zone_name,
bool support_zone_compression);
102 void ReturnZone(
Zone* zone);
104 static const size_t kMaxUnusedSize = 3;
106 using Stats = std::vector<StatsScope*>;
Scope(const Scope &)=delete
Scope & operator=(Scope &&other) V8_NOEXCEPT
Scope(ZoneStats *zone_stats, const char *zone_name, bool support_zone_compression=false)
bool support_zone_compression_
ZoneStats * zone_stats() const
Scope(Scope &&other) V8_NOEXCEPT
Scope & operator=(const Scope &)=delete
ZoneStats *const zone_stats_
size_t max_allocated_bytes_
std::map< Zone *, size_t > InitialValues
size_t total_allocated_bytes_at_start_
StatsScope & operator=(const StatsScope &)=delete
InitialValues initial_values_
StatsScope(const StatsScope &)=delete
std::vector< StatsScope * > Stats
size_t max_allocated_bytes_
std::vector< Zone * > Zones
ZoneStats & operator=(const ZoneStats &)=delete
size_t total_deleted_bytes_
ZoneStats(const ZoneStats &)=delete
AccountingAllocator * allocator_
#define V8_EXPORT_PRIVATE