< prev index next >

src/share/vm/trace/traceEventClasses.xsl

Print this page

        

*** 134,150 **** <xsl:text> </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(); } else { writeEventContent(); } } }; </xsl:template> --- 134,158 ---- <xsl:text> </xsl:text> <xsl:value-of select="concat(' Event', @id, '(EventStartTime timing=TIMED) : TraceEvent&lt;Event', @id, '&gt;(timing) {}', $newline)"/> void writeEvent(void) { ! bool thread_has_resource = Thread::current() != NULL; ! ResourceArea *area = thread_has_resource ! ? Thread::current()->resource_area() ! : new (mtTracing)ResourceArea(Chunk::non_pool_size); ! ResourceMark rm(area); if (UseLockedTracing) { ttyLocker lock; writeEventContent(); } else { writeEventContent(); } + + if (!thread_has_resource) { + delete area; + } } }; </xsl:template>
< prev index next >