Index: src/compiler/zone-stats.h |
diff --git a/src/compiler/zone-stats.h b/src/compiler/zone-stats.h |
index d20a570a87dc284f5781a1feb110a9f365128076..39adca369320de4df337146464675cbdaba58fe7 100644 |
--- a/src/compiler/zone-stats.h |
+++ b/src/compiler/zone-stats.h |
@@ -20,12 +20,12 @@ class V8_EXPORT_PRIVATE ZoneStats final { |
public: |
class Scope final { |
public: |
- explicit Scope(ZoneStats* zone_stats) |
- : zone_stats_(zone_stats), zone_(nullptr) {} |
+ explicit Scope(ZoneStats* zone_stats, const char* zone_name) |
+ : zone_name_(zone_name), zone_stats_(zone_stats), zone_(nullptr) {} |
~Scope() { Destroy(); } |
Zone* zone() { |
- if (zone_ == nullptr) zone_ = zone_stats_->NewEmptyZone(); |
+ if (zone_ == nullptr) zone_ = zone_stats_->NewEmptyZone(zone_name_); |
return zone_; |
} |
void Destroy() { |
@@ -34,6 +34,7 @@ class V8_EXPORT_PRIVATE ZoneStats final { |
} |
private: |
+ const char* zone_name_; |
ZoneStats* const zone_stats_; |
Zone* zone_; |
DISALLOW_COPY_AND_ASSIGN(Scope); |
@@ -70,7 +71,7 @@ class V8_EXPORT_PRIVATE ZoneStats final { |
size_t GetCurrentAllocatedBytes(); |
private: |
- Zone* NewEmptyZone(); |
+ Zone* NewEmptyZone(const char* zone_name); |
void ReturnZone(Zone* zone); |
static const size_t kMaxUnusedSize = 3; |