< prev index next >

src/share/vm/utilities/ostream.hpp

Print this page
rev 4136 : 7116786: RFE: Detailed information on VerifyErrors
Summary: Provide additional detail in VerifyError messages
Reviewed-by: sspitsyn, acorn

*** 1,7 **** /* ! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 57,69 **** // creation outputStream(int width = 80); outputStream(int width, bool has_time_stamps); // indentation ! void indent(); void inc() { _indentation++; }; void dec() { _indentation--; }; int indentation() const { return _indentation; } void set_indentation(int i) { _indentation = i; } void fill_to(int col); void move_to(int col, int slop = 6, int min_space = 2); --- 57,71 ---- // creation outputStream(int width = 80); outputStream(int width, bool has_time_stamps); // indentation ! outputStream& indent(); void inc() { _indentation++; }; void dec() { _indentation--; }; + void inc(int n) { _indentation += n; }; + void dec(int n) { _indentation -= n; }; int indentation() const { return _indentation; } void set_indentation(int i) { _indentation = i; } void fill_to(int col); void move_to(int col, int slop = 6, int min_space = 2);
*** 82,91 **** --- 84,94 ---- void vprint_cr(const char* format, va_list argptr); void print_raw(const char* str) { write(str, strlen(str)); } void print_raw(const char* str, int len) { write(str, len); } void print_raw_cr(const char* str) { write(str, strlen(str)); cr(); } void print_raw_cr(const char* str, int len){ write(str, len); cr(); } + void print_data(void* data, size_t len, bool with_ascii); void put(char ch); void sp(int count = 1); void cr(); void bol() { if (_position > 0) cr(); }
*** 120,129 **** --- 123,145 ---- // standard output // ANSI C++ name collision extern outputStream* tty; // tty output extern outputStream* gclog_or_tty; // stream for gc log if -Xloggc:<f>, or tty + class streamIndentor : public StackObj { + private: + outputStream* _str; + int _amount; + + public: + streamIndentor(outputStream* str, int amt = 2) : _str(str), _amount(amt) { + _str->inc(_amount); + } + ~streamIndentor() { _str->dec(_amount); } + }; + + // advisory locking for the shared tty stream: class ttyLocker: StackObj { friend class ttyUnlocker; private: intx _holder;
< prev index next >