8020547: Event based tracing needs a UNICODE string type
Reviewed-by: egahlin, rbackman, dcubed, brutisso, acorn
--- a/hotspot/src/share/vm/trace/traceDataTypes.hpp Thu Jul 18 18:00:39 2013 -0700
+++ b/hotspot/src/share/vm/trace/traceDataTypes.hpp Fri Jul 19 17:56:27 2013 +0200
@@ -63,5 +63,7 @@
typedef u8 methodid;
typedef u8 fieldid;
+class TraceUnicodeString;
+
#endif // SHARE_VM_TRACE_TRACEDATATYPES_HPP
--- a/hotspot/src/share/vm/trace/tracetypes.xml Thu Jul 18 18:00:39 2013 -0700
+++ b/hotspot/src/share/vm/trace/tracetypes.xml Fri Jul 19 17:56:27 2013 +0200
@@ -55,18 +55,6 @@
type="u8" sizeop="sizeof(u1)"/>
Now we can use the content + data type in declaring event fields.
-Remember however, that for us to be able to resolve the value later we must also add
-creating the constant pool data in VM_JFRCheckpoint::write_checkpoint
-
- ...
- //CGMODE
- w->be_uint(CONTENT_TYPE_GCMODE);
- w->be_uint(MM_GC_MODE_UNINITIALIZED);
- for (i = 0; i < MM_GC_MODE_UNINITIALIZED; i++) {
- w->uchar(i);
- w->write_utf8(gcModeGetName(i));
- }
-
-->
<types>
@@ -81,10 +69,6 @@
<value type="OSTHREAD" field="thread" label="VM Thread"/>
</content_type>
- <!-- The first argument ("JavaThread") is misleading, it's really a
- java.lang.Thread id (long), but Mission Control depends on the name
- being "JavaThread" so it shouldn't be changed.
- -->
<content_type id="JavaThread" hr_name="Java thread"
type="U8" builtin_type="JAVALANGTHREAD">
<value type="OSTHREAD" field="thread" label="OS Thread ID"/>
@@ -285,6 +269,10 @@
<primary_type symbol="UTF8" datatype="UTF8" contenttype="NONE"
type="const char *" sizeop="sizeof_utf(%)"/>
+ <!-- UTF-16 encoded (Unicode) string, max length maxjuint -->
+ <primary_type symbol="STRING" datatype="STRING" contenttype="NONE"
+ type="TraceUnicodeString*" sizeop="sizeof_unicode(%)"/>
+
<!-- Symbol* constant. Note that this may currently ONLY be used by
classes, methods fields. This restriction might be lifted. -->
<primary_type symbol="SYMBOL" datatype="U8" contenttype="SYMBOL"
--- a/hotspot/src/share/vm/trace/xinclude.mod Thu Jul 18 18:00:39 2013 -0700
+++ b/hotspot/src/share/vm/trace/xinclude.mod Fri Jul 19 17:56:27 2013 +0200
@@ -22,30 +22,6 @@
questions.
-->
-
-<!--
- Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
-
--->
<!ELEMENT xi:include (xi:fallback?) >
<!ATTLIST xi:include
xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"