Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(759)

Unified Diff: src/compiler/zone-stats.h

Issue 2394213003: Named all zones in the project (Closed)
Patch Set: Merge branch 'master' into zonenames Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/compiler/zone-stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/compiler/zone-stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698