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

Unified Diff: runtime/vm/zone.cc

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/zone.h ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone.cc
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc
index 4f9a4848647fafdb7bd600d1bf8e35f42f28208c..dc170449b2b6c49dff687525b988419230401174 100644
--- a/runtime/vm/zone.cc
+++ b/runtime/vm/zone.cc
@@ -13,10 +13,6 @@
namespace dart {
-DEFINE_DEBUG_FLAG(bool, trace_zones,
- false, "Traces allocation sizes in the zone.");
-
-
// Zone segments represent chunks of memory: They have starting
// address encoded in the this pointer and a size in bytes. They are
// chained together to form the backing storage for an expanding zone.
@@ -115,7 +111,6 @@ intptr_t Zone::SizeInBytes() const {
uword Zone::AllocateExpand(intptr_t size) {
-#if defined(DEBUG)
ASSERT(size >= 0);
if (FLAG_trace_zones) {
OS::PrintErr("*** Expanding zone 0x%" Px "\n",
@@ -127,7 +122,6 @@ uword Zone::AllocateExpand(intptr_t size) {
ASSERT(Utils::IsAligned(size, kAlignment));
intptr_t free_size = (limit_ - position_);
ASSERT(free_size < size);
-#endif
// First check to see if we should just chain it as a large segment.
intptr_t max_size = Utils::RoundDown(kSegmentSize - sizeof(Segment),
@@ -150,14 +144,12 @@ uword Zone::AllocateExpand(intptr_t size) {
uword Zone::AllocateLargeSegment(intptr_t size) {
-#if defined(DEBUG)
ASSERT(size >= 0);
// Make sure the requested size is already properly aligned and that
// there isn't enough room in the Zone to satisfy the request.
ASSERT(Utils::IsAligned(size, kAlignment));
intptr_t free_size = (limit_ - position_);
ASSERT(free_size < size);
-#endif
// Create a new large segment and chain it up.
ASSERT(Utils::IsAligned(sizeof(Segment), kAlignment));
@@ -192,7 +184,6 @@ char* Zone::ConcatStrings(const char* a, const char* b, char join) {
}
-#if defined(DEBUG)
void Zone::DumpZoneSizes() {
intptr_t size = 0;
for (Segment* s = large_segments_; s != NULL; s = s->next()) {
@@ -202,7 +193,6 @@ void Zone::DumpZoneSizes() {
" Total = %" Pd " Large Segments = %" Pd "\n",
reinterpret_cast<intptr_t>(this), SizeInBytes(), size);
}
-#endif
void Zone::VisitObjectPointers(ObjectPointerVisitor* visitor) {
« no previous file with comments | « runtime/vm/zone.h ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698