--- a/hotspot/src/share/vm/trace/traceEventClasses.xsl Mon Dec 28 13:59:20 2015 -0500
+++ b/hotspot/src/share/vm/trace/traceEventClasses.xsl Tue Jan 12 17:02:10 2016 +0000
@@ -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<Event', @id, '>(timing) {}', $newline)"/>
void writeEvent(void) {
- ResourceMark rm;
if (UseLockedTracing) {
ttyLocker lock;
writeEventContent();
--- a/hotspot/src/share/vm/trace/traceStream.hpp Mon Dec 28 13:59:20 2015 -0500
+++ b/hotspot/src/share/vm/trace/traceStream.hpp Tue Jan 12 17:02:10 2016 +0000
@@ -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();