comparison src/share/vm/gc_interface/gcCause.hpp @ 7455:0b54ffe4c2d3

8005672: Clean up some changes to GC logging with GCCause's Reviewed-by: johnc, ysr
author jmasa
date Fri, 04 Jan 2013 17:04:46 -0800
parents da91efe96a93
children f2110083203d
comparison
equal deleted inserted replaced
7454:6e9174173e00 7455:0b54ffe4c2d3
97 int _position; 97 int _position;
98 98
99 public: 99 public:
100 GCCauseString(const char* prefix, GCCause::Cause cause) { 100 GCCauseString(const char* prefix, GCCause::Cause cause) {
101 if (PrintGCCause) { 101 if (PrintGCCause) {
102 _position = jio_snprintf(_buffer, _length, "%s (%s)", prefix, GCCause::to_string(cause)); 102 _position = jio_snprintf(_buffer, _length, "%s (%s) ", prefix, GCCause::to_string(cause));
103 } else { 103 } else {
104 _position = jio_snprintf(_buffer, _length, "%s", prefix); 104 _position = jio_snprintf(_buffer, _length, "%s ", prefix);
105 } 105 }
106 assert(_position >= 0 && _position <= _length, 106 assert(_position >= 0 && _position <= _length,
107 err_msg("Need to increase the buffer size in GCCauseString? %d", _position)); 107 err_msg("Need to increase the buffer size in GCCauseString? %d", _position));
108 } 108 }
109 109