< prev index next >

src/hotspot/share/asm/codeBuffer.cpp

Print this page
@@ -1004,27 +1004,27 @@
        if (!other->is_allocated() || other == sect) {
          continue;
        }
        guarantee(other->disjoint(sect), "sanity");
      }
-     guarantee(sect->end() <= tend, "sanity");
-     guarantee(sect->end() <= sect->limit(), "sanity");
+     guarantee(sect->end() <= tend, "sanity, sect_end: " PTR_FORMAT " tend: " PTR_FORMAT " size: %d", p2i(sect->end()), p2i(tend), (int)_total_size);
+     guarantee(sect->end() <= sect->limit(), "sanity, sect_end: " PTR_FORMAT " sect_limit: " PTR_FORMAT, p2i(sect->end()), p2i(sect->limit()));
    }
  }
  
  void CodeBuffer::log_section_sizes(const char* name) {
    if (xtty != nullptr) {
      ttyLocker ttyl;
      // log info about buffer usage
-     xtty->print_cr("<blob name='%s' total_size='%d'>", name, _total_size);
+     xtty->head("blob name='%s' total_size='%d'", name, _total_size);
      for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) {
        CodeSection* sect = code_section(n);
        if (!sect->is_allocated() || sect->is_empty())  continue;
-       xtty->print_cr("<sect index='%d' capacity='%d' size='%d' remaining='%d'/>",
-                      n, sect->capacity(), sect->size(), sect->remaining());
+       xtty->elem("sect index='%d' capacity='%d' size='%d' remaining='%d'",
+                  n, sect->capacity(), sect->size(), sect->remaining());
      }
-     xtty->print_cr("</blob>");
+     xtty->tail("blob");
    }
  }
  
  bool CodeBuffer::finalize_stubs() {
    if (_finalize_stubs && !pd_finalize_stubs()) {

@@ -1106,11 +1106,14 @@
    init();
    assert(_remarks != nullptr, "Allocation failure!");
  }
  
  AsmRemarks::~AsmRemarks() {
-   assert(_remarks == nullptr, "Must 'clear()' before deleting!");
+   if (_remarks != nullptr) {
+     clear();
+   }
+   assert(_remarks == nullptr, "must be");
  }
  
  void AsmRemarks::init() {
    _remarks = new AsmRemarkCollection();
  }

@@ -1163,11 +1166,14 @@
    init();
    assert(_strings != nullptr, "Allocation failure!");
  }
  
  DbgStrings::~DbgStrings() {
-   assert(_strings == nullptr, "Must 'clear()' before deleting!");
+   if (_strings != nullptr) {
+     clear();
+   }
+   assert(_strings == nullptr, "must be");
  }
  
  void DbgStrings::init() {
    _strings = new DbgStringCollection();
  }
< prev index next >