Mercurial > hg > truffle
diff src/share/vm/utilities/ostream.hpp @ 12215:621eda7235d2
7164841: Improvements to the GC log file rotation
Summary: made changes to easily identify current log file in rotation. Parameterize the input with %t for time replacement in file name.
Reviewed-by: ccheung, tschatzl, tamao, zgu
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Mon, 16 Sep 2013 15:35:04 -0700 |
parents | dbc0b5dc08f5 |
children | de6a9e811145 |
line wrap: on
line diff
--- a/src/share/vm/utilities/ostream.hpp Mon Sep 16 12:43:34 2013 -0700 +++ b/src/share/vm/utilities/ostream.hpp Mon Sep 16 15:35:04 2013 -0700 @@ -231,20 +231,24 @@ void flush() {}; }; -class rotatingFileStream : public fileStream { +class gcLogFileStream : public fileStream { protected: - char* _file_name; + const char* _file_name; jlong _bytes_written; - uintx _cur_file_num; // current logfile rotation number, from 0 to MaxGCLogFileNumbers-1 + uintx _cur_file_num; // current logfile rotation number, from 0 to NumberOfGCLogFiles-1 public: - rotatingFileStream(const char* file_name); - rotatingFileStream(const char* file_name, const char* opentype); - rotatingFileStream(FILE* file) : fileStream(file) {} - ~rotatingFileStream(); + gcLogFileStream(const char* file_name); + ~gcLogFileStream(); virtual void write(const char* c, size_t len); virtual void rotate_log(); + void dump_loggc_header(); }; +#ifndef PRODUCT +// unit test for checking -Xloggc:<filename> parsing result +void test_loggc_filename(); +#endif + void ostream_init(); void ostream_init_log(); void ostream_exit();