< prev index next >

src/share/vm/utilities/ostream.hpp

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 
  31 class GCId;
  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




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 

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


< prev index next >