21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "memory/allocation.inline.hpp"
27 #include "runtime/mutexLocker.hpp"
28 #include "runtime/osThread.hpp"
29 #include "runtime/thread.inline.hpp"
30 #include "runtime/threadCritical.hpp"
31 #include "runtime/threadLocalStorage.hpp"
32 #include "runtime/timer.hpp"
33 #include "utilities/events.hpp"
34
35
36 EventLog* Events::_logs = NULL;
37 StringEventLog* Events::_messages = NULL;
38 StringEventLog* Events::_exceptions = NULL;
39 StringEventLog* Events::_redefinitions = NULL;
40 StringEventLog* Events::_deopt_messages = NULL;
41
42 EventLog::EventLog() {
43 // This normally done during bootstrap when we're only single
44 // threaded but use a ThreadCritical to ensure inclusion in case
45 // some are created slightly late.
46 ThreadCritical tc;
47 _next = Events::_logs;
48 Events::_logs = this;
49 }
50
51 // For each registered event logger, print out the current contents of
52 // the buffer. This is normally called when the JVM is crashing.
53 void Events::print_all(outputStream* out) {
54 EventLog* log = _logs;
55 while (log != NULL) {
56 log->print_log_on(out);
57 log = log->next();
58 }
59 }
60
|
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "memory/allocation.inline.hpp"
27 #include "runtime/mutexLocker.hpp"
28 #include "runtime/osThread.hpp"
29 #include "runtime/thread.inline.hpp"
30 #include "runtime/threadCritical.hpp"
31 #include "runtime/threadLocalStorage.hpp"
32 #include "runtime/timer.hpp"
33 #include "utilities/events.hpp"
34
35
36 EventLog* Events::_logs = NULL;
37 StringEventLog* Events::_messages = NULL;
38 StringEventLog* Events::_exceptions = NULL;
39 StringEventLog* Events::_redefinitions = NULL;
40 StringEventLog* Events::_deopt_messages = NULL;
41 uint GCLogEvent::_buffer_overflow_count = 0;
42
43 EventLog::EventLog() {
44 // This normally done during bootstrap when we're only single
45 // threaded but use a ThreadCritical to ensure inclusion in case
46 // some are created slightly late.
47 ThreadCritical tc;
48 _next = Events::_logs;
49 Events::_logs = this;
50 }
51
52 // For each registered event logger, print out the current contents of
53 // the buffer. This is normally called when the JVM is crashing.
54 void Events::print_all(outputStream* out) {
55 EventLog* log = _logs;
56 while (log != NULL) {
57 log->print_log_on(out);
58 log = log->next();
59 }
60 }
61
|