8001538: hs_err file does not list anymore compiled methods in compilation events
authorvlivanov
Wed, 21 Nov 2012 05:57:12 -0800
changeset 14620 45167d2bc15a
parent 14619 100554ee24d1
child 14621 fd9265ab0f67
8001538: hs_err file does not list anymore compiled methods in compilation events Summary: Fixed message buffer size calculation. Reviewed-by: kvn, twisti
hotspot/src/share/vm/runtime/deoptimization.cpp
hotspot/src/share/vm/utilities/events.hpp
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Fri Nov 16 15:49:46 2012 -0800
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Wed Nov 21 05:57:12 2012 -0800
@@ -1242,8 +1242,8 @@
   nmethodLocker nl(fr.pc());
 
   // Log a message
-  Events::log_deopt_message(thread, "Uncommon trap %d fr.pc " INTPTR_FORMAT,
-                            trap_request, fr.pc());
+  Events::log(thread, "Uncommon trap: trap_request=" PTR32_FORMAT " fr.pc=" INTPTR_FORMAT,
+              trap_request, fr.pc());
 
   {
     ResourceMark rm;
@@ -1274,6 +1274,11 @@
     MethodData* trap_mdo =
       get_method_data(thread, trap_method, create_if_missing);
 
+    // Log a message
+    Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d",
+                              trap_reason_name(reason), trap_action_name(action), fr.pc(),
+                              trap_method->name_and_sig_as_C_string(), trap_bci);
+
     // Print a bunch of diagnostics, if requested.
     if (TraceDeoptimization || LogCompilation) {
       ResourceMark rm;
--- a/hotspot/src/share/vm/utilities/events.hpp	Fri Nov 16 15:49:46 2012 -0800
+++ b/hotspot/src/share/vm/utilities/events.hpp	Wed Nov 21 05:57:12 2012 -0800
@@ -135,11 +135,11 @@
 };
 
 // A simple wrapper class for fixed size text messages.
-class StringLogMessage : public FormatBuffer<132> {
+class StringLogMessage : public FormatBuffer<256> {
  public:
   // Wrap this buffer in a stringStream.
   stringStream stream() {
-    return stringStream(_buf, sizeof(_buf));
+    return stringStream(_buf, size());
   }
 };