1.1 --- a/src/share/vm/trace/traceStream.hpp Thu Aug 16 23:50:43 2018 -0400 1.2 +++ b/src/share/vm/trace/traceStream.hpp Thu Aug 23 22:56:32 2018 +0000 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -27,6 +27,7 @@ 1.11 1.12 #include "utilities/macros.hpp" 1.13 #if INCLUDE_TRACE 1.14 +#include "memory/resourceArea.hpp" 1.15 #include "oops/klass.hpp" 1.16 #include "oops/method.hpp" 1.17 #include "oops/symbol.hpp" 1.18 @@ -79,11 +80,8 @@ 1.19 _st.print("%s = %f", label, val); 1.20 } 1.21 1.22 - // Caller is machine generated code located in traceEventClasses.hpp 1.23 - // Event<TraceId>::writeEvent() (pseudocode) contains the 1.24 - // necessary ResourceMark for the resource allocations below. 1.25 - // See traceEventClasses.xsl for details. 1.26 void print_val(const char* label, const Klass* const val) { 1.27 + ResourceMark rm; 1.28 const char* description = "NULL"; 1.29 if (val != NULL) { 1.30 Symbol* name = val->name(); 1.31 @@ -94,11 +92,8 @@ 1.32 _st.print("%s = %s", label, description); 1.33 } 1.34 1.35 - // Caller is machine generated code located in traceEventClasses.hpp 1.36 - // Event<TraceId>::writeEvent() (pseudocode) contains the 1.37 - // necessary ResourceMark for the resource allocations below. 1.38 - // See traceEventClasses.xsl for details. 1.39 void print_val(const char* label, const Method* const val) { 1.40 + ResourceMark rm; 1.41 const char* description = "NULL"; 1.42 if (val != NULL) { 1.43 description = val->name_and_sig_as_C_string();