< prev index next >

src/share/vm/trace/traceEventClasses.xsl

Print this page




 119 <xsl:apply-templates select="value|structvalue|transition_value|relation" mode="write-fields"/>
 120 
 121   void writeEventContent(void) {
 122     TraceStream ts(*tty);
 123     ts.print("<xsl:value-of select="@label"/>: [");
 124 <xsl:apply-templates select="value|structvalue" mode="write-data"/>
 125     ts.print("]\n");
 126   }
 127 
 128  public:
 129 <xsl:apply-templates select="value|structvalue|transition_value|relation" mode="write-setters"/>
 130 
 131   bool should_write(void) {
 132     return true;
 133   }
 134 <xsl:text>
 135 
 136 </xsl:text>
 137   <xsl:value-of select="concat('  Event', @id, '(EventStartTime timing=TIMED) : TraceEvent&lt;Event', @id, '&gt;(timing) {}', $newline)"/>
 138   void writeEvent(void) {
 139     ResourceMark rm;




 140     if (UseLockedTracing) {
 141       ttyLocker lock;
 142       writeEventContent();
 143     } else {
 144       writeEventContent();




 145     }
 146   }
 147 };
 148 
 149 </xsl:template>
 150 
 151 <xsl:template match="value|transition_value|relation" mode="write-empty-setters">
 152   <xsl:param name="cls"/>
 153   <xsl:variable name="type" select="@type"/>
 154   <xsl:variable name="wt" select="//primary_type[@symbol=$type]/@type"/>
 155   <xsl:value-of select="concat('  void set_', @field, '(', $wt, ' value) { }')"/>
 156   <xsl:if test="position() != last()">
 157     <xsl:text>
 158 </xsl:text>
 159   </xsl:if>
 160 </xsl:template>
 161 
 162 <xsl:template match="structvalue" mode="write-empty-setters">
 163   <xsl:param name="cls"/>
 164   <xsl:value-of select="concat('  void set_', @field, '(const TraceStruct', @type, '&amp; value) { }')"/>




 119 <xsl:apply-templates select="value|structvalue|transition_value|relation" mode="write-fields"/>
 120 
 121   void writeEventContent(void) {
 122     TraceStream ts(*tty);
 123     ts.print("<xsl:value-of select="@label"/>: [");
 124 <xsl:apply-templates select="value|structvalue" mode="write-data"/>
 125     ts.print("]\n");
 126   }
 127 
 128  public:
 129 <xsl:apply-templates select="value|structvalue|transition_value|relation" mode="write-setters"/>
 130 
 131   bool should_write(void) {
 132     return true;
 133   }
 134 <xsl:text>
 135 
 136 </xsl:text>
 137   <xsl:value-of select="concat('  Event', @id, '(EventStartTime timing=TIMED) : TraceEvent&lt;Event', @id, '&gt;(timing) {}', $newline)"/>
 138   void writeEvent(void) {
 139     bool thread_has_resource = Thread::current() != NULL;
 140     ResourceArea *area = thread_has_resource
 141                            ? Thread::current()->resource_area()
 142                            : new (mtTracing)ResourceArea(Chunk::non_pool_size);
 143     ResourceMark rm(area);
 144     if (UseLockedTracing) {
 145       ttyLocker lock;
 146       writeEventContent();
 147     } else {
 148       writeEventContent();
 149     }
 150 
 151     if (!thread_has_resource) {
 152       delete area;
 153     }
 154   }
 155 };
 156 
 157 </xsl:template>
 158 
 159 <xsl:template match="value|transition_value|relation" mode="write-empty-setters">
 160   <xsl:param name="cls"/>
 161   <xsl:variable name="type" select="@type"/>
 162   <xsl:variable name="wt" select="//primary_type[@symbol=$type]/@type"/>
 163   <xsl:value-of select="concat('  void set_', @field, '(', $wt, ' value) { }')"/>
 164   <xsl:if test="position() != last()">
 165     <xsl:text>
 166 </xsl:text>
 167   </xsl:if>
 168 </xsl:template>
 169 
 170 <xsl:template match="structvalue" mode="write-empty-setters">
 171   <xsl:param name="cls"/>
 172   <xsl:value-of select="concat('  void set_', @field, '(const TraceStruct', @type, '&amp; value) { }')"/>


< prev index next >