1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
6 This code is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License version 2 only, as
8 published by the Free Software Foundation.
9
10 This code is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 version 2 for more details (a copy is included in the LICENSE file that
14 accompanied this code).
15
16 You should have received a copy of the GNU General Public License version
17 2 along with this work; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19
20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 or visit www.oracle.com if you need additional information or have any
22 questions.
23 -->
24
25 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
26 <xsl:import href="xsl_util.xsl"/>
27 <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
28
29 <xsl:template match="/">
30 <xsl:call-template name="file-header"/>
31
32 #ifndef TRACEFILES_TRACETYPES_HPP
33 #define TRACEFILES_TRACETYPES_HPP
34
35 #include "trace/traceDataTypes.hpp"
36
37 enum JVMContentType {
38 _not_a_content_type = (JVM_CONTENT_TYPES_START - 1),
39
40 <xsl:for-each select="trace/types/content_types/content_type[@jvm_type]">
41 <xsl:value-of select="concat(' CONTENT_TYPE_', @jvm_type, ',', $newline)"/>
42 </xsl:for-each>
43 NUM_JVM_CONTENT_TYPES
44 };
45
46
47 enum JVMEventRelations {
48 JVM_REL_NOT_AVAILABLE = 0,
49
50 <xsl:for-each select="trace/relation_decls/relation_decl">
51 <xsl:value-of select="concat(' JVM_REL_', @id, ',', $newline)"/>
52 </xsl:for-each>
53 NUM_EVENT_RELATIONS
54 };
55
56 /**
57 * Create typedefs for the TRACE types:
58 * typedef s8 TYPE_LONG;
59 * typedef s4 TYPE_INTEGER;
60 * typedef const char * TYPE_STRING;
61 * ...
62 */
63 <xsl:for-each select="trace/types/primary_types/primary_type">
64 typedef <xsl:value-of select="@type"/> TYPE_<xsl:value-of select="@symbol"/>;
65 </xsl:for-each>
66
67 #endif // TRACEFILES_TRACETYPES_HPP
68 </xsl:template>
69
70 </xsl:stylesheet>
|
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
6 This code is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License version 2 only, as
8 published by the Free Software Foundation.
9
10 This code is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 version 2 for more details (a copy is included in the LICENSE file that
14 accompanied this code).
15
16 You should have received a copy of the GNU General Public License version
17 2 along with this work; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19
20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 or visit www.oracle.com if you need additional information or have any
22 questions.
23 -->
24
25 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
26 <xsl:import href="xsl_util.xsl"/>
27 <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
28
29 <xsl:template match="/">
30 <xsl:call-template name="file-header"/>
31
32 #ifndef TRACEFILES_TRACETYPES_HPP
33 #define TRACEFILES_TRACETYPES_HPP
34
35 #include "trace/traceDataTypes.hpp"
36
37 enum JfrConstantTypeId {
38 CONSTANT_TYPE_NONE = 0,
39 CONSTANT_TYPE_CLASS = 20,
40 CONSTANT_TYPE_STRING = 21,
41 CONSTANT_TYPE_THREAD = 22,
42 CONSTANT_TYPE_STACKTRACE = 23,
43 CONSTANT_TYPE_BYTES = 24,
44 CONSTANT_TYPE_EPOCHMILLIS = 25,
45 CONSTANT_TYPE_MILLIS = 26,
46 CONSTANT_TYPE_NANOS = 27,
47 CONSTANT_TYPE_TICKS = 28,
48 CONSTANT_TYPE_ADDRESS = 29,
49 CONSTANT_TYPE_PERCENTAGE = 30,
50 CONSTANT_TYPE_DUMMY,
51 CONSTANT_TYPE_DUMMY_1,
52 <xsl:for-each select="trace/types/content_types/content_type[@jvm_type]">
53 <xsl:value-of select="concat(' CONSTANT_TYPE_', @jvm_type, ',', $newline)"/>
54 </xsl:for-each>
55 NUM_JFR_CONSTANT_TYPES,
56 CONSTANT_TYPES_END = 255
57 };
58
59
60 enum JfrEventRelations {
61 JFR_REL_NOT_AVAILABLE = 0,
62
63 <xsl:for-each select="trace/relation_decls/relation_decl">
64 <xsl:value-of select="concat(' JFR_REL_', @id, ',', $newline)"/>
65 </xsl:for-each>
66 NUM_JFR_EVENT_RELATIONS
67 };
68
69 enum ReservedEvent {
70 EVENT_METADATA,
71 EVENT_CHECKPOINT,
72 EVENT_BUFFERLOST,
73 NUM_RESERVED_EVENTS = CONSTANT_TYPES_END
74 };
75
76
77 /**
78 * Create typedefs for the TRACE types:
79 * typedef s8 TYPE_LONG;
80 * typedef s4 TYPE_INTEGER;
81 * typedef const char * TYPE_STRING;
82 * ...
83 */
84 <xsl:for-each select="trace/types/primary_types/primary_type">
85 typedef <xsl:value-of select="@type"/> TYPE_<xsl:value-of select="@symbol"/>;
86 </xsl:for-each>
87
88 #endif // TRACEFILES_TRACETYPES_HPP
89 </xsl:template>
90
91 </xsl:stylesheet>
|