< prev index next >

src/share/vm/utilities/ostream.cpp

Print this page




 222 void outputStream::date_stamp(bool guard,
 223                               const char* prefix,
 224                               const char* suffix) {
 225   if (!guard) {
 226     return;
 227   }
 228   print_raw(prefix);
 229   static const char error_time[] = "yyyy-mm-ddThh:mm:ss.mmm+zzzz";
 230   static const int buffer_length = 32;
 231   char buffer[buffer_length];
 232   const char* iso8601_result = os::iso8601_time(buffer, buffer_length);
 233   if (iso8601_result != NULL) {
 234     print_raw(buffer);
 235   } else {
 236     print_raw(error_time);
 237   }
 238   print_raw(suffix);
 239   return;
 240 }
 241 
 242 void outputStream::gclog_stamp() {
 243   date_stamp(PrintGCDateStamps);
 244   stamp(PrintGCTimeStamps);
 245   if (PrintGCID) {
 246     print("#%u: ", GCId::current());
 247   }
 248 }
 249 
 250 outputStream& outputStream::indent() {
 251   while (_position < _indentation) sp();
 252   return *this;
 253 }
 254 
 255 void outputStream::print_jlong(jlong value) {
 256   print(JLONG_FORMAT, value);
 257 }
 258 
 259 void outputStream::print_julong(julong value) {
 260   print(JULONG_FORMAT, value);
 261 }
 262 
 263 /**
 264  * This prints out hex data in a 'windbg' or 'xxd' form, where each line is:
 265  *   <hex-address>: 8 * <hex-halfword> <ascii translation (optional)>
 266  * example:
 267  * 0000000: 7f44 4f46 0102 0102 0000 0000 0000 0000  .DOF............
 268  * 0000010: 0000 0000 0000 0040 0000 0020 0000 0005  .......@... ....
 269  * 0000020: 0000 0000 0000 0040 0000 0000 0000 015d  .......@.......]




 222 void outputStream::date_stamp(bool guard,
 223                               const char* prefix,
 224                               const char* suffix) {
 225   if (!guard) {
 226     return;
 227   }
 228   print_raw(prefix);
 229   static const char error_time[] = "yyyy-mm-ddThh:mm:ss.mmm+zzzz";
 230   static const int buffer_length = 32;
 231   char buffer[buffer_length];
 232   const char* iso8601_result = os::iso8601_time(buffer, buffer_length);
 233   if (iso8601_result != NULL) {
 234     print_raw(buffer);
 235   } else {
 236     print_raw(error_time);
 237   }
 238   print_raw(suffix);
 239   return;
 240 }
 241 








 242 outputStream& outputStream::indent() {
 243   while (_position < _indentation) sp();
 244   return *this;
 245 }
 246 
 247 void outputStream::print_jlong(jlong value) {
 248   print(JLONG_FORMAT, value);
 249 }
 250 
 251 void outputStream::print_julong(julong value) {
 252   print(JULONG_FORMAT, value);
 253 }
 254 
 255 /**
 256  * This prints out hex data in a 'windbg' or 'xxd' form, where each line is:
 257  *   <hex-address>: 8 * <hex-halfword> <ascii translation (optional)>
 258  * example:
 259  * 0000000: 7f44 4f46 0102 0102 0000 0000 0000 0000  .DOF............
 260  * 0000010: 0000 0000 0000 0040 0000 0020 0000 0005  .......@... ....
 261  * 0000020: 0000 0000 0000 0040 0000 0000 0000 015d  .......@.......]


< prev index next >