Merge
authorjprovino
Thu, 03 Mar 2016 17:33:13 +0000
changeset 36403 3bc27d7f3e75
parent 36402 7c20aae43c41 (current diff)
parent 36401 fb588215d43d (diff)
child 36404 165ddc1dd2e9
child 36570 9608a7830fe9
Merge
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/development/Server16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/development/Server24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/About16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/About24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Delete16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Delete24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Find16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Help16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Help24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/History16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/History24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Information16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Information24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/New16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/New24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Open16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Open24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Save24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/SaveAs16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/SaveAs24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Zoom16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/ZoomIn16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/ZoomIn24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/navigation/Down16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/navigation/Up16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignCenter16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignCenter24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignLeft16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignLeft24.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignRight16.gif
hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignRight24.gif
hotspot/test/serviceability/dcmd/jvmti/LoadJavaAgentDcmdTest.java
--- a/hotspot/make/aix/makefiles/trace.make	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/make/aix/makefiles/trace.make	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2016, 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
@@ -57,11 +57,6 @@
 TraceGeneratedNames +=  \
 	traceRequestables.hpp \
     traceEventControl.hpp
-
-ifneq ($(INCLUDE_TRACE), false)
-TraceGeneratedNames += traceProducer.cpp
-endif
-
 endif
 
 TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
@@ -100,9 +95,6 @@
 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
-$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
-	$(GENERATE_CODE)
-
 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
--- a/hotspot/make/bsd/makefiles/trace.make	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/make/bsd/makefiles/trace.make	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2016, 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
@@ -57,11 +57,6 @@
 TraceGeneratedNames +=  \
 	traceRequestables.hpp \
     traceEventControl.hpp
-
-ifneq ($(INCLUDE_TRACE), false)
-TraceGeneratedNames += traceProducer.cpp
-endif
-
 endif
 
 
@@ -101,9 +96,6 @@
 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
-$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
-	$(GENERATE_CODE)
-
 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
--- a/hotspot/make/linux/makefiles/trace.make	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/make/linux/makefiles/trace.make	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2016, 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
@@ -57,11 +57,6 @@
 TraceGeneratedNames +=  \
 	traceRequestables.hpp \
     traceEventControl.hpp
-
-ifneq ($(INCLUDE_TRACE), false)
-TraceGeneratedNames += traceProducer.cpp
-endif
-
 endif
 
 TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
@@ -100,9 +95,6 @@
 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
-$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
-	$(GENERATE_CODE)
-
 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
--- a/hotspot/make/solaris/makefiles/trace.make	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/make/solaris/makefiles/trace.make	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2016, 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
@@ -56,8 +56,7 @@
 ifeq ($(HAS_ALT_SRC), true)
 TraceGeneratedNames +=  \
 	traceRequestables.hpp \
-    traceEventControl.hpp \
-    traceProducer.cpp
+    traceEventControl.hpp
 endif
 
 TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
@@ -96,9 +95,6 @@
 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
-$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
-	$(GENERATE_CODE)
-
 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
 	$(GENERATE_CODE)
 
--- a/hotspot/make/windows/makefiles/trace.make	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/make/windows/makefiles/trace.make	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2016, 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
@@ -43,8 +43,7 @@
 !if EXISTS($(TraceAltSrcDir))
 TraceGeneratedNames = $(TraceGeneratedNames) \
     traceRequestables.hpp \
-    traceEventControl.hpp \
-    traceProducer.cpp
+    traceEventControl.hpp
 !endif
 
 
@@ -58,8 +57,7 @@
 !if EXISTS($(TraceAltSrcDir))
 TraceGeneratedFiles = $(TraceGeneratedFiles) \
 	$(TraceOutDir)/traceRequestables.hpp \
-    $(TraceOutDir)/traceEventControl.hpp \
-	$(TraceOutDir)/traceProducer.cpp
+    $(TraceOutDir)/traceEventControl.hpp
 !endif
 
 XSLT = $(QUIETLY) $(REMOTE) $(RUN_JAVA) -classpath $(JvmtiOutDir) jvmtiGen
@@ -98,10 +96,6 @@
 	@echo Generating AltSrc $@
 	@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceAltSrcDir)/traceEventClasses.xsl -OUT $(TraceOutDir)/traceEventClasses.hpp
 
-$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
-	@echo Generating AltSrc $@
-	@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceAltSrcDir)/traceProducer.xsl -OUT $(TraceOutDir)/traceProducer.cpp
-
 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
 	@echo Generating AltSrc $@
 	@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceAltSrcDir)/traceRequestables.xsl -OUT $(TraceOutDir)/traceRequestables.hpp
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/development/Server16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/development/Server24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/About16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/About24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Delete16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Delete24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Find16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Help16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Help24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/History16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/History24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Information16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Information24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/New16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/New24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Open16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Open24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Save24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/SaveAs16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/SaveAs24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/Zoom16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/ZoomIn16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/general/ZoomIn24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/navigation/Down16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/navigation/Up16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignCenter16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignCenter24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignLeft16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignLeft24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignRight16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/images/toolbarButtonGraphics/text/AlignRight24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/development/Server16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/development/Server24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/About16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/About24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Delete16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Delete24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Find16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Help16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Help24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/History16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/History24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Information16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Information24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/New16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/New24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Open16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Open24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Save24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/SaveAs16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/SaveAs24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/Zoom16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/ZoomIn16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/general/ZoomIn24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/navigation/Down16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/navigation/Up16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/text/AlignCenter16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/text/AlignCenter24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/text/AlignLeft16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/text/AlignLeft24.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/text/AlignRight16.gif has changed
Binary file hotspot/src/jdk.hotspot.agent/share/classes/toolbarButtonGraphics/text/AlignRight24.gif has changed
--- a/hotspot/src/share/vm/c1/c1_Compiler.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/c1/c1_Compiler.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -228,8 +228,6 @@
   case vmIntrinsics::_getCharStringU:
   case vmIntrinsics::_putCharStringU:
 #ifdef TRACE_HAVE_INTRINSICS
-  case vmIntrinsics::_classID:
-  case vmIntrinsics::_threadID:
   case vmIntrinsics::_counterTime:
 #endif
     break;
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -43,6 +43,9 @@
 #if INCLUDE_ALL_GCS
 #include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
+#ifdef TRACE_HAVE_INTRINSICS
+#include "trace/traceMacros.hpp"
+#endif
 
 #ifdef ASSERT
 #define __ gen()->lir(__FILE__, __LINE__)->
@@ -3067,42 +3070,7 @@
   __ move(reg, result);
 }
 
-#ifdef TRACE_HAVE_INTRINSICS
-void LIRGenerator::do_ThreadIDIntrinsic(Intrinsic* x) {
-    LIR_Opr thread = getThreadPointer();
-    LIR_Opr osthread = new_pointer_register();
-    __ move(new LIR_Address(thread, in_bytes(JavaThread::osthread_offset()), osthread->type()), osthread);
-    size_t thread_id_size = OSThread::thread_id_size();
-    if (thread_id_size == (size_t) BytesPerLong) {
-      LIR_Opr id = new_register(T_LONG);
-      __ move(new LIR_Address(osthread, in_bytes(OSThread::thread_id_offset()), T_LONG), id);
-      __ convert(Bytecodes::_l2i, id, rlock_result(x));
-    } else if (thread_id_size == (size_t) BytesPerInt) {
-      __ move(new LIR_Address(osthread, in_bytes(OSThread::thread_id_offset()), T_INT), rlock_result(x));
-    } else {
-      ShouldNotReachHere();
-    }
-}
-
-void LIRGenerator::do_ClassIDIntrinsic(Intrinsic* x) {
-    CodeEmitInfo* info = state_for(x);
-    CodeEmitInfo* info2 = new CodeEmitInfo(info); // Clone for the second null check
-    BasicType klass_pointer_type = NOT_LP64(T_INT) LP64_ONLY(T_LONG);
-    assert(info != NULL, "must have info");
-    LIRItem arg(x->argument_at(1), this);
-    arg.load_item();
-    LIR_Opr klass = new_pointer_register();
-    __ move(new LIR_Address(arg.result(), java_lang_Class::klass_offset_in_bytes(), klass_pointer_type), klass, info);
-    LIR_Opr id = new_register(T_LONG);
-    ByteSize offset = TRACE_ID_OFFSET;
-    LIR_Address* trace_id_addr = new LIR_Address(klass, in_bytes(offset), T_LONG);
-    __ move(trace_id_addr, id);
-    __ logical_or(id, LIR_OprFact::longConst(0x01l), id);
-    __ store(id, trace_id_addr);
-    __ logical_and(id, LIR_OprFact::longConst(~0x3l), id);
-    __ move(id, rlock_result(x));
-}
-#endif
+
 
 void LIRGenerator::do_Intrinsic(Intrinsic* x) {
   switch (x->id()) {
@@ -3115,8 +3083,6 @@
   }
 
 #ifdef TRACE_HAVE_INTRINSICS
-  case vmIntrinsics::_threadID: do_ThreadIDIntrinsic(x); break;
-  case vmIntrinsics::_classID: do_ClassIDIntrinsic(x); break;
   case vmIntrinsics::_counterTime:
     do_RuntimeCall(CAST_FROM_FN_PTR(address, TRACE_TIME_METHOD), x);
     break;
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -440,10 +440,7 @@
   void do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux);
 
   void do_RuntimeCall(address routine, Intrinsic* x);
-#ifdef TRACE_HAVE_INTRINSICS
-  void do_ThreadIDIntrinsic(Intrinsic* x);
-  void do_ClassIDIntrinsic(Intrinsic* x);
-#endif
+
   ciKlass* profile_type(ciMethodData* md, int md_first_offset, int md_offset, intptr_t profiled_k,
                         Value arg, LIR_Opr& mdp, bool not_null, ciKlass* signature_at_call_k,
                         ciKlass* callee_signature_k);
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -5380,7 +5380,7 @@
     }
   }
 
-  TRACE_INIT_ID(ik);
+  TRACE_INIT_KLASS_ID(ik);
 
   // If we reach here, all is well.
   // Now remove the InstanceKlass* from the _klass_to_deallocate field
--- a/hotspot/src/share/vm/classfile/klassFactory.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/classfile/klassFactory.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, 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
@@ -29,6 +29,7 @@
 #include "classfile/klassFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/jvmtiEnvBase.hpp"
+#include "trace/traceMacros.hpp"
 
 static ClassFileStream* prologue(ClassFileStream* stream,
                                  Symbol* name,
@@ -136,5 +137,7 @@
     result->set_cached_class_file(cached_class_file);
   }
 
+  TRACE_KLASS_CREATION(result, parser, THREAD);
+
   return result;
 }
--- a/hotspot/src/share/vm/classfile/vmSymbols.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/classfile/vmSymbols.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -328,8 +328,6 @@
   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
   switch(id) {
 #ifdef TRACE_HAVE_INTRINSICS
-  case vmIntrinsics::_classID:
-  case vmIntrinsics::_threadID:
   case vmIntrinsics::_counterTime:
 #endif
   case vmIntrinsics::_currentTimeMillis:
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -615,7 +615,7 @@
   : DefNewGeneration(rs, initial_byte_size, "PCopy"),
   _overflow_list(NULL),
   _is_alive_closure(this),
-  _plab_stats(YoungPLABSize, PLABWeight)
+  _plab_stats("Young", YoungPLABSize, PLABWeight)
 {
   NOT_PRODUCT(_overflow_counter = ParGCWorkQueueOverflowInterval;)
   NOT_PRODUCT(_num_par_pushes = 0;)
@@ -1008,9 +1008,7 @@
   from()->set_concurrent_iteration_safe_limit(from()->top());
   to()->set_concurrent_iteration_safe_limit(to()->top());
 
-  if (ResizePLAB) {
-    plab_stats()->adjust_desired_plab_sz();
-  }
+  plab_stats()->adjust_desired_plab_sz();
 
   TASKQUEUE_STATS_ONLY(thread_state_set.print_termination_stats());
   TASKQUEUE_STATS_ONLY(thread_state_set.print_taskqueue_stats());
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1760,8 +1760,8 @@
   _young_list(new YoungList(this)),
   _gc_time_stamp(0),
   _summary_bytes_used(0),
-  _survivor_evac_stats(YoungPLABSize, PLABWeight),
-  _old_evac_stats(OldPLABSize, PLABWeight),
+  _survivor_evac_stats("Young", YoungPLABSize, PLABWeight),
+  _old_evac_stats("Old", OldPLABSize, PLABWeight),
   _expand_heap_after_alloc_failure(true),
   _old_marking_cycles_started(0),
   _old_marking_cycles_completed(0),
@@ -3384,6 +3384,10 @@
 
         g1_policy()->clear_collection_set();
 
+        record_obj_copy_mem_stats();
+        _survivor_evac_stats.adjust_desired_plab_sz();
+        _old_evac_stats.adjust_desired_plab_sz();
+
         // Start a new incremental collection set for the next pause.
         g1_policy()->start_incremental_cset_building();
 
@@ -4701,11 +4705,6 @@
 
   merge_per_thread_state_info(per_thread_states);
 
-  record_obj_copy_mem_stats();
-
-  _survivor_evac_stats.adjust_desired_plab_sz();
-  _old_evac_stats.adjust_desired_plab_sz();
-
   // Reset and re-enable the hot card cache.
   // Note the counts for the cards in the regions in the
   // collection set are reset when the collection set is freed.
--- a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1097,7 +1097,7 @@
     reset_marking_state();
   } else {
     {
-      GCTraceTime(Debug, gc) trace("GC Aggregate Data", g1h->gc_timer_cm());
+      GCTraceTime(Debug, gc) trace("Aggregate Data", g1h->gc_timer_cm());
 
       // Aggregate the per-task counting data that we have accumulated
       // while marking.
@@ -2018,7 +2018,7 @@
   // Inner scope to exclude the cleaning of the string and symbol
   // tables from the displayed time.
   {
-    GCTraceTime(Debug, gc) trace("GC Ref Proc", g1h->gc_timer_cm());
+    GCTraceTime(Debug, gc) trace("Reference Processing", g1h->gc_timer_cm());
 
     ReferenceProcessor* rp = g1h->ref_processor_cm();
 
--- a/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -29,15 +29,26 @@
 #include "logging/log.hpp"
 #include "trace/tracing.hpp"
 
+void G1EvacStats::log_plab_allocation() {
+  PLABStats::log_plab_allocation();
+  log_debug(gc, plab)("%s other allocation: "
+                      "region end waste: " SIZE_FORMAT "B, "
+                      "regions filled: %u, "
+                      "direct allocated: " SIZE_FORMAT "B, "
+                      "failure used: " SIZE_FORMAT "B, "
+                      "failure wasted: " SIZE_FORMAT "B",
+                      _description,
+                      _region_end_waste * HeapWordSize,
+                      _regions_filled,
+                      _direct_allocated * HeapWordSize,
+                      _failure_used * HeapWordSize,
+                      _failure_waste * HeapWordSize);
+}
+
 void G1EvacStats::adjust_desired_plab_sz() {
+  log_plab_allocation();
+
   if (!ResizePLAB) {
-    log_debug(gc, plab)(" (allocated = " SIZE_FORMAT " wasted = " SIZE_FORMAT " "
-                        "unused = " SIZE_FORMAT " used = " SIZE_FORMAT " "
-                        "undo_waste = " SIZE_FORMAT " region_end_waste = " SIZE_FORMAT " "
-                        "regions filled = %u direct_allocated = " SIZE_FORMAT " "
-                        "failure_used = " SIZE_FORMAT " failure_waste = " SIZE_FORMAT ") ",
-                        _allocated, _wasted, _unused, used(), _undo_wasted, _region_end_waste,
-                        _regions_filled, _direct_allocated, _failure_used, _failure_waste);
     // Clear accumulators for next round.
     reset();
     return;
@@ -107,18 +118,19 @@
   // Latch the result
   _desired_net_plab_sz = plab_sz;
 
-  log_debug(gc, plab)(" (allocated = " SIZE_FORMAT " wasted = " SIZE_FORMAT " "
-                      "unused = " SIZE_FORMAT " used = " SIZE_FORMAT " "
-                      "undo_waste = " SIZE_FORMAT " region_end_waste = " SIZE_FORMAT " "
-                      "regions filled = %u direct_allocated = " SIZE_FORMAT " "
-                      "failure_used = " SIZE_FORMAT " failure_waste = " SIZE_FORMAT ") "
-                      " (plab_sz = " SIZE_FORMAT " desired_plab_sz = " SIZE_FORMAT ")",
-                      _allocated, _wasted, _unused, used(), _undo_wasted, _region_end_waste,
-                      _regions_filled, _direct_allocated, _failure_used, _failure_waste,
-                      cur_plab_sz, plab_sz);
-
+  log_sizing(cur_plab_sz, plab_sz);
   // Clear accumulators for next round.
   reset();
 }
 
+G1EvacStats::G1EvacStats(const char* description, size_t desired_plab_sz_, unsigned wt) :
+  PLABStats(description, desired_plab_sz_, wt),
+  _region_end_waste(0),
+  _regions_filled(0),
+  _direct_allocated(0),
+  _failure_used(0),
+  _failure_waste(0) {
+}
+
+
 G1EvacStats::~G1EvacStats() { }
--- a/hotspot/src/share/vm/gc/g1/g1EvacStats.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1EvacStats.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -51,20 +51,15 @@
     _failure_waste = 0;
   }
 
+  virtual void log_plab_allocation();
+
  public:
-  G1EvacStats(size_t desired_plab_sz_, unsigned wt) : PLABStats(desired_plab_sz_, wt),
-    _region_end_waste(0), _regions_filled(0), _direct_allocated(0),
-    _failure_used(0), _failure_waste(0) {
-  }
+  G1EvacStats(const char* description, size_t desired_plab_sz_, unsigned wt);
+
+  ~G1EvacStats();
 
   virtual void adjust_desired_plab_sz();
 
-  size_t allocated() const { return _allocated; }
-  size_t wasted() const { return _wasted; }
-  size_t unused() const { return _unused; }
-  size_t used() const { return allocated() - (wasted() + unused()); }
-  size_t undo_wasted() const { return _undo_wasted; }
-
   uint regions_filled() const { return _regions_filled; }
   size_t region_end_waste() const { return _region_end_waste; }
   size_t direct_allocated() const { return _direct_allocated; }
@@ -77,8 +72,6 @@
   inline void add_direct_allocated(size_t value);
   inline void add_region_end_waste(size_t value);
   inline void add_failure_used_and_waste(size_t used, size_t waste);
-
-  ~G1EvacStats();
 };
 
 #endif // SHARE_VM_GC_G1_G1EVACSTATS_HPP
--- a/hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -277,8 +277,8 @@
   }
   debug_line("Choose CSet", (_recorded_young_cset_choice_time_ms + _recorded_non_young_cset_choice_time_ms));
   debug_line("Preserve CM Refs", _recorded_preserve_cm_referents_time_ms);
-  debug_line("Ref Proc", _cur_ref_proc_time_ms);
-  debug_line("Ref Enq", _cur_ref_enq_time_ms);
+  debug_line("Reference Processing", _cur_ref_proc_time_ms);
+  debug_line("Reference Enqueuing", _cur_ref_enq_time_ms);
   debug_line("Redirty Cards", _recorded_redirty_logged_cards_time_ms);
   trace_phase(_gc_par_phases[RedirtyCards]);
   trace_phase(_gc_par_phases[PreserveCMReferents]);
--- a/hotspot/src/share/vm/gc/g1/heapRegion.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -781,7 +781,9 @@
           ResourceMark rm;
           _containing_obj->print_on(log.error_stream());
           log.error("points to obj " PTR_FORMAT " in region " HR_FORMAT, p2i(obj), HR_FORMAT_PARAMS(to));
-          obj->print_on(log.error_stream());
+          if (obj->is_oop()) {
+            obj->print_on(log.error_stream());
+          }
           log.error("Obj head CTE = %d, field CTE = %d.", cv_obj, cv_field);
           log.error("----------");
           _failures = true;
--- a/hotspot/src/share/vm/gc/shared/copyFailedInfo.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/shared/copyFailedInfo.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -26,6 +26,7 @@
 #define SHARE_VM_GC_SHARED_COPYFAILEDINFO_HPP
 
 #include "runtime/thread.hpp"
+#include "trace/traceMacros.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 class CopyFailedInfo : public CHeapObj<mtGC> {
@@ -63,26 +64,28 @@
 };
 
 class PromotionFailedInfo : public CopyFailedInfo {
-  OSThread* _thread;
+  traceid _thread_trace_id;
 
  public:
-  PromotionFailedInfo() : CopyFailedInfo(), _thread(NULL) {}
+  PromotionFailedInfo() : CopyFailedInfo(), _thread_trace_id(0) {}
 
   void register_copy_failure(size_t size) {
     CopyFailedInfo::register_copy_failure(size);
-    if (_thread == NULL) {
-      _thread = Thread::current()->osthread();
+    if (_thread_trace_id == 0) {
+      _thread_trace_id = THREAD_TRACE_ID(Thread::current());
     } else {
-      assert(_thread == Thread::current()->osthread(), "The PromotionFailedInfo should be thread local.");
+      assert(THREAD_TRACE_ID(Thread::current()) == _thread_trace_id,
+        "The PromotionFailedInfo should be thread local.");
     }
   }
 
   void reset() {
     CopyFailedInfo::reset();
-    _thread = NULL;
+    _thread_trace_id = 0;
   }
 
-  OSThread* thread() const { return _thread; }
+  traceid thread_trace_id() const { return _thread_trace_id; }
+
 };
 
 class EvacuationFailedInfo : public CopyFailedInfo {};
--- a/hotspot/src/share/vm/gc/shared/gcTraceSend.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/shared/gcTraceSend.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -174,7 +174,7 @@
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
     e.set_data(to_trace_struct(pf_info));
-    e.set_thread(pf_info.thread()->thread_id());
+    e.set_thread(pf_info.thread_trace_id());
     e.commit();
   }
 }
--- a/hotspot/src/share/vm/gc/shared/plab.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/shared/plab.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -110,6 +110,30 @@
   }
 }
 
+void PLABStats::log_plab_allocation() {
+  log_debug(gc, plab)("%s PLAB allocation: "
+                      "allocated: " SIZE_FORMAT "B, "
+                      "wasted: " SIZE_FORMAT "B, "
+                      "unused: " SIZE_FORMAT "B, "
+                      "used: " SIZE_FORMAT "B, "
+                      "undo waste: " SIZE_FORMAT "B, ",
+                      _description,
+                      _allocated * HeapWordSize,
+                      _wasted * HeapWordSize,
+                      _unused * HeapWordSize,
+                      used() * HeapWordSize,
+                      _undo_wasted * HeapWordSize);
+}
+
+void PLABStats::log_sizing(size_t calculated_words, size_t net_desired_words) {
+  log_debug(gc, plab)("%s sizing: "
+                      "calculated: " SIZE_FORMAT "B, "
+                      "actual: " SIZE_FORMAT "B",
+                      _description,
+                      calculated_words * HeapWordSize,
+                      net_desired_words * HeapWordSize);
+}
+
 // Calculates plab size for current number of gc worker threads.
 size_t PLABStats::desired_plab_sz(uint no_of_gc_workers) {
   return MAX2(min_size(), (size_t)align_object_size(_desired_net_plab_sz / no_of_gc_workers));
@@ -119,7 +143,13 @@
 // use. This should be called once at the end of parallel
 // scavenge; it clears the sensor accumulators.
 void PLABStats::adjust_desired_plab_sz() {
-  assert(ResizePLAB, "Not set");
+  log_plab_allocation();
+
+  if (!ResizePLAB) {
+    // Clear accumulators for next round.
+    reset();
+    return;
+  }
 
   assert(is_object_aligned(max_size()) && min_size() <= max_size(),
          "PLAB clipping computation may be incorrect");
@@ -150,8 +180,9 @@
   new_plab_sz = MIN2(max_size(), new_plab_sz);
   new_plab_sz = align_object_size(new_plab_sz);
   // Latch the result
-  log_trace(gc, plab)("plab_size = " SIZE_FORMAT " desired_net_plab_sz = " SIZE_FORMAT ") ", recent_plab_sz, new_plab_sz);
   _desired_net_plab_sz = new_plab_sz;
 
+  log_sizing(recent_plab_sz, new_plab_sz);
+
   reset();
 }
--- a/hotspot/src/share/vm/gc/shared/plab.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/gc/shared/plab.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -146,6 +146,8 @@
 // PLAB book-keeping.
 class PLABStats : public CHeapObj<mtGC> {
  protected:
+  const char* _description;   // Identifying string.
+
   size_t _allocated;          // Total allocated
   size_t _wasted;             // of which wasted (internal fragmentation)
   size_t _undo_wasted;        // of which wasted on undo (is not used for calculation of PLAB size)
@@ -160,8 +162,12 @@
     _undo_wasted = 0;
     _unused      = 0;
   }
+
+  virtual void log_plab_allocation();
+  virtual void log_sizing(size_t calculated, size_t net_desired);
  public:
-  PLABStats(size_t desired_net_plab_sz_, unsigned wt) :
+  PLABStats(const char* description, size_t desired_net_plab_sz_, unsigned wt) :
+    _description(description),
     _allocated(0),
     _wasted(0),
     _undo_wasted(0),
@@ -172,6 +178,12 @@
 
   virtual ~PLABStats() { }
 
+  size_t allocated() const { return _allocated; }
+  size_t wasted() const { return _wasted; }
+  size_t unused() const { return _unused; }
+  size_t used() const { return allocated() - (wasted() + unused()); }
+  size_t undo_wasted() const { return _undo_wasted; }
+
   static const size_t min_size() {
     return PLAB::min_size();
   }
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -762,14 +762,6 @@
   ConstantPoolCacheEntry* cp_cache_entry = cache_entry(thread);
   if (cp_cache_entry->is_resolved(bytecode)) return;
 
-  if (bytecode == Bytecodes::_invokeinterface) {
-    if (log_develop_is_enabled(Trace, itables)) {
-      ResourceMark rm(thread);
-      log_develop_trace(itables)("Resolving: klass: %s to method: %s",
-                                 info.resolved_klass()->name()->as_C_string(),
-                                 info.resolved_method()->name()->as_C_string());
-    }
-  }
 #ifdef ASSERT
   if (bytecode == Bytecodes::_invokeinterface) {
     if (info.resolved_method()->method_holder() ==
--- a/hotspot/src/share/vm/oops/arrayKlass.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/oops/arrayKlass.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -89,7 +89,7 @@
     set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
     set_layout_helper(Klass::_lh_neutral_value);
     set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
-    TRACE_INIT_ID(this);
+    TRACE_INIT_KLASS_ID(this);
 }
 
 
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -839,7 +839,7 @@
 
   // support for stub routines
   static ByteSize init_state_offset()  { return in_ByteSize(offset_of(InstanceKlass, _init_state)); }
-  TRACE_DEFINE_OFFSET;
+  TRACE_DEFINE_KLASS_TRACE_ID_OFFSET;
   static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); }
 
   // subclass/subinterface checks
--- a/hotspot/src/share/vm/oops/klass.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/oops/klass.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -494,7 +494,7 @@
 }
 
 void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS) {
-  TRACE_INIT_ID(this);
+  TRACE_INIT_KLASS_ID(this);
   // If an exception happened during CDS restore, some of these fields may already be
   // set.  We leave the class on the CLD list, even if incomplete so that we don't
   // modify the CLD list outside a safepoint.
--- a/hotspot/src/share/vm/oops/klass.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/oops/klass.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -132,7 +132,7 @@
   jint        _modifier_flags;  // Processed access flags, for use by Class.getModifiers.
   AccessFlags _access_flags;    // Access flags. The class/interface distinction is stored here.
 
-  TRACE_DEFINE_KLASS_TRACE_ID;
+  TRACE_DEFINE_TRACE_ID_FIELD;
 
   // Biased locking implementation and statistics
   // (the 64-bit chunk goes first, to avoid some fragmentation)
@@ -569,7 +569,7 @@
   jlong last_biased_lock_bulk_revocation_time() { return _last_biased_lock_bulk_revocation_time; }
   void  set_last_biased_lock_bulk_revocation_time(jlong cur_time) { _last_biased_lock_bulk_revocation_time = cur_time; }
 
-  TRACE_DEFINE_KLASS_METHODS;
+  TRACE_DEFINE_TRACE_ID_METHODS;
 
   // garbage collection support
   void oops_do(OopClosure* cl);
--- a/hotspot/src/share/vm/opto/c2compiler.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -400,8 +400,6 @@
   case vmIntrinsics::_currentThread:
   case vmIntrinsics::_isInterrupted:
 #ifdef TRACE_HAVE_INTRINSICS
-  case vmIntrinsics::_classID:
-  case vmIntrinsics::_threadID:
   case vmIntrinsics::_counterTime:
 #endif
   case vmIntrinsics::_currentTimeMillis:
--- a/hotspot/src/share/vm/opto/library_call.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -49,7 +49,9 @@
 #include "opto/subnode.hpp"
 #include "prims/nativeLookup.hpp"
 #include "runtime/sharedRuntime.hpp"
+#ifdef TRACE_HAVE_INTRINSICS
 #include "trace/traceMacros.hpp"
+#endif
 
 class LibraryIntrinsic : public InlineCallGenerator {
   // Extend the set of intrinsics known to the runtime:
@@ -246,10 +248,7 @@
   bool inline_unsafe_allocate();
   bool inline_unsafe_copyMemory();
   bool inline_native_currentThread();
-#ifdef TRACE_HAVE_INTRINSICS
-  bool inline_native_classID();
-  bool inline_native_threadID();
-#endif
+
   bool inline_native_time_funcs(address method, const char* funcName);
   bool inline_native_isInterrupted();
   bool inline_native_Class_query(vmIntrinsics::ID id);
@@ -642,8 +641,6 @@
   case vmIntrinsics::_isInterrupted:            return inline_native_isInterrupted();
 
 #ifdef TRACE_HAVE_INTRINSICS
-  case vmIntrinsics::_classID:                  return inline_native_classID();
-  case vmIntrinsics::_threadID:                 return inline_native_threadID();
   case vmIntrinsics::_counterTime:              return inline_native_time_funcs(CAST_FROM_FN_PTR(address, TRACE_TIME_METHOD), "counterTime");
 #endif
   case vmIntrinsics::_currentTimeMillis:        return inline_native_time_funcs(CAST_FROM_FN_PTR(address, os::javaTimeMillis), "currentTimeMillis");
@@ -2932,52 +2929,6 @@
   return true;
 }
 
-#ifdef TRACE_HAVE_INTRINSICS
-/*
- * oop -> myklass
- * myklass->trace_id |= USED
- * return myklass->trace_id & ~0x3
- */
-bool LibraryCallKit::inline_native_classID() {
-  null_check_receiver();  // null-check, then ignore
-  Node* cls = null_check(argument(1), T_OBJECT);
-  Node* kls = load_klass_from_mirror(cls, false, NULL, 0);
-  kls = null_check(kls, T_OBJECT);
-  ByteSize offset = TRACE_ID_OFFSET;
-  Node* insp = basic_plus_adr(kls, in_bytes(offset));
-  Node* tvalue = make_load(NULL, insp, TypeLong::LONG, T_LONG, MemNode::unordered);
-  Node* bits = longcon(~0x03l); // ignore bit 0 & 1
-  Node* andl = _gvn.transform(new AndLNode(tvalue, bits));
-  Node* clsused = longcon(0x01l); // set the class bit
-  Node* orl = _gvn.transform(new OrLNode(tvalue, clsused));
-
-  const TypePtr *adr_type = _gvn.type(insp)->isa_ptr();
-  store_to_memory(control(), insp, orl, T_LONG, adr_type, MemNode::unordered);
-  set_result(andl);
-  return true;
-}
-
-bool LibraryCallKit::inline_native_threadID() {
-  Node* tls_ptr = NULL;
-  Node* cur_thr = generate_current_thread(tls_ptr);
-  Node* p = basic_plus_adr(top()/*!oop*/, tls_ptr, in_bytes(JavaThread::osthread_offset()));
-  Node* osthread = make_load(NULL, p, TypeRawPtr::NOTNULL, T_ADDRESS, MemNode::unordered);
-  p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::thread_id_offset()));
-
-  Node* threadid = NULL;
-  size_t thread_id_size = OSThread::thread_id_size();
-  if (thread_id_size == (size_t) BytesPerLong) {
-    threadid = ConvL2I(make_load(control(), p, TypeLong::LONG, T_LONG, MemNode::unordered));
-  } else if (thread_id_size == (size_t) BytesPerInt) {
-    threadid = make_load(control(), p, TypeInt::INT, T_INT, MemNode::unordered);
-  } else {
-    ShouldNotReachHere();
-  }
-  set_result(threadid);
-  return true;
-}
-#endif
-
 //------------------------inline_native_time_funcs--------------
 // inline code for System.currentTimeMillis() and System.nanoTime()
 // these have the same type and signature
--- a/hotspot/src/share/vm/prims/jni.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/prims/jni.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -73,6 +73,7 @@
 #include "runtime/vm_operations.hpp"
 #include "services/memTracker.hpp"
 #include "services/runtimeService.hpp"
+#include "trace/traceMacros.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/dtrace.hpp"
@@ -88,7 +89,7 @@
 #include "jvmci/jvmciRuntime.hpp"
 #endif
 
-static jint CurrentVersion = JNI_VERSION_1_8;
+static jint CurrentVersion = JNI_VERSION_9;
 
 #ifdef _WIN32
 extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
@@ -3929,7 +3930,7 @@
 
     EventThreadStart event;
     if (event.should_commit()) {
-      event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
+      event.set_thread(THREAD_TRACE_ID(thread));
       event.commit();
     }
 
@@ -4149,7 +4150,7 @@
 
   EventThreadStart event;
   if (event.should_commit()) {
-    event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
+    event.set_thread(THREAD_TRACE_ID(thread));
     event.commit();
   }
 
--- a/hotspot/src/share/vm/prims/jni.h	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/prims/jni.h	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -1952,6 +1952,7 @@
 #define JNI_VERSION_1_4 0x00010004
 #define JNI_VERSION_1_6 0x00010006
 #define JNI_VERSION_1_8 0x00010008
+#define JNI_VERSION_9   0x00090000
 
 #ifdef __cplusplus
 } /* extern "C" */
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1433,9 +1433,6 @@
   product(bool, VerifyMergedCPBytecodes, true,                              \
           "Verify bytecodes after RedefineClasses constant pool merging")   \
                                                                             \
-  develop(bool, TraceJNIHandleAllocation, false,                            \
-          "Trace allocation/deallocation of JNI handle blocks")             \
-                                                                            \
   develop(bool, TraceBytecodes, false,                                      \
           "Trace bytecode execution")                                       \
                                                                             \
--- a/hotspot/src/share/vm/runtime/java.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/runtime/java.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -64,6 +64,7 @@
 #include "runtime/timer.hpp"
 #include "runtime/vm_operations.hpp"
 #include "services/memTracker.hpp"
+#include "trace/traceMacros.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/dtrace.hpp"
 #include "utilities/globalDefinitions.hpp"
@@ -485,7 +486,7 @@
 
   EventThreadEnd event;
   if (event.should_commit()) {
-      event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
+      event.set_thread(THREAD_TRACE_ID(thread));
       event.commit();
   }
 
--- a/hotspot/src/share/vm/runtime/jniHandles.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/runtime/jniHandles.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, 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
@@ -278,10 +278,6 @@
       // Allocate new block
       block = new JNIHandleBlock();
       _blocks_allocated++;
-      if (TraceJNIHandleAllocation) {
-        tty->print_cr("JNIHandleBlock " INTPTR_FORMAT " allocated (%d total blocks)",
-                      p2i(block), _blocks_allocated);
-      }
       if (ZapJNIHandleArea) block->zap();
       #ifndef PRODUCT
       // Link new block to list of all allocated blocks
@@ -499,10 +495,6 @@
     // Not as many free handles as we would like - compute number of new blocks to append
     _allocate_before_rebuild = (extra + block_size_in_oops - 1) / block_size_in_oops;
   }
-  if (TraceJNIHandleAllocation) {
-    tty->print_cr("Rebuild free list JNIHandleBlock " INTPTR_FORMAT " blocks=%d used=%d free=%d add=%d",
-                  p2i(this), blocks, total-free, free, _allocate_before_rebuild);
-  }
 }
 
 
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, 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
@@ -401,7 +401,7 @@
 
   if (event.should_commit()) {
     event.set_klass(((oop)this->object())->klass());
-    event.set_previousOwner((TYPE_JAVALANGTHREAD)_previous_owner_tid);
+    event.set_previousOwner((TYPE_THREAD)_previous_owner_tid);
     event.set_address((TYPE_ADDRESS)(uintptr_t)(this->object_addr()));
     event.commit();
   }
@@ -937,7 +937,7 @@
   // get the owner's thread id for the MonitorEnter event
   // if it is enabled and the thread isn't suspended
   if (not_suspended && Tracing::is_event_enabled(TraceJavaMonitorEnterEvent)) {
-    _previous_owner_tid = SharedRuntime::get_java_tid(Self);
+    _previous_owner_tid = THREAD_TRACE_ID(Self);
   }
 #endif
 
@@ -1391,11 +1391,12 @@
                                             jlong notifier_tid,
                                             jlong timeout,
                                             bool timedout) {
+  assert(event != NULL, "invariant");
   event->set_klass(((oop)this->object())->klass());
-  event->set_timeout((TYPE_ULONG)timeout);
-  event->set_address((TYPE_ADDRESS)(uintptr_t)(this->object_addr()));
-  event->set_notifier((TYPE_OSTHREAD)notifier_tid);
-  event->set_timedOut((TYPE_BOOLEAN)timedout);
+  event->set_timeout(timeout);
+  event->set_address((TYPE_ADDRESS)this->object_addr());
+  event->set_notifier(notifier_tid);
+  event->set_timedOut(timedout);
   event->commit();
 }
 
@@ -1655,7 +1656,7 @@
       iterator->TState = ObjectWaiter::TS_ENTER;
     }
     iterator->_notified = 1;
-    iterator->_notifier_tid = Self->osthread()->thread_id();
+    iterator->_notifier_tid = THREAD_TRACE_ID(Self);
 
     ObjectWaiter * list = _EntryList;
     if (list != NULL) {
--- a/hotspot/src/share/vm/runtime/thread.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1694,7 +1694,7 @@
 
   EventThreadStart event;
   if (event.should_commit()) {
-    event.set_javalangthread(java_lang_Thread::thread_id(this->threadObj()));
+    event.set_thread(THREAD_TRACE_ID(this));
     event.commit();
   }
 
@@ -1799,7 +1799,7 @@
     // from java_lang_Thread object
     EventThreadEnd event;
     if (event.should_commit()) {
-      event.set_javalangthread(java_lang_Thread::thread_id(this->threadObj()));
+      event.set_thread(THREAD_TRACE_ID(this));
       event.commit();
     }
 
@@ -3554,6 +3554,10 @@
     return status;
   }
 
+  if (TRACE_INITIALIZE() != JNI_OK) {
+    vm_exit_during_initialization("Failed to initialize tracing backend");
+  }
+
   // Should be done after the heap is fully created
   main_thread->cache_global_variables();
 
@@ -3622,11 +3626,6 @@
 
   quicken_jni_functions();
 
-  // Must be run after init_ft which initializes ft_enabled
-  if (TRACE_INITIALIZE() != JNI_OK) {
-    vm_exit_during_initialization("Failed to initialize tracing backend");
-  }
-
   // No more stub generation allowed after that point.
   StubCodeDesc::freeze();
 
@@ -4134,6 +4133,7 @@
   if (version == JNI_VERSION_1_4) return JNI_TRUE;
   if (version == JNI_VERSION_1_6) return JNI_TRUE;
   if (version == JNI_VERSION_1_8) return JNI_TRUE;
+  if (version == JNI_VERSION_9) return JNI_TRUE;
   return JNI_FALSE;
 }
 
--- a/hotspot/src/share/vm/runtime/thread.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -448,7 +448,8 @@
   void incr_allocated_bytes(jlong size) { _allocated_bytes += size; }
   inline jlong cooked_allocated_bytes();
 
-  TRACE_DATA* trace_data()              { return &_trace_data; }
+  TRACE_DEFINE_THREAD_TRACE_DATA_OFFSET;
+  TRACE_DATA* trace_data() const        { return &_trace_data; }
 
   const ThreadExt& ext() const          { return _ext; }
   ThreadExt& ext()                      { return _ext; }
--- a/hotspot/src/share/vm/runtime/vmThread.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, 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
@@ -359,7 +359,7 @@
       // Only write caller thread information for non-concurrent vm operations.
       // For concurrent vm operations, the thread id is set to 0 indicating thread is unknown.
       // This is because the caller thread could have exited already.
-      event.set_caller(is_concurrent ? 0 : op->calling_thread()->osthread()->thread_id());
+      event.set_caller(is_concurrent ? 0 : THREAD_TRACE_ID(op->calling_thread()));
       event.commit();
     }
 
--- a/hotspot/src/share/vm/trace/trace.xml	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/trace.xml	Thu Mar 03 17:33:13 2016 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
- Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2016, 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
@@ -73,12 +73,12 @@
   <events>
     <event id="ThreadStart" path="java/thread_start" label="Java Thread Start"
            has_thread="true" is_instant="true">
-      <value type="JAVALANGTHREAD" field="javalangthread" label="Java Thread"/>
+      <value type="THREAD" field="thread" label="Java Thread"/>
     </event>
 
     <event id="ThreadEnd" path="java/thread_end" label="Java Thread End"
            has_thread="true" is_instant="true">
-      <value type="JAVALANGTHREAD" field="javalangthread" label="Java Thread"/>
+      <value type="THREAD" field="thread" label="Java Thread"/>
     </event>
 
     <event id="ThreadSleep" path="java/thread_sleep" label="Java Thread Sleep"
@@ -96,14 +96,14 @@
     <event id="JavaMonitorEnter" path="java/monitor_enter" label="Java Monitor Blocked"
             has_thread="true" has_stacktrace="true" is_instant="false">
       <value type="CLASS" field="klass" label="Monitor Class"/>
-      <value type="JAVALANGTHREAD" field="previousOwner" label="Previous Monitor Owner"/>
+      <value type="THREAD" field="previousOwner" label="Previous Monitor Owner"/>
       <value type="ADDRESS" field="address" label="Monitor Address" relation="JAVA_MONITOR_ADDRESS"/>
     </event>
 
     <event id="JavaMonitorWait" path="java/monitor_wait" label="Java Monitor Wait" description="Waiting on a Java monitor"
             has_thread="true" has_stacktrace="true" is_instant="false">
       <value type="CLASS" field="klass" label="Monitor Class" description="Class of object waited on"/>
-      <value type="OSTHREAD" field="notifier" label="Notifier Thread" description="Notifying Thread"/>
+      <value type="THREAD" field="notifier" label="Notifier Thread" description="Notifying Thread"/>
       <value type="MILLIS" field="timeout" label="Timeout" description="Maximum wait time"/>
       <value type="BOOLEAN" field="timedOut" label="Timed Out" description="Wait has been timed out"/>
       <value type="ADDRESS" field="address" label="Monitor Address" description="Address of object waited on" relation="JAVA_MONITOR_ADDRESS"/>
@@ -434,7 +434,7 @@
            description="Promotion of an object failed">
       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
       <structvalue type="CopyFailed" field="data" label="Data"/>
-      <value type="OSTHREAD" field="thread" label="Running thread"/>
+      <value type="THREAD" field="thread" label="Running thread"/>
     </event>
 
     <event id="EvacuationFailed" path="vm/gc/detailed/evacuation_failed" label="Evacuation Failed" is_instant="true"
@@ -496,6 +496,11 @@
       <value type="UINT" field="allocContext" label="Allocation Context" />
     </event>
 
+    <event id="VMError" path="vm/runtime/vm_error" label="VM Error"
+           description="VM shutdown due to an error" has_stacktrace="true" has_thread="true">
+      <value type="BOOLEAN" field="out_of_java_memory" label="Java Out Of Memory"/>
+    </event>
+
     <!-- Compiler events -->
 
     <event id="Compilation" path="vm/compiler/compilation" label="Compilation"
@@ -569,7 +574,7 @@
       <value type="VMOPERATIONTYPE" field="operation" label="Operation" />
       <value type="BOOLEAN" field="safepoint" label="At Safepoint" description="If the operation occured at a safepoint."/>
       <value type="BOOLEAN" field="blocking" label="Caller Blocked" description="If the calling thread was blocked until the operation was complete."/>
-      <value type="OSTHREAD" field="caller" label="Caller" transition="FROM" description="Thread requesting operation. If non-blocking, will be set to 0 indicating thread is unknown."/>
+      <value type="THREAD" field="caller" label="Caller" transition="FROM" description="Thread requesting operation. If non-blocking, will be set to 0 indicating thread is unknown."/>
     </event>
 
     <!-- Allocation events -->
--- a/hotspot/src/share/vm/trace/traceBackend.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/traceBackend.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -47,6 +47,10 @@
 
   static void on_unloading_classes(void) {
   }
+
+  static void on_vm_error(bool) {
+  }
+
 };
 
 class TraceThreadData {
--- a/hotspot/src/share/vm/trace/traceDataTypes.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/traceDataTypes.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -31,39 +31,32 @@
 
 enum {
   CONTENT_TYPE_NONE             = 0,
-  CONTENT_TYPE_BYTES            = 1,
-  CONTENT_TYPE_EPOCHMILLIS      = 2,
-  CONTENT_TYPE_MILLIS           = 3,
-  CONTENT_TYPE_NANOS            = 4,
-  CONTENT_TYPE_TICKS            = 5,
-  CONTENT_TYPE_ADDRESS          = 6,
+  CONTENT_TYPE_CLASS            = 20,
+  CONTENT_TYPE_UTF8             = 21,
+  CONTENT_TYPE_THREAD           = 22,
+  CONTENT_TYPE_STACKTRACE       = 23,
+  CONTENT_TYPE_BYTES            = 24,
+  CONTENT_TYPE_EPOCHMILLIS      = 25,
+  CONTENT_TYPE_MILLIS           = 26,
+  CONTENT_TYPE_NANOS            = 27,
+  CONTENT_TYPE_TICKS            = 28,
+  CONTENT_TYPE_ADDRESS          = 29,
+  CONTENT_TYPE_PERCENTAGE       = 30,
 
-  CONTENT_TYPE_OSTHREAD,
-  CONTENT_TYPE_JAVALANGTHREAD,
-  CONTENT_TYPE_STACKTRACE,
-  CONTENT_TYPE_CLASS,
-  CONTENT_TYPE_PERCENTAGE,
-
-  JVM_CONTENT_TYPES_START       = 30,
-  JVM_CONTENT_TYPES_END         = 100
+  JVM_CONTENT_TYPES_START       = 33,
+  JVM_CONTENT_TYPES_END         = 255
 };
 
 enum ReservedEvent {
-  EVENT_PRODUCERS,
+  EVENT_METADATA,
   EVENT_CHECKPOINT,
   EVENT_BUFFERLOST,
 
-  NUM_RESERVED_EVENTS
+  NUM_RESERVED_EVENTS = JVM_CONTENT_TYPES_END
 };
 
 typedef enum ReservedEvent ReservedEvent;
 
-typedef u8 classid;
-typedef u8 stacktraceid;
-typedef u8 methodid;
-typedef u8 fieldid;
-
-class TraceUnicodeString;
+class Symbol;
 
 #endif // SHARE_VM_TRACE_TRACEDATATYPES_HPP
-
--- a/hotspot/src/share/vm/trace/traceEvent.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/traceEvent.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -62,7 +62,6 @@
     _endTime = time;
   }
 
- public:
   TraceEvent(EventStartTime timing=TIMED) :
     _startTime(0),
     _endTime(0),
@@ -76,12 +75,21 @@
   {
     if (T::is_enabled()) {
       _started = true;
-      if (timing == TIMED && !T::isInstant) {
-        static_cast<T *>(this)->set_starttime(Tracing::time());
+      if (TIMED == timing && !T::isInstant) {
+        static_cast<T*>(this)->set_starttime(Tracing::time());
       }
     }
   }
 
+ public:
+  void set_starttime(const Ticks& time) {
+    _startTime = time.value();
+  }
+
+  void set_endtime(const Ticks& time) {
+    _endTime = time.value();
+  }
+
   static bool is_enabled() {
     return Tracing::is_event_enabled(T::eventId);
   }
@@ -90,67 +98,68 @@
     return _started;
   }
 
-  void ignoreCheck() {
-    DEBUG_ONLY(_ignore_check = true);
-  }
-
   void commit() {
     if (!should_commit()) {
-        cancel();
-        return;
+      DEBUG_ONLY(cancel());
+      return;
     }
-    if (_endTime == 0) {
+    assert(!_cancelled, "Committing an event that has already been cancelled");
+    if (_startTime == 0) {
+      static_cast<T*>(this)->set_starttime(Tracing::time());
+    } else if (_endTime == 0) {
       static_cast<T*>(this)->set_endtime(Tracing::time());
     }
     if (static_cast<T*>(this)->should_write()) {
       static_cast<T*>(this)->writeEvent();
     }
-    set_commited();
+    DEBUG_ONLY(set_commited());
   }
 
-  void set_starttime(const Ticks& time) {
-    _startTime = time.value();
-  }
-
-  void set_endtime(const Ticks& time) {
-    _endTime = time.value();
-  }
-
-  TraceEventId id() const {
+  static TraceEventId id() {
     return T::eventId;
   }
 
-  bool is_instant() const {
+  static bool is_instant() {
     return T::isInstant;
   }
 
-  bool is_requestable() const {
+  static bool is_requestable() {
     return T::isRequestable;
   }
 
-  bool has_thread() const {
+  static bool has_thread() {
     return T::hasThread;
   }
 
-  bool has_stacktrace() const {
+  static bool has_stacktrace() {
     return T::hasStackTrace;
   }
 
   void cancel() {
-    assert(!_committed && !_cancelled, "event was already committed/cancelled");
+    assert(!_committed && !_cancelled,
+      "event was already committed/cancelled");
     DEBUG_ONLY(_cancelled = true);
   }
 
-  void set_commited() {
-    assert(!_committed, "event has already been committed");
-    DEBUG_ONLY(_committed = true);
-  }
-
   ~TraceEvent() {
     if (_started) {
-      assert(_ignore_check || _committed || _cancelled, "event was not committed/cancelled");
+      assert(_ignore_check || _committed || _cancelled,
+        "event was not committed/cancelled");
     }
   }
+
+#ifdef ASSERT
+ protected:
+  void ignoreCheck() {
+    _ignore_check = true;
+  }
+
+ private:
+  void set_commited() {
+    assert(!_committed, "event has already been committed");
+    _committed = true;
+  }
+#endif // ASSERT
 };
 
 #endif // INCLUDE_TRACE
--- a/hotspot/src/share/vm/trace/traceEventClasses.xsl	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/traceEventClasses.xsl	Thu Mar 03 17:33:13 2016 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
- Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2016, 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
@@ -52,8 +52,8 @@
 class TraceEvent {
 public:
   TraceEvent() {}
-  void set_starttime(const Ticks&amp; time) {}
-  void set_endtime(const Ticks&amp; time) {}
+  void set_starttime(const Ticks&amp; ignore) {}
+  void set_endtime(const Ticks&amp; ignore) {}
   bool should_commit() const { return false; }
   static bool is_enabled() { return false; }
   void commit() {}
--- a/hotspot/src/share/vm/trace/traceEventIds.xsl	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/traceEventIds.xsl	Thu Mar 03 17:33:13 2016 +0000
@@ -43,7 +43,7 @@
   _traceeventbase = (NUM_RESERVED_EVENTS-1), // Make sure we start at right index.
   
   // Events -> enum entry
-<xsl:for-each select="trace/events/event">
+<xsl:for-each select="trace/events/*">
   <xsl:value-of select="concat('  Trace', @id, 'Event,', $newline)"/>
 </xsl:for-each>
   MaxTraceEventId
--- a/hotspot/src/share/vm/trace/traceMacros.hpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/traceMacros.hpp	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -25,19 +25,29 @@
 #ifndef SHARE_VM_TRACE_TRACEMACROS_HPP
 #define SHARE_VM_TRACE_TRACEMACROS_HPP
 
+typedef u8 traceid;
+
 #define EVENT_THREAD_EXIT(thread)
 #define EVENT_THREAD_DESTRUCT(thread)
+#define TRACE_KLASS_CREATION(k, p, t)
 
-#define TRACE_INIT_ID(k)
+#define TRACE_INIT_KLASS_ID(k)
+#define TRACE_INIT_THREAD_ID(td)
 #define TRACE_DATA TraceThreadData
 
+#define THREAD_TRACE_ID(thread) ((traceid)thread->osthread()->thread_id())
 #define TRACE_START() JNI_OK
 #define TRACE_INITIALIZE() JNI_OK
 
-#define TRACE_DEFINE_KLASS_METHODS typedef int ___IGNORED_hs_trace_type1
-#define TRACE_DEFINE_KLASS_TRACE_ID typedef int ___IGNORED_hs_trace_type2
-#define TRACE_DEFINE_OFFSET typedef int ___IGNORED_hs_trace_type3
-#define TRACE_ID_OFFSET in_ByteSize(0); ShouldNotReachHere()
+#define TRACE_DEFINE_TRACE_ID_METHODS typedef int ___IGNORED_hs_trace_type1
+#define TRACE_DEFINE_TRACE_ID_FIELD typedef int ___IGNORED_hs_trace_type2
+#define TRACE_DEFINE_KLASS_TRACE_ID_OFFSET typedef int ___IGNORED_hs_trace_type3
+#define TRACE_KLASS_TRACE_ID_OFFSET in_ByteSize(0); ShouldNotReachHere()
+#define TRACE_DEFINE_THREAD_TRACE_DATA_OFFSET typedef int ___IGNORED_hs_trace_type4
+#define TRACE_THREAD_TRACE_DATA_OFFSET in_ByteSize(0); ShouldNotReachHere()
+#define TRACE_DEFINE_THREAD_TRACE_ID_OFFSET typedef int ___IGNORED_hs_trace_type5
+#define TRACE_THREAD_TRACE_ID_OFFSET in_ByteSize(0); ShouldNotReachHere()
+#define TRACE_DEFINE_THREAD_ID_SIZE typedef int ___IGNORED_hs_trace_type6
 #define TRACE_TEMPLATES(template)
 #define TRACE_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)
 
--- a/hotspot/src/share/vm/trace/tracetypes.xml	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/trace/tracetypes.xml	Thu Mar 03 17:33:13 2016 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
- Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2016, 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
@@ -60,27 +60,16 @@
  <types>
   <content_types>
     <content_type id="Thread" hr_name="Thread"
-                  type="U4" builtin_type="OSTHREAD">
-      <value type="UTF8" field="name" label="Thread name"/>
-    </content_type>
-
-    <content_type id="VMThread" hr_name="VM Thread"
-                  type="U8" jvm_type="VMTHREAD">
-      <value type="OSTHREAD" field="thread" label="VM Thread"/>
-    </content_type>
-
-    <content_type id="JavaThread" hr_name="Java thread"
-                  type="U8" builtin_type="JAVALANGTHREAD">
-      <value type="OSTHREAD" field="thread" label="OS Thread ID"/>
-      <value type="BYTES64" field="allocInsideTla"
-             label="Allocated bytes inside TLAs"/>
-      <value type="BYTES64" field="allocOutsideTla"
-             label="Allocated bytes outside TLAs"/>
+                  type="U8" builtin_type="THREAD">
+      <value type="UTF8" field="osName" label="OS Thread Name"/>
+      <value type="LONG" field="osThreadID" label="OS Thread ID"/>
+      <value type="UTF8" field="javaName" label="Java Lang Thread Name"/>
+      <value type="LONG" field="javaThreadID" label="Java Lang Thread ID"/>
       <value type="THREADGROUP" field="group" label="Java Thread Group"/>
     </content_type>
 
     <content_type id="ThreadGroup" hr_name="Thread group"
-                  type="U4" jvm_type="THREADGROUP">
+                  type="U8" jvm_type="THREADGROUP">
       <value type="THREADGROUP" field="parent" label="Parent"/>
       <value type="UTF8" field="name" label="Name"/>
     </content_type>
@@ -107,82 +96,82 @@
     </content_type>
 
     <content_type id="ThreadState" hr_name="Java Thread State"
-                  type="U2" jvm_type="THREADSTATE">
+                  type="U8" jvm_type="THREADSTATE">
       <value type="UTF8" field="name" label="Name"/>
     </content_type>
 
     <content_type id="GCName" hr_name="GC Name"
-                  type="U1" jvm_type="GCNAME">
+                  type="U8" jvm_type="GCNAME">
       <value type="UTF8" field="name" label="name" />
     </content_type>
 
     <content_type id="GCCause" hr_name="GC Cause"
-                  type="U2" jvm_type="GCCAUSE">
+                  type="U8" jvm_type="GCCAUSE">
       <value type="UTF8" field="cause" label="cause" />
     </content_type>
 
     <content_type id="GCWhen" hr_name="GC When"
-                  type="U1" jvm_type="GCWHEN">
+                  type="U8" jvm_type="GCWHEN">
       <value type="UTF8" field="when" label="when" />
     </content_type>
 
     <content_type id="G1HeapRegionType" hr_name="G1 Heap Region Type"
-                  type="U1" jvm_type="G1HEAPREGIONTYPE">
+                  type="U8" jvm_type="G1HEAPREGIONTYPE">
       <value type="UTF8" field="type" label="type" />
     </content_type>
     
     <content_type id="G1YCType" hr_name="G1 YC Type"
-                  type="U1" jvm_type="G1YCTYPE">
+                  type="U8" jvm_type="G1YCTYPE">
       <value type="UTF8" field="type" label="type" />
     </content_type>
 
     <content_type id="GCThresholdUpdater" hr_name="GC Treshold Updater"
-                  type="U1" jvm_type="GCTHRESHOLDUPDATER">
+                  type="U8" jvm_type="GCTHRESHOLDUPDATER">
       <value type="UTF8" field="updater" label="updater" />
     </content_type>
 
     <content_type id="ReferenceType" hr_name="Reference Type"
-                  type="U1" jvm_type="REFERENCETYPE">
+                  type="U8" jvm_type="REFERENCETYPE">
       <value type="UTF8" field="type" label="type" />
     </content_type>
 
     <content_type id="MetadataType" hr_name="Metadata Type"
-                  type="U1" jvm_type="METADATATYPE">
+                  type="U8" jvm_type="METADATATYPE">
       <value type="UTF8" field="type" label="type" />
     </content_type>
 
     <content_type id="MetaspaceObjectType" hr_name="Metaspace Object Type"
-                  type="U1" jvm_type="METASPACEOBJTYPE">
+                  type="U8" jvm_type="METASPACEOBJTYPE">
       <value type="UTF8" field="type" label="type" />
     </content_type>
 
     <content_type id="NARROW_OOP_MODE" hr_name="Narrow Oop Mode"
-                  type="U1" jvm_type="NARROWOOPMODE">
+                  type="U8" jvm_type="NARROWOOPMODE">
       <value type="UTF8" field="mode" label="mode" />
     </content_type>
 
     <content_type id="VMOperationType" hr_name="VM Operation Type"
-                  type="U2" jvm_type="VMOPERATIONTYPE">
+                  type="U8" jvm_type="VMOPERATIONTYPE">
       <value type="UTF8" field="type" label="type" />
     </content_type>
 
     <content_type id="CompilerPhaseType" hr_name="Compiler Phase Type"
-                  type="U1" jvm_type="COMPILERPHASETYPE">
+                  type="U8" jvm_type="COMPILERPHASETYPE">
       <value type="UTF8" field="phase" label="phase" />
     </content_type>
 
     <content_type id="FlagValueOrigin" hr_name="Flag Value Origin"
-                  type="U1" jvm_type="FLAGVALUEORIGIN">
+                  type="U8" jvm_type="FLAGVALUEORIGIN">
       <value type="UTF8" field="origin" label="origin" />
     </content_type>
 
     <content_type id="CodeBlobType" hr_name="Code Blob Type"
-                  type="U1" jvm_type="CODEBLOBTYPE">
+                  type="U8" jvm_type="CODEBLOBTYPE">
       <value type="UTF8" field="type" label="type" />
     </content_type>
 
     <content_type id="InflateCause" hr_name="Inflation Cause"
-                  type="U1" jvm_type="INFLATECAUSE">
+                  type="U8" jvm_type="INFLATECAUSE">
       <value type="UTF8" field="cause" label="cause" />
     </content_type>
   </content_types>
@@ -245,11 +234,11 @@
                   type="bool" sizeop="1"/>
 
     <!-- 32-bit unsigned integer, SEMANTIC value BYTES -->
-    <primary_type symbol="BYTES" datatype="U4" contenttype="BYTES"
-                  type="u4" sizeop="sizeof(u4)"/>
+    <primary_type symbol="BYTES" datatype="U8" contenttype="BYTES"
+                  type="u8" sizeop="sizeof(u8)"/>
 
-    <primary_type symbol="IOBYTES" datatype="U4" contenttype="BYTES"
-                  type="u4" sizeop="sizeof(u4)"/>
+    <primary_type symbol="IOBYTES" datatype="U8" contenttype="BYTES"
+                  type="u8" sizeop="sizeof(u8)"/>
 
     <!-- 64-bit unsigned integer, SEMANTIC value BYTES -->
     <primary_type symbol="BYTES64" datatype="U8" contenttype="BYTES"
@@ -280,122 +269,109 @@
                   type="u8" sizeop="sizeof(u8)"/>
 
     <!-- 32-bit float, SEMANTIC value PERCENTAGE (0.0-1.0) -->
-    <primary_type symbol="PERCENT" datatype="FLOAT" contenttype="PERCENTAGE"
+    <primary_type symbol="PERCENTAGE" datatype="FLOAT" contenttype="PERCENTAGE"
                   type="float" sizeop="sizeof(float)"/>
 
-    <!-- UTF-encoded string, max length 64k -->
+    <!-- UTF8-encoded string, max length Integer.MAX_VALUE -->
     <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(%)"/>
+                  type="const char*" sizeop="sizeof_utf(%)"/>
 
     <!-- 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"
-                  type="Symbol *" sizeop="sizeof(u8)"/>
+                  type="const Symbol*" sizeop="sizeof(u8)"/>
 
     <!-- A Klass *. The actual class is marked as "used" and will
          eventually be written into the recording constant pool -->
     <primary_type symbol="CLASS" datatype="U8" contenttype="CLASS"
-                  type="Klass *" sizeop="sizeof(u8)"/>
+                  type="const Klass*" sizeop="sizeof(u8)"/>
 
     <!-- A Method *. The method is marked as "used" and will eventually be
          written into the recording constant pool. -->
     <primary_type symbol="METHOD" datatype="U8" contenttype="METHOD"
-                  type="Method *" sizeop="sizeof(u8)"/>
+                  type="const Method*" sizeop="sizeof(u8)"/>
 
     <!--  The type for stacktraces in the recording. Shoudl not be used by
           events explicitly -->
     <primary_type symbol="STACKTRACE" datatype="U8" contenttype="STACKTRACE"
                   type="u8" sizeop="sizeof(u8)"/>
 
-    <!-- OS Thread ID -->
-    <primary_type symbol="OSTHREAD" datatype="U4" contenttype="OSTHREAD"
-                  type="u4" sizeop="sizeof(u4)"/>
-
-    <!-- VM Thread ID Note: changed from U2 to U8 for hotspot -->
-    <primary_type symbol="VMTHREAD" datatype="U8" contenttype="VMTHREAD"
-                  type="u8"  sizeop="sizeof(u8)"/>
-
-    <!-- Java Thread ID -->
-    <primary_type symbol="JAVALANGTHREAD" datatype="LONG"
-                  contenttype="JAVALANGTHREAD" type="s8"
-                  sizeop="sizeof(s8)"/>
+    <!-- Thread ID -->
+    <primary_type symbol="THREAD" datatype="U8" contenttype="THREAD"
+                  type="u8" sizeop="sizeof(u8)"/>
 
     <!-- Threadgroup THIS TYPE MAY NOT BE USED IN NORMAL EVENTS (ATM). Only
           for thread constant pool // KK TODO: u8 should be ObjectP -->
-    <primary_type symbol="THREADGROUP" datatype="U4" contenttype="THREADGROUP"
+    <primary_type symbol="THREADGROUP" datatype="U8" contenttype="THREADGROUP"
                   type="u8"
-                  sizeop="sizeof(u4)"/>
+                  sizeop="sizeof(u8)"/>
 
     <!-- FRAMETYPE enum -->
-    <primary_type symbol="FRAMETYPE" datatype="U1" contenttype="FRAMETYPE"
-                  type="u1" sizeop="sizeof(u1)"/>
+    <primary_type symbol="FRAMETYPE" datatype="U8" contenttype="FRAMETYPE"
+                  type="u8" sizeop="sizeof(u8)"/>
 
     <!-- THREADSTATE enum -->
-    <primary_type symbol="THREADSTATE" datatype="U2" contenttype="THREADSTATE"
-                  type="u2" sizeop="sizeof(u2)"/>
+    <primary_type symbol="THREADSTATE" datatype="U8" contenttype="THREADSTATE"
+                  type="u8" sizeop="sizeof(u8)"/>
 
     <!-- GCName -->
-    <primary_type symbol="GCNAME" datatype="U1" contenttype="GCNAME"
-                  type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="GCNAME" datatype="U8" contenttype="GCNAME"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- GCCAUSE -->
-    <primary_type symbol="GCCAUSE" datatype="U2" contenttype="GCCAUSE"
-                  type="u2" sizeop="sizeof(u2)" />
+    <primary_type symbol="GCCAUSE" datatype="U8" contenttype="GCCAUSE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- GCWHEN -->
-    <primary_type symbol="GCWHEN" datatype="U1" contenttype="GCWHEN"
-                  type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="GCWHEN" datatype="U8" contenttype="GCWHEN"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- G1HEAPREGIONTYPE -->
-    <primary_type symbol="G1HEAPREGIONTYPE" datatype="U1" contenttype="G1HEAPREGIONTYPE"
-                  type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="G1HEAPREGIONTYPE" datatype="U8" contenttype="G1HEAPREGIONTYPE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- G1YCType -->
-    <primary_type symbol="G1YCTYPE" datatype="U1" contenttype="G1YCTYPE"
-                  type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="G1YCTYPE" datatype="U8" contenttype="G1YCTYPE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- GCTHRESHOLDUPDATER -->
-    <primary_type symbol="GCTHRESHOLDUPDATER" datatype="U1" contenttype="GCTHRESHOLDUPDATER"
-                  type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="GCTHRESHOLDUPDATER" datatype="U8" contenttype="GCTHRESHOLDUPDATER"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- REFERENCETYPE -->
-    <primary_type symbol="REFERENCETYPE" datatype="U1"
-                  contenttype="REFERENCETYPE" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="REFERENCETYPE" datatype="U8"
+                  contenttype="REFERENCETYPE" type="u8" sizeop="sizeof(u8)" />
 
     <!-- METADATATYPE -->
-    <primary_type symbol="METADATATYPE" datatype="U1"
-                  contenttype="METADATATYPE" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="METADATATYPE" datatype="U8"
+                  contenttype="METADATATYPE" type="u8" sizeop="sizeof(u8)" />
 
     <!-- METADATAOBJTYPE -->
-    <primary_type symbol="METASPACEOBJTYPE" datatype="U1"
-                  contenttype="METASPACEOBJTYPE" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="METASPACEOBJTYPE" datatype="U8"
+                  contenttype="METASPACEOBJTYPE" type="u8" sizeop="sizeof(u8)" />
 
     <!-- NARROWOOPMODE -->
-    <primary_type symbol="NARROWOOPMODE" datatype="U1"
-                  contenttype="NARROWOOPMODE" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="NARROWOOPMODE" datatype="U8"
+                  contenttype="NARROWOOPMODE" type="u8" sizeop="sizeof(u8)" />
 
     <!-- COMPILERPHASETYPE -->
-    <primary_type symbol="COMPILERPHASETYPE" datatype="U1"
-                  contenttype="COMPILERPHASETYPE" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="COMPILERPHASETYPE" datatype="U8"
+                  contenttype="COMPILERPHASETYPE" type="u8" sizeop="sizeof(u8)" />
 
     <!-- VMOPERATIONTYPE -->
-    <primary_type symbol="VMOPERATIONTYPE" datatype="U2" contenttype="VMOPERATIONTYPE"
-                  type="u2" sizeop="sizeof(u2)" />
+    <primary_type symbol="VMOPERATIONTYPE" datatype="U8" contenttype="VMOPERATIONTYPE"
+                  type="u8" sizeop="sizeof(u8)" />
                   
     <!-- FLAGVALUEORIGIN -->
-    <primary_type symbol="FLAGVALUEORIGIN" datatype="U1"
-                  contenttype="FLAGVALUEORIGIN" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="FLAGVALUEORIGIN" datatype="U8"
+                  contenttype="FLAGVALUEORIGIN" type="u8" sizeop="sizeof(u8)" />
                   
     <!-- CODEBLOBTYPE -->
-    <primary_type symbol="CODEBLOBTYPE" datatype="U1"
-                  contenttype="CODEBLOBTYPE" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="CODEBLOBTYPE" datatype="U8"
+                  contenttype="CODEBLOBTYPE" type="u8" sizeop="sizeof(u8)" />
 
     <!-- INFLATECAUSE -->
-    <primary_type symbol="INFLATECAUSE" datatype="U1"
-                  contenttype="INFLATECAUSE" type="u1" sizeop="sizeof(u1)" />
+    <primary_type symbol="INFLATECAUSE" datatype="U8"
+                  contenttype="INFLATECAUSE" type="u8" sizeop="sizeof(u8)" />
   </primary_types>
 </types>
--- a/hotspot/src/share/vm/utilities/debug.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/utilities/debug.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -51,9 +51,14 @@
 #include "services/heapDumper.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/events.hpp"
+#include "utilities/macros.hpp"
 #include "utilities/top.hpp"
 #include "utilities/vmError.hpp"
 
+#if INCLUDE_TRACE
+#include "trace/tracing.hpp"
+#endif
+
 #ifndef ASSERT
 #  ifdef _DEBUG
    // NOTE: don't turn the lines below into a comment -- if you're getting
@@ -280,6 +285,12 @@
    exit(2);
 }
 
+static void notify_tracing() {
+#if INCLUDE_TRACE
+  Tracing::on_vm_error(true);
+#endif
+}
+
 void report_insufficient_metaspace(size_t required_size) {
   warning("\nThe MaxMetaspaceSize of " SIZE_FORMAT " bytes is not large enough.\n"
           "Either don't specify the -XX:MaxMetaspaceSize=<size>\n"
@@ -302,6 +313,8 @@
       HeapDumper::dump_heap_from_oome();
     }
 
+    notify_tracing();
+
     if (OnOutOfMemoryError && OnOutOfMemoryError[0]) {
       VMError::report_java_out_of_memory(message);
     }
--- a/hotspot/src/share/vm/utilities/hashtable.cpp	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/src/share/vm/utilities/hashtable.cpp	Thu Mar 03 17:33:13 2016 +0000
@@ -383,4 +383,9 @@
 template class BasicHashtable<mtSymbol>;
 template class BasicHashtable<mtCode>;
 template class BasicHashtable<mtInternal>;
+#if INCLUDE_TRACE
+template class Hashtable<Symbol*, mtTracing>;
+template class HashtableEntry<Symbol*, mtTracing>;
+template class BasicHashtable<mtTracing>;
+#endif
 template class BasicHashtable<mtCompiler>;
--- a/hotspot/test/gc/g1/TestPLABOutput.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/gc/g1/TestPLABOutput.java	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -65,7 +65,7 @@
 
         System.out.println(output.getStdout());
 
-        String pattern = ".*GC\\(0\\) .*allocated = (\\d+).*";
+        String pattern = ".*GC\\(0\\) .*allocated: (\\d+).*";
         Pattern r = Pattern.compile(pattern);
         Matcher m = r.matcher(output.getStdout());
 
--- a/hotspot/test/gc/g1/plab/TestPLABPromotion.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/gc/g1/plab/TestPLABPromotion.java	Thu Mar 03 17:33:13 2016 +0000
@@ -23,7 +23,7 @@
 
  /*
  * @test TestPLABPromotion
- * @bug 8141278
+ * @bug 8141278 8141141
  * @summary Test PLAB promotion
  * @requires vm.gc=="G1" | vm.gc=="null"
  * @requires vm.opt.FlightRecorder != true
@@ -130,16 +130,15 @@
         long plabAllocatedOld;
         long directAllocatedOld;
         long memAllocated = testCase.getMemToFill();
-        long wordSize = Platform.is32bit() ? 4l : 8l;
         LogParser logParser = new LogParser(output);
 
         Map<String, Long> survivorStats = getPlabStats(logParser, LogParser.ReportType.SURVIVOR_STATS, GC_ID_SURVIVOR_STATS);
         Map<String, Long> oldStats = getPlabStats(logParser, LogParser.ReportType.OLD_STATS, GC_ID_OLD_STATS);
 
-        plabAllocatedSurvivor = wordSize * survivorStats.get("used");
-        directAllocatedSurvivor = wordSize * survivorStats.get("direct_allocated");
-        plabAllocatedOld = wordSize * oldStats.get("used");
-        directAllocatedOld = wordSize * oldStats.get("direct_allocated");
+        plabAllocatedSurvivor = survivorStats.get("used");
+        directAllocatedSurvivor = survivorStats.get("direct allocated");
+        plabAllocatedOld = oldStats.get("used");
+        directAllocatedOld = oldStats.get("direct allocated");
 
         System.out.printf("Survivor PLAB allocated:%17d Direct allocated: %17d Mem consumed:%17d%n", plabAllocatedSurvivor, directAllocatedSurvivor, memAllocated);
         System.out.printf("Old      PLAB allocated:%17d Direct allocated: %17d Mem consumed:%17d%n", plabAllocatedOld, directAllocatedOld, memAllocated);
--- a/hotspot/test/gc/g1/plab/TestPLABResize.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/gc/g1/plab/TestPLABResize.java	Thu Mar 03 17:33:13 2016 +0000
@@ -23,7 +23,7 @@
 
  /*
  * @test TestPLABResize
- * @bug 8141278
+ * @bug 8141278 8141141
  * @summary Test for PLAB resizing
  * @requires vm.gc=="G1" | vm.gc=="null"
  * @requires vm.opt.FlightRecorder != true
@@ -117,7 +117,7 @@
                 .map(item -> {
                     return item.getValue()
                             .get(LogParser.ReportType.SURVIVOR_STATS)
-                            .get("desired_plab_sz");
+                            .get("actual");
                 })
                 .collect(Collectors.toCollection(ArrayList::new));
 
--- a/hotspot/test/gc/g1/plab/lib/LogParser.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/gc/g1/plab/lib/LogParser.java	Thu Mar 03 17:33:13 2016 +0000
@@ -35,14 +35,12 @@
  *
  * Typical GC log with PLAB statistics (options - -Xlog:gc=debug,gc+plab=debug) looks like:
  *
- * [2,244s][info   ][gc     ] GC(30) Concurrent Mark abort
- * [2,245s][debug  ][gc,plab] GC(33)  (allocated = 1 wasted = 0 unused = 0 used = 1 undo_waste = 0 region_end_waste = 0 regions filled = 0 direct_allocated = 0 failure_used = 0 failure_waste = 0)  (plab_sz = 0 desired_plab_sz = 258)
- * [2,245s][debug  ][gc,plab] GC(33)  (allocated = 1 wasted = 0 unused = 0 used = 1 undo_waste = 0 region_end_waste = 0 regions filled = 0 direct_allocated = 0 failure_used = 0 failure_waste = 0)  (plab_sz = 0 desired_plab_sz = 258)
- * [2,245s][info   ][gc     ] GC(33) Pause Young (G1 Evacuation Pause) 127M->127M(128M) (2,244s, 2,245s) 0,899ms
- * [2,246s][debug  ][gc,plab] GC(34)  (allocated = 1 wasted = 0 unused = 0 used = 1 undo_waste = 0 region_end_waste = 0 regions filled = 0 direct_allocated = 0 failure_used = 0 failure_waste = 0)  (plab_sz = 0 desired_plab_sz = 258)
- * [2,246s][debug  ][gc,plab] GC(34)  (allocated = 1 wasted = 0 unused = 0 used = 1 undo_waste = 0 region_end_waste = 0 regions filled = 0 direct_allocated = 0 failure_used = 0 failure_waste = 0)  (plab_sz = 0 desired_plab_sz = 258)
- * [2,246s][info   ][gc     ] GC(34) Pause Initial Mark (G1 Evacuation Pause) 127M->127M(128M) (2,245s, 2,246s) 0,907ms
-
+ * [0.330s][debug][gc,plab  ] GC(0) Young PLAB allocation: allocated: 1825632B, wasted: 29424B, unused: 2320B, used: 1793888B, undo waste: 0B,
+ * [0.330s][debug][gc,plab  ] GC(0) Young other allocation: region end waste: 0B, regions filled: 2, direct allocated: 271520B, failure used: 0B, failure wasted: 0B
+ * [0.330s][debug][gc,plab  ] GC(0) Young sizing: calculated: 358776B, actual: 358776B
+ * [0.330s][debug][gc,plab  ] GC(0) Old PLAB allocation: allocated: 427248B, wasted: 592B, unused: 368584B, used: 58072B, undo waste: 0B,
+ * [0.330s][debug][gc,plab  ] GC(0) Old other allocation: region end waste: 0B, regions filled: 1, direct allocated: 41704B, failure used: 0B, failure wasted: 0B
+ * [0.330s][debug][gc,plab  ] GC(0) Old sizing: calculated: 11608B, actual: 11608B
  */
 final public class LogParser {
 
@@ -53,7 +51,6 @@
      * Type of parsed log element.
      */
     public static enum ReportType {
-
         SURVIVOR_STATS,
         OLD_STATS
     }
@@ -64,8 +61,8 @@
 
     // GC ID
     private static final Pattern GC_ID_PATTERN = Pattern.compile("\\[gc,plab\\s*\\] GC\\((\\d+)\\)");
-    // Pattern for extraction pair <name>=<numeric value>
-    private static final Pattern PAIRS_PATTERN = Pattern.compile("\\w+\\s+=\\s+\\d+");
+    // Pattern for extraction pair <name>: <numeric value>
+    private static final Pattern PAIRS_PATTERN = Pattern.compile("\\w* \\w+:\\s+\\d+");
 
     /**
      * Construct LogParser Object
@@ -108,24 +105,29 @@
                 if (matcher.find()) {
                     Map<ReportType,Map<String, Long>> oneReportItem;
                     ReportType reportType;
-                    // Second line in log is statistics for Old PLAB allocation
-                    if ( !allocationStatistics.containsKey(gc_id.get()) ) {
-                        oneReportItem = new EnumMap<>(ReportType.class);
+
+                    if (!allocationStatistics.containsKey(gc_id.get())) {
+                      allocationStatistics.put(gc_id.get(), new EnumMap<>(ReportType.class));
+                    }
+
+                    if ( line.contains("Young") ) {
                         reportType = ReportType.SURVIVOR_STATS;
-                        allocationStatistics.put(gc_id.get(), oneReportItem);
                     } else {
-                        oneReportItem = allocationStatistics.get(gc_id.get());
                         reportType = ReportType.OLD_STATS;
                     }
 
+                    oneReportItem = allocationStatistics.get(gc_id.get());
+                    if (!oneReportItem.containsKey(reportType)) {
+                      oneReportItem.put(reportType,new HashMap<String, Long>());
+                    }
+
                     // Extract all pairs from log.
-                    HashMap<String, Long> plabStats = new HashMap<>();
+                    Map<String, Long> plabStats = oneReportItem.get(reportType);
                     do {
                         String pair = matcher.group();
-                        String[] nameValue = pair.replaceAll(" ", "").split("=");
-                        plabStats.put(nameValue[0], Long.parseLong(nameValue[1]));
+                        String[] nameValue = pair.replaceAll(": ", ":").split(":");
+                        plabStats.put(nameValue[0].trim(), Long.parseLong(nameValue[1]));
                     } while (matcher.find());
-                    oneReportItem.put(reportType,plabStats);
                 }
             }
         }
--- a/hotspot/test/native_sanity/JniVersion.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/native_sanity/JniVersion.java	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -27,12 +27,12 @@
  */
 public class JniVersion {
 
-    public static final int JNI_VERSION_1_8 = 0x00010008;
+    public static final int JNI_VERSION_9 = 0x00090000;
 
     public static void main(String... args) throws Exception {
         System.loadLibrary("JniVersion");
         int res = getJniVersion();
-        if (res < JNI_VERSION_1_8) {
+        if (res != JNI_VERSION_9) {
             throw new Exception("Unexpected value returned from getJniVersion(): 0x" + Integer.toHexString(res));
         }
     }
--- a/hotspot/test/runtime/logging/ItablesTest.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/runtime/logging/ItablesTest.java	Thu Mar 03 17:33:13 2016 +0000
@@ -49,7 +49,6 @@
             output.shouldContain("invokespecial resolved method: caller-class:ClassB");
             output.shouldContain("invokespecial selected method: resolved-class:ClassB");
             output.shouldContain("invokeinterface selected method: receiver-class");
-            output.shouldContain("Resolving: klass: ");
             output.shouldHaveExitValue(0);
 
             pb = ProcessTools.createJavaProcessBuilder("-Xlog:itables=trace", "ItablesVtableTest");
--- a/hotspot/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java	Thu Mar 03 17:33:13 2016 +0000
@@ -22,6 +22,10 @@
  */
 import java.io.*;
 import java.nio.file.*;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
 import jdk.test.lib.*;
 import jdk.test.lib.dcmd.*;
 import org.testng.annotations.Test;
@@ -55,12 +59,7 @@
                       "'-Dtest.jdk=/path/to/jdk'.");
         }
 
-        Path libpath;
-        if (Platform.isWindows()) {
-            libpath = Paths.get(jdkPath, "bin", "instrument.dll");
-        } else {
-            libpath = Paths.get(jdkPath, "lib", Platform.getOsArch(), "libinstrument.so");
-        }
+        Path libpath = Paths.get(jdkPath, Platform.jdkLibPath(), Platform.sharedObjectName("instrument"));
 
         if (!libpath.toFile().exists()) {
             throw new FileNotFoundException(
@@ -70,31 +69,62 @@
         return libpath.toAbsolutePath().toString();
     }
 
+
+    public void createJarFileForAgent()
+      throws IOException {
+
+        final String jarName = "agent.jar";
+        final String agentClass = "SimpleJvmtiAgent";
+
+        Manifest manifest = new Manifest();
+
+        manifest.getMainAttributes().put(
+             Attributes.Name.MANIFEST_VERSION, "1.0");
+
+        manifest.getMainAttributes().put(
+             new Attributes.Name("Agent-Class"), agentClass);
+
+        JarOutputStream target = null;
+
+        try {
+            target = new
+              JarOutputStream(new FileOutputStream(jarName), manifest);
+            JarEntry entry = new JarEntry(agentClass + ".class");
+            target.putNextEntry(entry);
+            target.closeEntry();
+        } finally {
+            target.close();
+        }
+    }
+
     public void run(CommandExecutor executor)  {
         try{
-            PrintWriter pw = new PrintWriter("MANIFEST.MF");
-            pw.println("Agent-Class: SimpleJvmtiAgent");
-            pw.close();
 
-            ProcessBuilder pb = new ProcessBuilder();
-            pb.command(new String[] { JDKToolFinder.getJDKTool("jar"),
-                                      "cmf",
-                                      "MANIFEST.MF",
-                                      "agent.jar",
-                                      "SimpleJvmtiAgent.class"});
-            pb.start().waitFor();
+            createJarFileForAgent();
 
             String libpath = getLibInstrumentPath();
+            OutputAnalyzer output = null;
 
-            // Test 1: No argument
-            OutputAnalyzer output = executor.execute("JVMTI.agent_load " +
-                                                     libpath + " agent.jar");
+            // Test 1: Native agent, no arguments
+            output = executor.execute("JVMTI.agent_load " +
+                                          libpath + " agent.jar");
             output.stderrShouldBeEmpty();
 
-            // Test 2: With argument
+            // Test 2: Native agent, with arguments
+            output = executor.execute("JVMTI.agent_load " +
+                                          libpath + " \"agent.jar=foo=bar\"");
+            output.stderrShouldBeEmpty();
+
+            // Test 3: Java agent, no arguments
             output = executor.execute("JVMTI.agent_load " +
-                                      libpath + " \"agent.jar=foo=bar\"");
+                                          "agent.jar");
             output.stderrShouldBeEmpty();
+
+            // Test 4: Java agent, with arguments
+            output = executor.execute("JVMTI.agent_load " +
+                                          "\"agent.jar=foo=bar\"");
+            output.stderrShouldBeEmpty();
+
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
--- a/hotspot/test/serviceability/dcmd/jvmti/LoadJavaAgentDcmdTest.java	Thu Mar 03 12:20:22 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2016, 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.
- */
-import java.io.*;
-import jdk.test.lib.*;
-import jdk.test.lib.dcmd.*;
-import org.testng.annotations.Test;
-
-/*
- * Test to attach JVMTI java agent.
- *
- * @test
- * @bug 8147388
- * @library /testlibrary
- * @modules java.base/sun.misc
- *          java.compiler
- *          java.instrument
- *          java.management
- *          jdk.jvmstat/sun.jvmstat.monitor
- * @build ClassFileInstaller jdk.test.lib.* SimpleJvmtiAgent
- * @run main ClassFileInstaller SimpleJvmtiAgent
- * @run testng LoadJavaAgentDcmdTest
- */
-public class LoadJavaAgentDcmdTest {
-    public void run(CommandExecutor executor)  {
-        try{
-            PrintWriter pw = new PrintWriter("MANIFEST.MF");
-            pw.println("Agent-Class: SimpleJvmtiAgent");
-            pw.close();
-
-            ProcessBuilder pb = new ProcessBuilder();
-            pb.command(new String[] { JDKToolFinder.getJDKTool("jar"),
-                                      "cmf",
-                                      "MANIFEST.MF",
-                                      "agent.jar",
-                                      "SimpleJvmtiAgent.class"});
-            pb.start().waitFor();
-
-            // Test 1: No argument
-            OutputAnalyzer output = executor.execute("JVMTI.agent_load " +
-                                                     "agent.jar");
-            output.stderrShouldBeEmpty();
-
-            // Test 2: With argument
-            output = executor.execute("JVMTI.agent_load " +
-                                      "\"agent.jar=foo=bar\"");
-            output.stderrShouldBeEmpty();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    @Test
-    public void jmx() throws Throwable {
-        run(new JMXExecutor());
-    }
-
-    @Test
-    public void cli() throws Throwable {
-        run(new PidJcmdExecutor());
-    }
-}
--- a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, 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
@@ -54,7 +54,6 @@
 
 public class JMapHProfLargeHeapTest {
     private static final String HEAP_DUMP_FILE_NAME = "heap.hprof";
-    private static final String HPROF_HEADER_1_0_1 = "JAVA PROFILE 1.0.1";
     private static final String HPROF_HEADER_1_0_2 = "JAVA PROFILE 1.0.2";
     private static final long M = 1024L;
     private static final long G = 1024L * M;
@@ -79,8 +78,8 @@
             }
         }
 
-        // Small heap 22 megabytes, should create 1.0.1 file format
-        testHProfFileFormat("-Xmx1g", 22 * M, HPROF_HEADER_1_0_1);
+        // All heap dumps should create 1.0.2 file format
+        testHProfFileFormat("-Xmx1g", 22 * M, HPROF_HEADER_1_0_2);
 
         /**
          * This test was deliberately commented out since the test system lacks
--- a/hotspot/test/testlibrary/jdk/test/lib/Platform.java	Thu Mar 03 12:20:22 2016 -0500
+++ b/hotspot/test/testlibrary/jdk/test/lib/Platform.java	Thu Mar 03 17:33:13 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, 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
@@ -203,4 +203,31 @@
     public static boolean canAttachOSX() throws Exception {
         return userName.equals("root");
     }
+
+    /**
+     * return path to library inside jdk tree
+     */
+    public static String jdkLibPath() {
+        if (isWindows()) {
+            return "bin";
+        }
+        if (isOSX()) {
+            return "lib";
+        }
+
+        return "lib/" + getOsArch();
+    }
+
+    /**
+     * Build name of shared object according to platform rules
+     */
+    public static String sharedObjectName(String name) {
+        if (isWindows()) {
+            return name + ".dll";
+        }
+        if (isOSX()) {
+            return "lib" + name + ".dylib";
+        }
+        return "lib" + name + ".so";
+    }
 }