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

Unified Diff: runtime/vm/zone.h

Issue 1663863002: Add product mode: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reworked the flags setting: Moving to single file for all flag defintions. Created 4 years, 11 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 | « runtime/vm/vm_sources.gypi ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone.h
diff --git a/runtime/vm/zone.h b/runtime/vm/zone.h
index 2008ee9f7b9488f4024f32881abcfe58a329ae06..dc7b25c0b3bf054374aed8b8098aa687e1e7e220 100644
--- a/runtime/vm/zone.h
+++ b/runtime/vm/zone.h
@@ -13,8 +13,6 @@
namespace dart {
-DECLARE_DEBUG_FLAG(bool, trace_zones);
-
// Zones support very fast allocation of small chunks of memory. The
// chunks cannot be deallocated individually, but instead zones
// support deallocating all chunks in one fast operation.
@@ -86,11 +84,9 @@ class Zone {
}
~Zone() { // Delete all memory associated with the zone.
-#if defined(DEBUG)
if (FLAG_trace_zones) {
DumpZoneSizes();
}
-#endif
DeleteAll();
}
@@ -134,10 +130,8 @@ class Zone {
#endif
}
-#if defined(DEBUG)
// Dump the current allocated sizes in the zone object.
void DumpZoneSizes();
-#endif
// Overflow check (FATAL) for array length.
template <class ElementType>
@@ -186,13 +180,11 @@ class StackZone : public StackResource {
public:
// Create an empty zone and set is at the current zone for the Thread.
explicit StackZone(Thread* thread) : StackResource(thread), zone_() {
-#ifdef DEBUG
if (FLAG_trace_zones) {
OS::PrintErr("*** Starting a new Stack zone 0x%" Px "(0x%" Px ")\n",
reinterpret_cast<intptr_t>(this),
reinterpret_cast<intptr_t>(&zone_));
}
-#endif
zone_.Link(thread->zone());
thread->set_zone(&zone_);
}
@@ -201,13 +193,11 @@ class StackZone : public StackResource {
~StackZone() {
ASSERT(thread()->zone() == &zone_);
thread()->set_zone(zone_.previous_);
-#ifdef DEBUG
if (FLAG_trace_zones) {
OS::PrintErr("*** Deleting Stack zone 0x%" Px "(0x%" Px ")\n",
reinterpret_cast<intptr_t>(this),
reinterpret_cast<intptr_t>(&zone_));
}
-#endif
}
// Compute the total size of this zone. This includes wasted space that is
« no previous file with comments | « runtime/vm/vm_sources.gypi ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698