Fri, 19 Jul 2013 17:56:27 +0200
8020547: Event based tracing needs a UNICODE string type
Reviewed-by: egahlin, rbackman, dcubed, brutisso, acorn
1.1 --- a/src/share/vm/trace/traceDataTypes.hpp Thu Jul 18 18:00:39 2013 -0700 1.2 +++ b/src/share/vm/trace/traceDataTypes.hpp Fri Jul 19 17:56:27 2013 +0200 1.3 @@ -63,5 +63,7 @@ 1.4 typedef u8 methodid; 1.5 typedef u8 fieldid; 1.6 1.7 +class TraceUnicodeString; 1.8 + 1.9 #endif // SHARE_VM_TRACE_TRACEDATATYPES_HPP 1.10
2.1 --- a/src/share/vm/trace/tracetypes.xml Thu Jul 18 18:00:39 2013 -0700 2.2 +++ b/src/share/vm/trace/tracetypes.xml Fri Jul 19 17:56:27 2013 +0200 2.3 @@ -55,18 +55,6 @@ 2.4 type="u8" sizeop="sizeof(u1)"/> 2.5 2.6 Now we can use the content + data type in declaring event fields. 2.7 -Remember however, that for us to be able to resolve the value later we must also add 2.8 -creating the constant pool data in VM_JFRCheckpoint::write_checkpoint 2.9 - 2.10 - ... 2.11 - //CGMODE 2.12 - w->be_uint(CONTENT_TYPE_GCMODE); 2.13 - w->be_uint(MM_GC_MODE_UNINITIALIZED); 2.14 - for (i = 0; i < MM_GC_MODE_UNINITIALIZED; i++) { 2.15 - w->uchar(i); 2.16 - w->write_utf8(gcModeGetName(i)); 2.17 - } 2.18 - 2.19 --> 2.20 2.21 <types> 2.22 @@ -81,10 +69,6 @@ 2.23 <value type="OSTHREAD" field="thread" label="VM Thread"/> 2.24 </content_type> 2.25 2.26 - <!-- The first argument ("JavaThread") is misleading, it's really a 2.27 - java.lang.Thread id (long), but Mission Control depends on the name 2.28 - being "JavaThread" so it shouldn't be changed. 2.29 - --> 2.30 <content_type id="JavaThread" hr_name="Java thread" 2.31 type="U8" builtin_type="JAVALANGTHREAD"> 2.32 <value type="OSTHREAD" field="thread" label="OS Thread ID"/> 2.33 @@ -285,6 +269,10 @@ 2.34 <primary_type symbol="UTF8" datatype="UTF8" contenttype="NONE" 2.35 type="const char *" sizeop="sizeof_utf(%)"/> 2.36 2.37 + <!-- UTF-16 encoded (Unicode) string, max length maxjuint --> 2.38 + <primary_type symbol="STRING" datatype="STRING" contenttype="NONE" 2.39 + type="TraceUnicodeString*" sizeop="sizeof_unicode(%)"/> 2.40 + 2.41 <!-- Symbol* constant. Note that this may currently ONLY be used by 2.42 classes, methods fields. This restriction might be lifted. --> 2.43 <primary_type symbol="SYMBOL" datatype="U8" contenttype="SYMBOL"
3.1 --- a/src/share/vm/trace/xinclude.mod Thu Jul 18 18:00:39 2013 -0700 3.2 +++ b/src/share/vm/trace/xinclude.mod Fri Jul 19 17:56:27 2013 +0200 3.3 @@ -22,30 +22,6 @@ 3.4 questions. 3.5 3.6 --> 3.7 - 3.8 -<!-- 3.9 - Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 3.10 - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.11 - 3.12 - This code is free software; you can redistribute it and/or modify it 3.13 - under the terms of the GNU General Public License version 2 only, as 3.14 - published by the Free Software Foundation. 3.15 - 3.16 - This code is distributed in the hope that it will be useful, but WITHOUT 3.17 - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3.18 - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3.19 - version 2 for more details (a copy is included in the LICENSE file that 3.20 - accompanied this code). 3.21 - 3.22 - You should have received a copy of the GNU General Public License version 3.23 - 2 along with this work; if not, write to the Free Software Foundation, 3.24 - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3.25 - 3.26 - Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3.27 - or visit www.oracle.com if you need additional information or have any 3.28 - questions. 3.29 - 3.30 ---> 3.31 <!ELEMENT xi:include (xi:fallback?) > 3.32 <!ATTLIST xi:include 3.33 xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"