< prev index next >

src/share/vm/utilities/xmlstream.cpp

Print this page
rev 7613 : [mq]: vmassert


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/nmethod.hpp"
  27 #include "memory/allocation.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "oops/methodData.hpp"
  30 #include "oops/method.hpp"
  31 #include "oops/oop.inline.hpp"
  32 #include "runtime/deoptimization.hpp"
  33 #include "runtime/vmThread.hpp"
  34 #include "utilities/xmlstream.hpp"
  35 




  36 void xmlStream::initialize(outputStream* out) {
  37   _out = out;
  38   _last_flush = 0;
  39   _markup_state = BODY;
  40   _text_init._outer_xmlStream = this;
  41   _text = &_text_init;
  42 
  43 #ifdef ASSERT
  44   _element_depth = 0;
  45   int   init_len = 100;
  46   char* init_buf = NEW_C_HEAP_ARRAY(char, init_len, mtInternal);
  47   _element_close_stack_low  = init_buf;
  48   _element_close_stack_high = init_buf + init_len;
  49   _element_close_stack_ptr  = init_buf + init_len - 1;
  50   _element_close_stack_ptr[0] = '\0';
  51 #endif
  52 
  53   // Make sure each log uses the same base for time stamps.
  54   if (is_open()) {
  55     _out->time_stamp().update_to(1);




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/nmethod.hpp"
  27 #include "memory/allocation.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "oops/methodData.hpp"
  30 #include "oops/method.hpp"
  31 #include "oops/oop.inline.hpp"
  32 #include "runtime/deoptimization.hpp"
  33 #include "runtime/vmThread.hpp"
  34 #include "utilities/xmlstream.hpp"
  35 
  36 // Do not assert this condition if there's already another error reported.
  37 #define assert_if_no_error(cond, msg) \
  38   vmassert((cond) || is_error_reported(), msg)
  39 
  40 void xmlStream::initialize(outputStream* out) {
  41   _out = out;
  42   _last_flush = 0;
  43   _markup_state = BODY;
  44   _text_init._outer_xmlStream = this;
  45   _text = &_text_init;
  46 
  47 #ifdef ASSERT
  48   _element_depth = 0;
  49   int   init_len = 100;
  50   char* init_buf = NEW_C_HEAP_ARRAY(char, init_len, mtInternal);
  51   _element_close_stack_low  = init_buf;
  52   _element_close_stack_high = init_buf + init_len;
  53   _element_close_stack_ptr  = init_buf + init_len - 1;
  54   _element_close_stack_ptr[0] = '\0';
  55 #endif
  56 
  57   // Make sure each log uses the same base for time stamps.
  58   if (is_open()) {
  59     _out->time_stamp().update_to(1);


< prev index next >