Merge
authormgronlun
Tue, 12 Jan 2016 16:01:54 +0100
changeset 35474 8333d76c7fee
parent 35472 cd54a457564e (current diff)
parent 35473 cf27aeb0942d (diff)
child 35476 de7e65f21c6c
child 35477 7a00b08d27bc
child 35479 62c12ca7a45e
Merge
--- a/hotspot/src/share/vm/trace/traceEventClasses.xsl	Tue Jan 12 11:11:21 2016 +0100
+++ b/hotspot/src/share/vm/trace/traceEventClasses.xsl	Tue Jan 12 16:01:54 2016 +0100
@@ -36,7 +36,6 @@
 // Some parts of traceEvent.hpp are used outside of
 // INCLUDE_TRACE
 
-#include "memory/resourceArea.hpp"
 #include "tracefiles/traceTypes.hpp"
 #include "trace/traceEvent.hpp"
 #include "utilities/macros.hpp"
@@ -136,7 +135,6 @@
 </xsl:text>
   <xsl:value-of select="concat('  Event', @id, '(EventStartTime timing=TIMED) : TraceEvent&lt;Event', @id, '&gt;(timing) {}', $newline)"/>
   void writeEvent(void) {
-    ResourceMark rm;
     if (UseLockedTracing) {
       ttyLocker lock;
       writeEventContent();
--- a/hotspot/src/share/vm/trace/traceStream.hpp	Tue Jan 12 11:11:21 2016 +0100
+++ b/hotspot/src/share/vm/trace/traceStream.hpp	Tue Jan 12 16:01:54 2016 +0100
@@ -27,6 +27,7 @@
 
 #include "utilities/macros.hpp"
 #if INCLUDE_TRACE
+#include "memory/resourceArea.hpp"
 #include "oops/klass.hpp"
 #include "oops/method.hpp"
 #include "oops/symbol.hpp"
@@ -79,11 +80,8 @@
     _st.print("%s = %f", label, val);
   }
 
-  // Caller is machine generated code located in traceEventClasses.hpp
-  // Event<TraceId>::writeEvent() (pseudocode) contains the
-  // necessary ResourceMark for the resource allocations below.
-  // See traceEventClasses.xsl for details.
   void print_val(const char* label, const Klass* const val) {
+    ResourceMark rm;
     const char* description = "NULL";
     if (val != NULL) {
       Symbol* name = val->name();
@@ -94,11 +92,8 @@
     _st.print("%s = %s", label, description);
   }
 
-  // Caller is machine generated code located in traceEventClasses.hpp
-  // Event<TraceId>::writeEvent() (pseudocode) contains the
-  // necessary ResourceMark for the resource allocations below.
-  // See traceEventClasses.xsl for details.
   void print_val(const char* label, const Method* const val) {
+    ResourceMark rm;
     const char* description = "NULL";
     if (val != NULL) {
       description = val->name_and_sig_as_C_string();