hg: jdk6/jdk6/hotspot: 3 new changesets
Andrew John Hughes
gnu_andrew at member.fsf.org
Wed Feb 17 14:04:45 PST 2010
On 17 February 2010 18:45, Daniel D. Daugherty <Daniel.Daugherty at sun.com> wrote:
> Andrew John Hughes wrote:
>
> On 15 December 2009 01:47, <daniel.daugherty at sun.com> wrote:
>
>
>
> Changeset: 98cd9901c161
> Author: dcubed
> Date: 2009-12-14 10:05 -0700
> URL: http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/98cd9901c161
>
> 6849968: 3/2 JVMTI tests fails on jdk5.0 with hs14
> Summary: If a JVMTI agent asks for version 1.0, then it should get version
> 1.0 semantics.
> Reviewed-by: dholmes, ohair
>
> ! src/share/vm/prims/jvmtiEnv.cpp
> ! src/share/vm/prims/jvmtiEnvBase.cpp
> ! src/share/vm/prims/jvmtiEnvBase.hpp
> ! src/share/vm/prims/jvmtiExport.cpp
> ! src/share/vm/prims/jvmtiExport.hpp
> ! src/share/vm/prims/jvmtiHpp.xsl
>
>
>
> When trying to update OpenJDK6 to HotSpot 16 this is causing a build
> failure:
>
> g++ -DLINUX -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I../generated/adfiles
> -I../generated/jvmtifiles
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/asm
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/ci
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/classfile
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/code
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/compiler
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/gc_implementation
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/gc_implementation/shared
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/gc_implementation/g1
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/gc_implementation/parNew
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/gc_implementation/parallelScavenge
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/gc_interface
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/interpreter
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/libadt
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/memory
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/oops
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/opto
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/prims
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/runtime
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/services
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/utilities
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/cpu/x86/vm
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/os/linux/vm
> -I/home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/os_cpu/linux_x86/vm
> -I../generated -DHOTSPOT_RELEASE_VERSION="\"16.0-b13\""
> -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"andrew\""
> -DHOTSPOT_LIB_ARCH=\"amd64\"
> -DJRE_RELEASE_VERSION="\"1.6.0-internal-andrew_17_feb_2010_12_54-b00\""
> -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DCOMPILER2 -fPIC -fno-rtti
> -fno-exceptions -D_REENTRANT -fcheck-new -m64 -pipe -O3
> -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1
> -fno-omit-frame-pointer -Werror -Wpointer-arith -Wsign-compare -c
> -o jvmtiEnvThreadState.o
> /home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/prims/jvmtiEnvThreadState.cpp
> /home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp:126:
> error: prototype for 'JvmtiEnvBase::JvmtiEnvBase()' does not match any
> in class 'JvmtiEnvBase'
> /home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp:44:
> error: candidates are: JvmtiEnvBase::JvmtiEnvBase(const JvmtiEnvBase&)
> /home/andrew/projects/openjdk/upstream/jdk6/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp:95:
> error: JvmtiEnvBase::JvmtiEnvBase(jint)
>
> Is the fix still necessary? If so,is there an appropriate default
> version we could use to provide a no-arg constructor again?
>
>
> Yes, the fix is necessary. I'm a bit confused why you would think
> that it was not still necessary.
Because the summary says 'fails on jdk5.0 with hs14' and I'm bumping
OpenJDK6 to hs16 which may no longer require the fix. But if you say
it's still needed, it's still needed.
From the context you provided here
> I'm not sure why you need a no-args constructor.
Once the changesets from the HotSpot 16 master
(http://hg.openjdk.java.net/hsx/hsx16/master) are merged in, the build
fails as shown above. It fails because your patch changes the
constructor of JvmtiEnvBase from taking no arguments to taking an
integer version.
I pushed this
> changeset to HSX-16.2 for that release's b01 snapshot back when I
> fixed this bug. I suspect that the same port can be used in HSX16
> for OpenJDK6...
>
It's not in the hs16 master. In my diffs between the hs16 master and
the merged OpenJDK6 hs16, it still shows up as being local to
OpenJDK6's HotSpot. I've attached the diff to this mail.
> Dan
>
>
BTW, can you please send mails to the list in plain text rather than
HTML. Thanks.
--
Andrew :-)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
-------------- next part --------------
diff -Bw -x .hg -u -r ../hs16/agent/test/jdi/sagtest.java hotspot/agent/test/jdi/sagtest.java
--- ../hs16/agent/test/jdi/sagtest.java 2010-01-13 14:34:28.484184122 +0000
+++ hotspot/agent/test/jdi/sagtest.java 2009-09-23 12:26:43.700820601 +0100
@@ -23,7 +23,8 @@
*/
/**
- * @test * @bug 0000000
+ * @test
+ * @bug 0000000
* @summary This is just an exercise of various JDI elements for use in
* testing the SA/JDI client
*
Only in hotspot: build
Only in hotspot: filelist
diff -Bw -x .hg -u -r ../hs16/.hgignore hotspot/.hgignore
--- ../hs16/.hgignore 2010-01-13 14:33:56.759119948 +0000
+++ hotspot/.hgignore 2010-02-17 11:04:45.243155130 +0000
@@ -1,5 +1,6 @@
^build/
^dist/
+^webrev/
^nbproject/private/
^src/share/tools/hsdis/build/
^src/share/tools/IdealGraphVisualizer/[a-zA-Z0-9]*/build/
diff -Bw -x .hg -u -r ../hs16/.hgtags hotspot/.hgtags
--- ../hs16/.hgtags 2010-02-17 10:59:00.252000649 +0000
+++ hotspot/.hgtags 2010-02-17 11:13:04.357102520 +0000
@@ -1,3 +1,20 @@
+c6ff3162647fff9c0f7bb78480540c752b85b852 jdk6-b00
+18c1875ec25d02a0492a3e9c3cfa53901ddd2a42 jdk6-b01
+27bd70733f395900a2f124040cfa5685e1b651e9 jdk6-b02
+09b68131ac308ff4bd0774aef2ed9cf42070a988 jdk6-b03
+56803c1850f1cef078826000140f7f8d4220b094 jdk6-b04
+af6cf5447f2396d30193a917f7db4c5ca2866b1d jdk6-b05
+0efdce94c81266a731b7aa7212998268381ea119 jdk6-b06
+e90f86cbefe7e30b903cd4694510c6f2b19b215f jdk6-b07
+3ab19718c6b72aeb4d648a1f449b103c37902f39 jdk6-b08
+704a1437e4e6c9fa1f829d3129be4b1ae4bc730e jdk6-b09
+3faac600050a0a495433f548d950ba1e3019116c jdk6-b10
+1582a9e498edea164d87f5bc009b535e14d766eb jdk6-b11
+4d2c088a8b496246102281fd8ce4af1901bf802d jdk6-b12
+4083a54479edd01667925402aa3b1c024aa73caa jdk6-b13
+e0966f42f76cca6102bb6d5a1ab19dd04f18fa33 jdk6-b14
+03b2be188619124f38798681c4939f206d263cef jdk6-b15
+ad38cd87d9dfd454a3f1dfd12aa706fe1b666c63 jdk6-b16
a61af66fc99eb5ec9d50c05b0c599757b1289ceb jdk7-b24
7836be3e92d0a4f9ee7566f602c91f5609534e66 jdk7-b25
ad0b851458ff9d1d490ed2d79bb84f75a9fdb753 jdk7-b26
@@ -17,6 +34,8 @@
81a0cbe3b28460ce836109934ece03db7afaf9cc jdk7-b40
f9d938ede1960d18cb7cf23c645b026519c1a678 jdk7-b41
ad8c8ca4ab0f4c86e74c061958f44a8f4a930f2c jdk7-b42
+f6c52a08145746e3f70491dca493a506ff501da0 jdk6-b17
+7dbe24cb959ce98af4a296fb0306a85486a65193 jdk6-b18
fc6a5ae3fef5ebacfa896dbb3ae37715e388e282 jdk7-b43
809e899c638bd9b21836abf9d09ab2a30ff3900b jdk7-b44
945bf754069766e76873c53102fae48abf04cf5b jdk7-b45
diff -Bw -x .hg -u -r ../hs16/.jcheck/conf hotspot/.jcheck/conf
--- ../hs16/.jcheck/conf 2010-01-13 14:33:56.801050923 +0000
+++ hotspot/.jcheck/conf 2009-09-12 12:22:29.774310765 +0100
@@ -1 +1,4 @@
-project=jdk7
+project=jdk6
+whitespace=lax
+comments=lax
+bugids=dup
diff -Bw -x .hg -u -r ../hs16/make/defs.make hotspot/make/defs.make
--- ../hs16/make/defs.make 2010-01-13 14:34:28.718245284 +0000
+++ hotspot/make/defs.make 2010-01-29 13:59:05.820499098 +0000
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2010 Sun Microsystems, Inc. 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
@@ -259,6 +259,7 @@
# Common export list of files
EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmti.h
+EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmticmlr.h
EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h
EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h
EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h
diff -Bw -x .hg -u -r ../hs16/make/hotspot_version hotspot/make/hotspot_version
--- ../hs16/make/hotspot_version 2010-01-13 14:34:28.776157600 +0000
+++ hotspot/make/hotspot_version 2010-02-17 11:16:53.663463234 +0000
@@ -42,4 +42,4 @@
JDK_MICRO_VER=0
# Previous (bootdir) JDK version
-JDK_PREVIOUS_VERSION=1.6.0
+JDK_PREVIOUS_VERSION=1.5.0
diff -Bw -x .hg -u -r ../hs16/make/linux/makefiles/jsig.make hotspot/make/linux/makefiles/jsig.make
--- ../hs16/make/linux/makefiles/jsig.make 2010-01-13 14:34:29.260422725 +0000
+++ hotspot/make/linux/makefiles/jsig.make 2010-02-17 11:04:57.382228319 +0000
@@ -46,6 +46,11 @@
JSIG_DEBUG_CFLAGS = -g
endif
+# DEBUG_BINARIES overrides everything, use full -g debug information
+ifeq ($(DEBUG_BINARIES), true)
+ JSIG_DEBUG_CFLAGS = -g
+endif
+
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
diff -Bw -x .hg -u -r ../hs16/make/Makefile hotspot/make/Makefile
--- ../hs16/make/Makefile 2010-01-13 14:34:28.701504887 +0000
+++ hotspot/make/Makefile 2010-01-29 13:59:05.794258232 +0000
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2010 Sun Microsystems, Inc. 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
@@ -281,10 +281,13 @@
$(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar
$(install-file)
-# Include files (jvmti.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h)
+# Include files (jvmti.h, jvmticmlr.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h)
$(EXPORT_INCLUDE_DIR)/%: $(GEN_DIR)/jvmtifiles/%
$(install-file)
+$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
+ $(install-file)
+
$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
$(install-file)
diff -Bw -x .hg -u -r ../hs16/src/os_cpu/linux_x86/vm/os_linux_x86.cpp hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
--- ../hs16/src/os_cpu/linux_x86/vm/os_linux_x86.cpp 2010-01-13 14:34:41.338417903 +0000
+++ hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp 2010-02-17 11:05:29.033278640 +0000
@@ -598,7 +598,7 @@
//
// Note that %gs is a reserved glibc register since early 2001, so
// applications are not allowed to change its value (Ulrich Drepper from
- // Redhat confirmed that all known offenders have been modified to use
+ // Red Hat confirmed that all known offenders have been modified to use
// either %fs or TSD). In the worst case scenario, when VM is embedded in
// a native application that plays with %gs, we might see non-zero %gs
// even LinuxThreads is running in fixed stack mode. As the result, we'll
diff -Bw -x .hg -u -r ../hs16/src/os_cpu/windows_x86/vm/os_windows_x86.cpp hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
--- ../hs16/src/os_cpu/windows_x86/vm/os_windows_x86.cpp 2010-01-13 14:34:42.707453371 +0000
+++ hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp 2010-02-17 11:05:31.826426566 +0000
@@ -47,7 +47,7 @@
#ifndef AMD64
// We store the current thread in this wrapperthread location
// and determine how far away this address is from the structured
- // execption pointer that FS:[0] points to. This get_thread
+ // exception pointer that FS:[0] points to. This get_thread
// code can then get the thread pointer via FS.
//
// Warning: This routine must NEVER be inlined since we'd end up with
Only in hotspot/src/share/vm/code: jvmticmlr.h
diff -Bw -x .hg -u -r ../hs16/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp
--- ../hs16/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp 2010-01-13 14:35:04.124897075 +0000
+++ hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp 2010-02-17 11:05:51.944321707 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2008 Sun Microsystems, Inc. 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
diff -Bw -x .hg -u -r ../hs16/src/share/vm/includeDB_core hotspot/src/share/vm/includeDB_core
--- ../hs16/src/share/vm/includeDB_core 2010-01-13 14:35:09.469119145 +0000
+++ hotspot/src/share/vm/includeDB_core 2010-02-17 11:16:24.393729381 +0000
@@ -1,5 +1,5 @@
//
-// Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
+// Copyright 1997-2010 Sun Microsystems, Inc. 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
@@ -2502,6 +2502,7 @@
jvmtiExport.hpp handles.hpp
jvmtiExport.hpp iterator.hpp
jvmtiExport.hpp jvmti.h
+jvmtiExport.hpp jvmticmlr.h
jvmtiExport.hpp oop.hpp
jvmtiExport.hpp oopsHierarchy.hpp
@@ -3152,6 +3153,7 @@
oopMapCache.cpp allocation.inline.hpp
oopMapCache.cpp jvmtiRedefineClassesTrace.hpp
oopMapCache.cpp handles.inline.hpp
+oopMapCache.cpp jvmtiRedefineClassesTrace.hpp
oopMapCache.cpp oop.inline.hpp
oopMapCache.cpp oopMapCache.hpp
oopMapCache.cpp resourceArea.hpp
diff -Bw -x .hg -u -r ../hs16/src/share/vm/includeDB_gc_parallel hotspot/src/share/vm/includeDB_gc_parallel
--- ../hs16/src/share/vm/includeDB_gc_parallel 2010-01-13 14:35:09.535360152 +0000
+++ hotspot/src/share/vm/includeDB_gc_parallel 2010-02-17 11:06:13.631129931 +0000
@@ -78,6 +78,7 @@
instanceRefKlass.cpp g1OopClosures.inline.hpp
instanceRefKlass.cpp oop.pcgc.inline.hpp
instanceRefKlass.cpp psPromotionManager.inline.hpp
+instanceRefKlass.cpp oop.pcgc.inline.hpp
instanceRefKlass.cpp psScavenge.inline.hpp
instanceRefKlass.cpp parOopClosures.inline.hpp
diff -Bw -x .hg -u -r ../hs16/src/share/vm/opto/parse2.cpp hotspot/src/share/vm/opto/parse2.cpp
--- ../hs16/src/share/vm/opto/parse2.cpp 2010-01-13 14:35:17.218616672 +0000
+++ hotspot/src/share/vm/opto/parse2.cpp 2010-02-17 11:07:01.105714650 +0000
@@ -912,7 +912,6 @@
if (PrintOpto && Verbose)
tty->print_cr("Never-taken edge stops compilation at bci %d",bci());
#endif
- repush_if_args(); // to gather stats on loop
// We need to mark this branch as taken so that if we recompile we will
// see that it is possible. In the tiered system the interpreter doesn't
// do profiling and by the time we get to the lower tier from the interpreter
diff -Bw -x .hg -u -r ../hs16/src/share/vm/prims/jvmtiEnvBase.hpp hotspot/src/share/vm/prims/jvmtiEnvBase.hpp
--- ../hs16/src/share/vm/prims/jvmtiEnvBase.hpp 2010-01-13 14:35:20.262624829 +0000
+++ hotspot/src/share/vm/prims/jvmtiEnvBase.hpp 2010-02-17 11:07:11.114317440 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, Inc. 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
@@ -76,6 +76,7 @@
jvmtiEnv _jvmti_external;
jint _magic;
+ jint _version; // version value passed to JNI GetEnv()
JvmtiEnvBase* _next;
bool _is_retransformable;
const void *_env_local_storage; // per env agent allocated data.
@@ -91,7 +92,7 @@
int _native_method_prefix_count;
protected:
- JvmtiEnvBase();
+ JvmtiEnvBase(jint version);
~JvmtiEnvBase();
void dispose();
void env_dispose();
@@ -122,6 +123,9 @@
bool is_valid();
+ bool use_version_1_0_semantics(); // agent asked for version 1.0
+ bool use_version_1_1_semantics(); // agent asked for version 1.1
+
bool is_retransformable() { return _is_retransformable; }
static ByteSize jvmti_external_offset() {
diff -Bw -x .hg -u -r ../hs16/src/share/vm/prims/jvmtiEnv.cpp hotspot/src/share/vm/prims/jvmtiEnv.cpp
--- ../hs16/src/share/vm/prims/jvmtiEnv.cpp 2010-01-13 14:35:20.162207346 +0000
+++ hotspot/src/share/vm/prims/jvmtiEnv.cpp 2009-12-27 05:34:22.836483015 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, Inc. 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
@@ -32,15 +32,15 @@
// FIXLATER: hook into JvmtiTrace
#define TraceJVMTICalls false
-JvmtiEnv::JvmtiEnv() : JvmtiEnvBase() {
+JvmtiEnv::JvmtiEnv(jint version) : JvmtiEnvBase(version) {
}
JvmtiEnv::~JvmtiEnv() {
}
JvmtiEnv*
-JvmtiEnv::create_a_jvmti() {
- return new JvmtiEnv();
+JvmtiEnv::create_a_jvmti(jint version) {
+ return new JvmtiEnv(version);
}
// VM operation class to copy jni function table at safepoint.
@@ -411,8 +411,15 @@
if (phase == JVMTI_PHASE_ONLOAD) {
Arguments::append_sysclasspath(segment);
return JVMTI_ERROR_NONE;
- } else {
- assert(phase == JVMTI_PHASE_LIVE, "sanity check");
+ } else if (use_version_1_0_semantics()) {
+ // This JvmtiEnv requested version 1.0 semantics and this function
+ // is only allowed in the ONLOAD phase in version 1.0 so we need to
+ // return an error here.
+ return JVMTI_ERROR_WRONG_PHASE;
+ } else if (phase == JVMTI_PHASE_LIVE) {
+ // The phase is checked by the wrapper that called this function,
+ // but this thread could be racing with the thread that is
+ // terminating the VM so we check one more time.
// create the zip entry
ClassPathZipEntry* zip_entry = ClassLoader::create_class_path_zip_entry(segment);
@@ -433,6 +440,8 @@
}
ClassLoader::add_to_list(zip_entry);
return JVMTI_ERROR_NONE;
+ } else {
+ return JVMTI_ERROR_WRONG_PHASE;
}
} /* end AddToBootstrapClassLoaderSearch */
@@ -451,11 +460,12 @@
}
}
return JVMTI_ERROR_NONE;
- } else {
+ } else if (phase == JVMTI_PHASE_LIVE) {
+ // The phase is checked by the wrapper that called this function,
+ // but this thread could be racing with the thread that is
+ // terminating the VM so we check one more time.
HandleMark hm;
- assert(phase == JVMTI_PHASE_LIVE, "sanity check");
-
// create the zip entry (which will open the zip file and hence
// check that the segment is indeed a zip file).
ClassPathZipEntry* zip_entry = ClassLoader::create_class_path_zip_entry(segment);
@@ -504,6 +514,8 @@
}
return JVMTI_ERROR_NONE;
+ } else {
+ return JVMTI_ERROR_WRONG_PHASE;
}
} /* end AddToSystemClassLoaderSearch */
@@ -2863,6 +2875,14 @@
// is_obsolete_ptr - pre-checked for NULL
jvmtiError
JvmtiEnv::IsMethodObsolete(methodOop method_oop, jboolean* is_obsolete_ptr) {
+ if (use_version_1_0_semantics() &&
+ get_capabilities()->can_redefine_classes == 0) {
+ // This JvmtiEnv requested version 1.0 semantics and this function
+ // requires the can_redefine_classes capability in version 1.0 so
+ // we need to return an error here.
+ return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
+ }
+
if (method_oop == NULL || method_oop->is_obsolete()) {
*is_obsolete_ptr = true;
} else {
diff -Bw -x .hg -u -r ../hs16/src/share/vm/prims/jvmtiExport.cpp hotspot/src/share/vm/prims/jvmtiExport.cpp
--- ../hs16/src/share/vm/prims/jvmtiExport.cpp 2010-01-13 14:35:20.434166284 +0000
+++ hotspot/src/share/vm/prims/jvmtiExport.cpp 2010-02-17 12:18:06.437513390 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2010 Sun Microsystems, Inc. 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
@@ -319,7 +319,27 @@
jint
JvmtiExport::get_jvmti_interface(JavaVM *jvm, void **penv, jint version) {
- /* To Do: add version checks */
+ // The JVMTI_VERSION_INTERFACE_JVMTI part of the version number
+ // has already been validated in JNI GetEnv().
+ int major, minor, micro;
+
+ // micro version doesn't matter here (yet?)
+ decode_version_values(version, &major, &minor, µ);
+ switch (major) {
+ case 1:
+ switch (minor) {
+ case 0: // version 1.0.<micro> is recognized
+ case 1: // version 1.1.<micro> is recognized
+ break;
+
+ default:
+ return JNI_EVERSION; // unsupported minor version number
+ }
+ break;
+
+ default:
+ return JNI_EVERSION; // unsupported major version number
+ }
if (JvmtiEnv::get_phase() == JVMTI_PHASE_LIVE) {
JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
@@ -328,13 +348,13 @@
__ENTRY(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
debug_only(VMNativeEntryWrapper __vew;)
- JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti();
+ JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
*penv = jvmti_env->jvmti_external(); // actual type is jvmtiEnv* -- not to be confused with JvmtiEnv*
return JNI_OK;
} else if (JvmtiEnv::get_phase() == JVMTI_PHASE_ONLOAD) {
// not live, no thread to transition
- JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti();
+ JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
*penv = jvmti_env->jvmti_external(); // actual type is jvmtiEnv* -- not to be confused with JvmtiEnv*
return JNI_OK;
@@ -345,6 +365,15 @@
}
}
+
+void
+JvmtiExport::decode_version_values(jint version, int * major, int * minor,
+ int * micro) {
+ *major = (version & JVMTI_VERSION_MASK_MAJOR) >> JVMTI_VERSION_SHIFT_MAJOR;
+ *minor = (version & JVMTI_VERSION_MASK_MINOR) >> JVMTI_VERSION_SHIFT_MINOR;
+ *micro = (version & JVMTI_VERSION_MASK_MICRO) >> JVMTI_VERSION_SHIFT_MICRO;
+}
+
void JvmtiExport::enter_primordial_phase() {
JvmtiEnvBase::set_phase(JVMTI_PHASE_PRIMORDIAL);
}
@@ -657,11 +686,11 @@
jvmtiAddrLocationMap *_map;
const void *_compile_info;
public:
- JvmtiCompiledMethodLoadEventMark(JavaThread *thread, nmethod *nm)
+ JvmtiCompiledMethodLoadEventMark(JavaThread *thread, nmethod *nm, void* compile_info_ptr = NULL)
: JvmtiMethodEventMark(thread,methodHandle(thread, nm->method())) {
_code_data = nm->code_begin();
_code_size = nm->code_size();
- _compile_info = NULL; /* no info for our VM. */
+ _compile_info = compile_info_ptr; // Set void pointer of compiledMethodLoad Event. Default value is NULL.
JvmtiCodeBlobEvents::build_jvmti_addr_location_map(nm, &_map, &_map_length);
}
~JvmtiCompiledMethodLoadEventMark() {
@@ -1723,6 +1752,46 @@
}
}
+// Returns a record containing inlining information for the given nmethod
+jvmtiCompiledMethodLoadInlineRecord* create_inline_record(nmethod* nm) {
+ jint numstackframes = 0;
+ jvmtiCompiledMethodLoadInlineRecord* record = (jvmtiCompiledMethodLoadInlineRecord*)NEW_RESOURCE_OBJ(jvmtiCompiledMethodLoadInlineRecord);
+ record->header.kind = JVMTI_CMLR_INLINE_INFO;
+ record->header.next = NULL;
+ record->header.majorinfoversion = JVMTI_CMLR_MAJOR_VERSION_1;
+ record->header.minorinfoversion = JVMTI_CMLR_MINOR_VERSION_0;
+ record->numpcs = 0;
+ for(PcDesc* p = nm->scopes_pcs_begin(); p < nm->scopes_pcs_end(); p++) {
+ if(p->scope_decode_offset() == DebugInformationRecorder::serialized_null) continue;
+ record->numpcs++;
+ }
+ record->pcinfo = (PCStackInfo*)(NEW_RESOURCE_ARRAY(PCStackInfo, record->numpcs));
+ int scope = 0;
+ for(PcDesc* p = nm->scopes_pcs_begin(); p < nm->scopes_pcs_end(); p++) {
+ if(p->scope_decode_offset() == DebugInformationRecorder::serialized_null) continue;
+ void* pc_address = (void*)p->real_pc(nm);
+ assert(pc_address != NULL, "pc_address must be non-null");
+ record->pcinfo[scope].pc = pc_address;
+ numstackframes=0;
+ for(ScopeDesc* sd = nm->scope_desc_at(p->real_pc(nm));sd != NULL;sd = sd->sender()) {
+ numstackframes++;
+ }
+ assert(numstackframes != 0, "numstackframes must be nonzero.");
+ record->pcinfo[scope].methods = (jmethodID *)NEW_RESOURCE_ARRAY(jmethodID, numstackframes);
+ record->pcinfo[scope].bcis = (jint *)NEW_RESOURCE_ARRAY(jint, numstackframes);
+ record->pcinfo[scope].numstackframes = numstackframes;
+ int stackframe = 0;
+ for(ScopeDesc* sd = nm->scope_desc_at(p->real_pc(nm));sd != NULL;sd = sd->sender()) {
+ // sd->method() can be NULL for stubs but not for nmethods. To be completely robust, include an assert that we should never see a null sd->method()
+ assert(!sd->method().is_null(), "sd->method() cannot be null.");
+ record->pcinfo[scope].methods[stackframe] = sd->method()->jmethod_id();
+ record->pcinfo[scope].bcis[stackframe] = sd->bci();
+ stackframe++;
+ }
+ scope++;
+ }
+ return record;
+}
void JvmtiExport::post_compiled_method_load(nmethod *nm) {
// If there are pending CompiledMethodUnload events then these are
@@ -1751,7 +1820,11 @@
(nm->method() == NULL) ? "NULL" : nm->method()->name()->as_C_string()));
ResourceMark rm(thread);
- JvmtiCompiledMethodLoadEventMark jem(thread, nm);
+
+ // Add inlining information
+ jvmtiCompiledMethodLoadInlineRecord* inlinerecord = create_inline_record(nm);
+ // Pass inlining information through the void pointer
+ JvmtiCompiledMethodLoadEventMark jem(thread, nm, inlinerecord);
JvmtiJavaThreadEventTransition jet(thread);
jvmtiEventCompiledMethodLoad callback = env->callbacks()->CompiledMethodLoad;
if (callback != NULL) {
diff -Bw -x .hg -u -r ../hs16/src/share/vm/prims/jvmtiExport.hpp hotspot/src/share/vm/prims/jvmtiExport.hpp
--- ../hs16/src/share/vm/prims/jvmtiExport.hpp 2010-01-13 14:35:20.469346934 +0000
+++ hotspot/src/share/vm/prims/jvmtiExport.hpp 2009-12-27 05:34:22.996939589 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2009 Sun Microsystems, Inc. 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
@@ -236,6 +236,8 @@
static bool is_jvmti_version(jint version) { return (version & JVMTI_VERSION_MASK) == JVMTI_VERSION_VALUE; }
static bool is_jvmdi_version(jint version) { return (version & JVMTI_VERSION_MASK) == JVMDI_VERSION_VALUE; }
static jint get_jvmti_interface(JavaVM *jvm, void **penv, jint version);
+ static void decode_version_values(jint version, int * major, int * minor,
+ int * micro);
// single stepping management methods
static void at_single_stepping_point(JavaThread *thread, methodOop method, address location) KERNEL_RETURN;
diff -Bw -x .hg -u -r ../hs16/src/share/vm/prims/jvmtiHpp.xsl hotspot/src/share/vm/prims/jvmtiHpp.xsl
--- ../hs16/src/share/vm/prims/jvmtiHpp.xsl 2010-01-13 14:35:20.612126465 +0000
+++ hotspot/src/share/vm/prims/jvmtiHpp.xsl 2009-12-27 05:34:23.045272139 +0000
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved.
+ Copyright 2002-2009 Sun Microsystems, Inc. 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
@@ -48,12 +48,12 @@
private:
- JvmtiEnv();
+ JvmtiEnv(jint version);
~JvmtiEnv();
public:
- static JvmtiEnv* create_a_jvmti();
+ static JvmtiEnv* create_a_jvmti(jint version);
</xsl:text>
<xsl:apply-templates select="functionsection"/>
diff -Bw -x .hg -u -r ../hs16/src/share/vm/prims/jvmtiTagMap.cpp hotspot/src/share/vm/prims/jvmtiTagMap.cpp
--- ../hs16/src/share/vm/prims/jvmtiTagMap.cpp 2010-01-13 14:35:20.910515313 +0000
+++ hotspot/src/share/vm/prims/jvmtiTagMap.cpp 2010-02-17 11:07:12.432148455 +0000
@@ -3009,15 +3009,6 @@
return false;
}
}
- } else {
- if (is_reporting_primitive_fields()) {
- address addr = (address)k + field->field_offset();
- int slot = field->field_index();
- if (!CallbackInvoker::report_primitive_static_field(mirror, slot, addr, type)) {
- delete field_map;
- return false;
- }
- }
}
}
delete field_map;
diff -Bw -x .hg -u -r ../hs16/src/share/vm/utilities/vmError.hpp hotspot/src/share/vm/utilities/vmError.hpp
--- ../hs16/src/share/vm/utilities/vmError.hpp 2010-01-13 14:35:26.651211783 +0000
+++ hotspot/src/share/vm/utilities/vmError.hpp 2010-02-17 11:07:40.899854566 +0000
@@ -50,7 +50,7 @@
// additional info for VM internal errors
const char * _filename;
- int _lineno;
+ size_t _lineno;
// used by fatal error handler
int _current_step;
Only in hotspot/test/compiler/6775880: Test.java.rej
diff -Bw -x .hg -u -r ../hs16/THIRD_PARTY_README hotspot/THIRD_PARTY_README
--- ../hs16/THIRD_PARTY_README 2010-01-13 14:33:56.880201530 +0000
+++ hotspot/THIRD_PARTY_README 2010-02-17 11:04:45.715330665 +0000
@@ -61,6 +61,28 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
+
+%% This notice is provided with respect to littlecms, which may be included with this software:
+
+Little cms
+Copyright (C) 1998-2004 Marti Maria
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
%% This notice is provided with respect to zlib 1.1.3, which may be included with this software:
Acknowledgments:
@@ -115,16 +137,6 @@
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
____________________________________
This formulation of W3C's notice and license became active on August 14 1998 so as to improve compatibility with GPL. This version ensures that W3C software licensing terms are no more restrictive than GPL and consequently W3C software may be distributed in GPL packages. See the older formulation for the policy prior to this date. Please see our Copyright FAQ for common questions about using materials from our site, including specific terms and conditions for packages like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed to site-policy at w3.org.
-
-%% This notice is provided with respect to jscheme.jar, which may be included with this software:
-Software License Agreement
-Copyright © 1998-2002 by Peter Norvig.
-Permission is granted to anyone to use this software, in source or object code form, on any computer system, and to modify, compile, decompile, run, and redistribute it to anyone else, subject to the following restrictions:
-1.The author makes no warranty of any kind, either expressed or implied, about the suitability of this software for any purpose.
-2.The author accepts no liability of any kind for damages or other consequences of the use of this software, even if they arise from defects in the software.
-3.The origin of this software must not be misrepresented, either by explicit claim or by omission.
-4.Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. Altered versions may be distributed in packages under other licenses (such as the GNU license).
-If you find this software useful, it would be nice if you let me (peter at norvig.com) know about it, and nicer still if you send me modifications that you are willing to share. However, you are not required to do so.
%% This notice is provided with respect to PC/SC Lite for Suse Linux v. 1.1.1, which may be included with this software:
Only in hotspot: TRADEMARK
Only in hotspot: webrev.zip
More information about the jdk6-dev
mailing list