hotspot/src/share/vm/utilities/events.hpp
changeset 31234 48000028382c
parent 28163 322d55d167be
child 34633 2a6c7c7b30a7
equal deleted inserted replaced
31027:6df6a1332f23 31234:48000028382c
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   184   static StringEventLog* _exceptions;
   184   static StringEventLog* _exceptions;
   185 
   185 
   186   // Deoptization related messages
   186   // Deoptization related messages
   187   static StringEventLog* _deopt_messages;
   187   static StringEventLog* _deopt_messages;
   188 
   188 
       
   189   // Redefinition related messages
       
   190   static StringEventLog* _redefinitions;
       
   191 
   189  public:
   192  public:
   190   static void print_all(outputStream* out);
   193   static void print_all(outputStream* out);
   191 
   194 
   192   // Dump all events to the tty
   195   // Dump all events to the tty
   193   static void print();
   196   static void print();
   196   static void log(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
   199   static void log(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
   197 
   200 
   198   // Log exception related message
   201   // Log exception related message
   199   static void log_exception(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
   202   static void log_exception(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
   200 
   203 
       
   204   static void log_redefinition(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
       
   205 
   201   static void log_deopt_message(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
   206   static void log_deopt_message(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
   202 
   207 
   203   // Register default loggers
   208   // Register default loggers
   204   static void init();
   209   static void init();
   205 };
   210 };
   216 inline void Events::log_exception(Thread* thread, const char* format, ...) {
   221 inline void Events::log_exception(Thread* thread, const char* format, ...) {
   217   if (LogEvents) {
   222   if (LogEvents) {
   218     va_list ap;
   223     va_list ap;
   219     va_start(ap, format);
   224     va_start(ap, format);
   220     _exceptions->logv(thread, format, ap);
   225     _exceptions->logv(thread, format, ap);
       
   226     va_end(ap);
       
   227   }
       
   228 }
       
   229 
       
   230 inline void Events::log_redefinition(Thread* thread, const char* format, ...) {
       
   231   if (LogEvents) {
       
   232     va_list ap;
       
   233     va_start(ap, format);
       
   234     _redefinitions->logv(thread, format, ap);
   221     va_end(ap);
   235     va_end(ap);
   222   }
   236   }
   223 }
   237 }
   224 
   238 
   225 inline void Events::log_deopt_message(Thread* thread, const char* format, ...) {
   239 inline void Events::log_deopt_message(Thread* thread, const char* format, ...) {