< prev index next >

src/share/vm/utilities/ostream.hpp

Print this page
rev 10651 : [mq]: cleanup


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 #ifndef SHARE_VM_UTILITIES_OSTREAM_HPP
  26 #define SHARE_VM_UTILITIES_OSTREAM_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/timer.hpp"
  30 #include "utilities/globalDefinitions.hpp"
  31 
  32 class GCId;
  33 DEBUG_ONLY(class ResourceMark;)
  34 
  35 // Output streams for printing
  36 //
  37 // Printing guidelines:
  38 // Where possible, please use tty->print() and tty->print_cr().
  39 // For product mode VM warnings use warning() which internally uses tty.
  40 // In places where tty is not initialized yet or too much overhead,
  41 // we may use jio_printf:
  42 //     jio_fprintf(defaultStream::output_stream(), "Message");
  43 // This allows for redirection via -XX:+DisplayVMOutputToStdout and
  44 // -XX:+DisplayVMOutputToStderr
  45 class outputStream : public ResourceObj {
  46  protected:
  47    int _indentation; // current indentation
  48    int _width;       // width of the page
  49    int _position;    // position on the current line
  50    int _newlines;    // number of '\n' output so far
  51    julong _precount; // number of chars output, less _position
  52    TimeStamp _stamp; // for time stamps




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 #ifndef SHARE_VM_UTILITIES_OSTREAM_HPP
  26 #define SHARE_VM_UTILITIES_OSTREAM_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/timer.hpp"
  30 #include "utilities/globalDefinitions.hpp"
  31 

  32 DEBUG_ONLY(class ResourceMark;)
  33 
  34 // Output streams for printing
  35 //
  36 // Printing guidelines:
  37 // Where possible, please use tty->print() and tty->print_cr().
  38 // For product mode VM warnings use warning() which internally uses tty.
  39 // In places where tty is not initialized yet or too much overhead,
  40 // we may use jio_printf:
  41 //     jio_fprintf(defaultStream::output_stream(), "Message");
  42 // This allows for redirection via -XX:+DisplayVMOutputToStdout and
  43 // -XX:+DisplayVMOutputToStderr
  44 class outputStream : public ResourceObj {
  45  protected:
  46    int _indentation; // current indentation
  47    int _width;       // width of the page
  48    int _position;    // position on the current line
  49    int _newlines;    // number of '\n' output so far
  50    julong _precount; // number of chars output, less _position
  51    TimeStamp _stamp; // for time stamps


< prev index next >