/hg/release/icedtea7-forest-2.3/hotspot: 12 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Mon Jul 23 05:10:59 PDT 2012


changeset 1257f4373a06 in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=1257f4373a06
author: katleman
date: Fri Jul 06 15:02:58 2012 -0700

	Added tag jdk7u6-b18 for changeset df0df4ae5af2


changeset 0aea8f0afd27 in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=0aea8f0afd27
author: katleman
date: Wed Jul 11 11:22:49 2012 -0700

	Added tag jdk7u6-b19 for changeset 1257f4373a06


changeset 43fe30b725f2 in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=43fe30b725f2
author: amurillo
date: Fri Jun 29 16:44:04 2012 -0700

	7180884: new hotspot build - hs23.2-b09
	Reviewed-by: jcoomes


changeset ab0720e5abbb in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=ab0720e5abbb
author: dlong
date: Mon Jun 25 15:34:06 2012 -0400

	7156729: PPC: R_PPC_REL24 relocation error related to some libraries built without -fPIC
	Summary: build powerpc with -fPIC
	Reviewed-by: mikael, vladidan, roland
	Contributed-by: dean.long at oracle.com


changeset 3f142ec74a26 in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=3f142ec74a26
author: kamg
date: Mon Jul 09 18:03:04 2012 -0400

	7167142: Consider a warning when finding a .hotspotrc or .hotspot_compiler file that isn't used
	Summary: Send warnings to output stream
	Reviewed-by: dholmes, fparain


changeset 571bc10e2a37 in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=571bc10e2a37
author: kamg
date: Wed Jul 11 09:17:40 2012 -0400

	7181200: JVM new hashing code breaks SA in product mode
	Summary: Made new_hash() overloaded rather than a virtual function so SA code doesn't need to be changed.
	Reviewed-by: kvn, acorn, dholmes, fparain
	Contributed-by: coleen.phillimore at oracle.com


changeset cfb2ea9dfefd in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=cfb2ea9dfefd
author: minqi
date: Fri Jun 22 15:35:30 2012 -0700

	7175133: jinfo failed to get system properties after 6924259
	Summary: String offset and count fields as fix of 6924259 were removed, and become optional. SA still use offset and count fields to read String contents and failed. Fix if they exist, use them other then use value field only to read, this keeps consistent with the changes in 6924259.
	Reviewed-by: dholmes, mikael
	Contributed-by: yumin.qi at oracle.com


changeset a4b60109cffc in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=a4b60109cffc
author: minqi
date: Fri Jun 22 15:39:16 2012 -0700

	7177128: SA cannot get correct system properties after 7126277
	Summary: Bug fix of 7126277 changed hashing algorithm and also changed key as final field, this led SA unable to set correct value for key. Solution by reading key/value and insert them into the new table.
	Reviewed-by: dholmes, mikael
	Contributed-by: yumin.qi at oracle.com


changeset a0c2fa4baeb6 in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=a0c2fa4baeb6
author: amurillo
date: Fri Jul 13 13:29:49 2012 -0700

	Merge


changeset 1e31ae50c2cf in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=1e31ae50c2cf
author: amurillo
date: Fri Jul 13 13:29:50 2012 -0700

	Added tag hs23.2-b09 for changeset a0c2fa4baeb6


changeset 02a6c89432d7 in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=02a6c89432d7
author: katleman
date: Wed Jul 18 16:10:39 2012 -0700

	Added tag jdk7u6-b20 for changeset 1e31ae50c2cf


changeset 61f041234eec in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=61f041234eec
author: andrew
date: Mon Jul 23 12:29:12 2012 +0100

	Merge jdk7u6-b20


diffstat:

 .hgtags                                                                              |   11 +
 agent/src/os/linux/Makefile                                                          |   11 +-
 agent/src/os/linux/libproc.h                                                         |   29 +-
 agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java                       |   19 +-
 agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java                  |  128 +++++++-
 make/hotspot_version                                                                 |    2 +-
 make/linux/makefiles/defs.make                                                       |   54 ++-
 make/linux/makefiles/gcc.make                                                        |   47 ++-
 make/linux/makefiles/jsig.make                                                       |    6 +-
 make/linux/makefiles/rules.make                                                      |   10 -
 make/linux/makefiles/saproc.make                                                     |    4 +
 make/linux/makefiles/vm.make                                                         |   24 +-
 make/linux/platform_zero.in                                                          |    2 +-
 make/pic.make                                                                        |    9 +-
 make/solaris/makefiles/dtrace.make                                                   |   16 +
 make/solaris/makefiles/jsig.make                                                     |    4 +
 make/solaris/makefiles/rules.make                                                    |   10 -
 make/solaris/makefiles/saproc.make                                                   |    4 +
 make/solaris/makefiles/vm.make                                                       |   12 +
 make/windows/makefiles/vm.make                                                       |    8 +
 src/cpu/x86/vm/c2_globals_x86.hpp                                                    |    2 +-
 src/cpu/zero/vm/deoptimizerFrame_zero.hpp                                            |   53 +++
 src/cpu/zero/vm/methodHandles_zero.hpp                                               |   17 +-
 src/cpu/zero/vm/sharedRuntime_zero.cpp                                               |   19 +-
 src/os/linux/vm/os_linux.cpp                                                         |   39 ++-
 src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp                                  |   11 +-
 src/share/vm/asm/codeBuffer.hpp                                                      |    2 +-
 src/share/vm/ci/ciTypeFlow.cpp                                                       |    2 +-
 src/share/vm/classfile/symbolTable.cpp                                               |   24 -
 src/share/vm/classfile/symbolTable.hpp                                               |   11 -
 src/share/vm/classfile/systemDictionary.cpp                                          |    1 -
 src/share/vm/compiler/compilerOracle.cpp                                             |   13 +-
 src/share/vm/compiler/methodLiveness.cpp                                             |   12 +-
 src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp |    6 +-
 src/share/vm/gc_implementation/g1/concurrentMark.cpp                                 |    2 +-
 src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp                |    4 +-
 src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp                        |    2 +-
 src/share/vm/memory/collectorPolicy.cpp                                              |    2 +-
 src/share/vm/memory/threadLocalAllocBuffer.cpp                                       |    2 +-
 src/share/vm/opto/cfgnode.cpp                                                        |    2 +
 src/share/vm/opto/type.cpp                                                           |    2 +
 src/share/vm/prims/jni.cpp                                                           |    2 +-
 src/share/vm/prims/jvmtiEnv.cpp                                                      |    3 +
 src/share/vm/runtime/arguments.cpp                                                   |   33 +-
 src/share/vm/runtime/globals.hpp                                                     |    2 +-
 src/share/vm/runtime/os.cpp                                                          |    3 +
 src/share/vm/runtime/vmStructs.cpp                                                   |   10 +-
 src/share/vm/shark/sharkCompiler.cpp                                                 |    4 +-
 src/share/vm/utilities/bitMap.hpp                                                    |    2 +-
 src/share/vm/utilities/hashtable.cpp                                                 |   25 +-
 src/share/vm/utilities/hashtable.hpp                                                 |    9 +-
 src/share/vm/utilities/macros.hpp                                                    |   16 +
 src/share/vm/utilities/ostream.cpp                                                   |    2 +-
 src/share/vm/utilities/vmError.cpp                                                   |   10 +-
 test/runtime/6929067/Test6929067.sh                                                  |   35 ++-
 test/runtime/7020373/GenOOMCrashClass.java                                           |  157 ++++++++++
 test/runtime/7020373/Test7020373.sh                                                  |    7 +-
 test/runtime/7020373/testcase.jar                                                    |  Bin 
 58 files changed, 780 insertions(+), 178 deletions(-)

diffs (truncated from 2122 to 500 lines):

diff -r df0df4ae5af2 -r 61f041234eec .hgtags
--- a/.hgtags	Thu Jul 05 23:01:51 2012 -0700
+++ b/.hgtags	Mon Jul 23 12:29:12 2012 +0100
@@ -50,6 +50,7 @@
 faf94d94786b621f8e13cbcc941ca69c6d967c3f jdk7-b73
 f4b900403d6e4b0af51447bd13bbe23fe3a1dac7 jdk7-b74
 d8dd291a362acb656026a9c0a9da48501505a1e7 jdk7-b75
+b4ab978ce52c41bb7e8ee86285e6c9f28122bbe1 icedtea7-1.12
 9174bb32e934965288121f75394874eeb1fcb649 jdk7-b76
 455105fc81d941482f8f8056afaa7aa0949c9300 jdk7-b77
 e703499b4b51e3af756ae77c3d5e8b3058a14e4e jdk7-b78
@@ -87,6 +88,7 @@
 07226e9eab8f74b37346b32715f829a2ef2c3188 hs18-b01
 e7e7e36ccdb5d56edd47e5744351202d38f3b7ad jdk7-b87
 4b60f23c42231f7ecd62ad1fcb6a9ca26fa57d1b jdk7-b88
+a393ff93e7e54dd94cc4211892605a32f9c77dad icedtea7-1.13
 15836273ac2494f36ef62088bc1cb6f3f011f565 jdk7-b89
 4b60f23c42231f7ecd62ad1fcb6a9ca26fa57d1b hs18-b02
 605c9707a766ff518cd841fc04f9bb4b36a3a30b jdk7-b90
@@ -160,6 +162,7 @@
 b898f0fc3cedc972d884d31a751afd75969531cf hs21-b05
 bd586e392d93b7ed7a1636dcc8da2b6a4203a102 jdk7-b136
 bd586e392d93b7ed7a1636dcc8da2b6a4203a102 hs21-b06
+591c7dc0b2ee879f87a7b5519a5388e0d81520be icedtea-1.14
 2dbcb4a4d8dace5fe78ceb563b134f1fb296cd8f jdk7-b137
 2dbcb4a4d8dace5fe78ceb563b134f1fb296cd8f hs21-b07
 0930dc920c185afbf40fed9a655290b8e5b16783 jdk7-b138
@@ -182,6 +185,7 @@
 38fa55e5e79232d48f1bb8cf27d88bc094c9375a hs21-b16
 81d815b05abb564aa1f4100ae13491c949b9a07e jdk7-b147
 81d815b05abb564aa1f4100ae13491c949b9a07e hs21-b17
+7693eb0fce1f6b484cce96c233ea20bdad8a09e0 icedtea-2.0-branchpoint
 9b0ca45cd756d538c4c30afab280a91868eee1a5 jdk7u2-b01
 0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01
 31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02
@@ -210,6 +214,7 @@
 3ba0bb2e7c8ddac172f5b995aae57329cdd2dafa hs22-b10
 f17fe2f4b6aacc19cbb8ee39476f2f13a1c4d3cd jdk7u2-b13
 0744602f85c6fe62255326df595785eb2b32166d jdk7u2-b21
+f8f4d3f9b16567b91bcef4caaa8417c8de8015f0 icedtea-2.1-branchpoint
 a40d238623e5b1ab1224ea6b36dc5b23d0a53880 jdk7u3-b02
 6986bfb4c82e00b938c140f2202133350e6e73f8 jdk7u3-b03
 8e6375b46717d74d4885f839b4e72d03f357a45f jdk7u3-b04
@@ -264,6 +269,7 @@
 f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16
 f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16
 931e5f39e365a0d550d79148ff87a7f9e864d2e1 hs23-b16
+a2c5354863dcb3d147b7b6f55ef514b1bfecf920 icedtea-2.2-branchpoint
 efb5f2662c96c472caa3327090268c75a86dd9c0 jdk7u4-b13
 82e719a2e6416838b4421637646cbfd7104c7716 jdk7u4-b14
 e5f7f95411fb9e837800b4152741c962118e5d7a jdk7u5-b01
@@ -311,3 +317,8 @@
 cefe884c708aa6dfd63aff45f6c698a6bc346791 jdk7u6-b16
 270a40a57b3d05ca64070208dcbb895b5b509d8e hs23.2-b08
 7a37cec9d0d44ae6ea3d26a95407e42d99af6843 jdk7u6-b17
+354cfde7db2f1fd46312d883a63c8a76d5381bab icedtea-2.3-branchpoint
+df0df4ae5af2f40b7f630c53a86e8c3d68ef5b66 jdk7u6-b18
+1257f4373a06f788bd656ae1c7a953a026a285b9 jdk7u6-b19
+a0c2fa4baeb6aad6f33dc87b676b21345794d61e hs23.2-b09
+1e31ae50c2cff8e7945ab8696d4d91f7f83d5d18 jdk7u6-b20
diff -r df0df4ae5af2 -r 61f041234eec agent/src/os/linux/Makefile
--- a/agent/src/os/linux/Makefile	Thu Jul 05 23:01:51 2012 -0700
+++ b/agent/src/os/linux/Makefile	Mon Jul 23 12:29:12 2012 +0100
@@ -23,7 +23,12 @@
 #
 
 ARCH := $(shell if ([ `uname -m` = "ia64" ])  ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
-GCC      = gcc
+
+ifndef BUILD_GCC
+BUILD_GCC = gcc
+endif
+
+GCC      = $(BUILD_GCC)
 
 JAVAH    = ${JAVA_HOME}/bin/javah
 
@@ -40,7 +45,7 @@
 
 LIBS     = -lthread_db
 
-CFLAGS   = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -D_FILE_OFFSET_BITS=64
+CFLAGS   = -c -fPIC -g -D_GNU_SOURCE -D_$(ARCH)_ $(if $(filter $(ARCH),alpha),,-D$(ARCH)) $(INCLUDES) -D_FILE_OFFSET_BITS=64
 
 LIBSA = $(ARCH)/libsaproc.so
 
@@ -73,7 +78,7 @@
 	$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
 
 test.o: test.c
-	$(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
+	$(GCC) -c -o test.o -g -D_GNU_SOURCE -D_$(ARCH)_ $(if $(filter $(ARCH),alpha),,-D$(ARCH)) $(INCLUDES) test.c
 
 test: test.o
 	$(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
diff -r df0df4ae5af2 -r 61f041234eec agent/src/os/linux/libproc.h
--- a/agent/src/os/linux/libproc.h	Thu Jul 05 23:01:51 2012 -0700
+++ b/agent/src/os/linux/libproc.h	Mon Jul 23 12:29:12 2012 +0100
@@ -36,9 +36,34 @@
   These two files define pt_regs structure differently
 */
 #ifdef _LP64
-#include "asm-sparc64/ptrace.h"
+struct pt_regs {
+	unsigned long u_regs[16]; /* globals and ins */
+	unsigned long tstate;
+	unsigned long tpc;
+	unsigned long tnpc;
+	unsigned int y;
+
+	/* We encode a magic number, PT_REGS_MAGIC, along
+	 * with the %tt (trap type) register value at trap
+	 * entry time.  The magic number allows us to identify
+	 * accurately a trap stack frame in the stack
+	 * unwinder, and the %tt value allows us to test
+	 * things like "in a system call" etc. for an arbitray
+	 * process.
+	 *
+	 * The PT_REGS_MAGIC is chosen such that it can be
+	 * loaded completely using just a sethi instruction.
+	 */
+	unsigned int magic;
+};
 #else
-#include "asm-sparc/ptrace.h"
+struct pt_regs {
+	unsigned long psr;
+	unsigned long pc;
+	unsigned long npc;
+	unsigned long y;
+	unsigned long u_regs[16]; /* globals and ins */
+};
 #endif
 
 #endif //sparc or sparcv9
diff -r df0df4ae5af2 -r 61f041234eec agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Thu Jul 05 23:01:51 2012 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Mon Jul 23 12:29:12 2012 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, 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
@@ -141,18 +141,19 @@
   public static String stringOopToString(Oop stringOop) {
     if (offsetField == null) {
       InstanceKlass k = (InstanceKlass) stringOop.getKlass();
-      offsetField = (IntField) k.findField("offset", "I");
-      countField  = (IntField) k.findField("count",  "I");
+      offsetField = (IntField) k.findField("offset", "I");   // optional
+      countField  = (IntField) k.findField("count",  "I");   // optional
       valueField  = (OopField) k.findField("value",  "[C");
       if (Assert.ASSERTS_ENABLED) {
-        Assert.that(offsetField != null &&
-                    countField != null &&
-                    valueField != null, "must find all java.lang.String fields");
+         Assert.that(valueField != null, "Field \'value\' of java.lang.String not found");
       }
     }
-    return charArrayToString((TypeArray) valueField.getValue(stringOop),
-                             offsetField.getValue(stringOop),
-                             countField.getValue(stringOop));
+    if (offsetField != null && countField != null) {
+      return charArrayToString((TypeArray) valueField.getValue(stringOop),
+                               offsetField.getValue(stringOop),
+                               countField.getValue(stringOop));
+    }
+    return  charArrayToString((TypeArray) valueField.getValue(stringOop));
   }
 
   public static String stringOopToEscapedString(Oop stringOop) {
diff -r df0df4ae5af2 -r 61f041234eec agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java	Thu Jul 05 23:01:51 2012 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java	Mon Jul 23 12:29:12 2012 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, 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
@@ -85,6 +85,21 @@
       this(new ProcImageClassLoader());
    }
 
+   static void debugPrintln(String msg) {
+      if (DEBUG) {
+         System.err.println("DEBUG>" + msg);
+      }
+   }
+
+   static void debugPrintStackTrace(Exception exp) {
+      if (DEBUG) {
+         StackTraceElement[] els = exp.getStackTrace();
+         for (int i = 0; i < els.length; i++) {
+            System.err.println("DEBUG>" + els[i].toString());
+         }
+      }
+   }
+
    public Object readObject(Oop oop) throws ClassNotFoundException {
       if (oop instanceof Instance) {
          return readInstance((Instance) oop);
@@ -120,13 +135,96 @@
    }
 
    protected Symbol javaLangString;
+   protected Symbol javaUtilHashtableEntry;
+   protected Symbol javaUtilHashtable;
+   protected Symbol javaUtilProperties;
+
+   protected Symbol getVMSymbol(String name) {
+      return VM.getVM().getSymbolTable().probe(name);
+   }
+
    protected Symbol javaLangString() {
       if (javaLangString == null) {
-         javaLangString = VM.getVM().getSymbolTable().probe("java/lang/String");
+         javaLangString = getVMSymbol("java/lang/String");
       }
       return javaLangString;
    }
 
+   protected Symbol javaUtilHashtableEntry() {
+      if (javaUtilHashtableEntry == null) {
+         javaUtilHashtableEntry = getVMSymbol("java/util/Hashtable$Entry");
+      }
+      return javaUtilHashtableEntry;
+   }
+
+   protected Symbol javaUtilHashtable() {
+      if (javaUtilHashtable == null) {
+         javaUtilHashtable = getVMSymbol("java/util/Hashtable");
+      }
+      return javaUtilHashtable;
+   }
+
+   protected Symbol javaUtilProperties() {
+      if (javaUtilProperties == null) {
+         javaUtilProperties = getVMSymbol("java/util/Properties");
+      }
+      return javaUtilProperties;
+   }
+
+   private void setHashtableEntry(java.util.Hashtable p, Oop oop) {
+      InstanceKlass ik = (InstanceKlass)oop.getKlass();
+      OopField keyField = (OopField)ik.findField("key", "Ljava/lang/Object;");
+      OopField valueField = (OopField)ik.findField("value", "Ljava/lang/Object;");
+      OopField nextField = (OopField)ik.findField("next", "Ljava/util/Hashtable$Entry;");
+      if (DEBUG) {
+         if (Assert.ASSERTS_ENABLED) {
+            Assert.that(ik.getName().equals(javaUtilHashtableEntry()), "Not a Hashtable$Entry?");
+            Assert.that(keyField != null && valueField != null && nextField != null, "Invalid fields!");
+         }
+      }
+
+      Object key = null;
+      Object value = null;
+      Oop next = null;
+      try {
+         key = readObject(keyField.getValue(oop));
+         value = readObject(valueField.getValue(oop));
+         next =  (Oop)nextField.getValue(oop);
+         // For Properties, should use setProperty(k, v). Since it only runs in SA
+         // using put(k, v) should be OK.
+         p.put(key, value);
+         if (next != null) {
+            setHashtableEntry(p, next);
+         }
+      } catch (ClassNotFoundException ce) {
+         if( DEBUG) {
+            debugPrintln("Class not found " + ce);
+            debugPrintStackTrace(ce);
+         }
+      }
+   }
+
+   protected Object getHashtable(Instance oop, boolean isProperties) {
+      InstanceKlass k = (InstanceKlass)oop.getKlass();
+      OopField tableField = (OopField)k.findField("table", "[Ljava/util/Hashtable$Entry;");
+      if (tableField == null) {
+         debugPrintln("Could not find field of [Ljava/util/Hashtable$Entry;");
+         return null;
+      }
+      java.util.Hashtable table = (isProperties) ? new java.util.Properties()
+                                                 : new java.util.Hashtable();
+      ObjArray kvs = (ObjArray)tableField.getValue(oop);
+      long size = kvs.getLength();
+      debugPrintln("Hashtable$Entry Size = " + size);
+      for (long i=0; i<size; i++) {
+         Oop entry = kvs.getObjAt(i);
+         if (entry != null && entry.isInstance()) {
+            setHashtableEntry(table, entry);
+         }
+      }
+      return table;
+   }
+
    public Object readInstance(Instance oop) throws ClassNotFoundException {
       Object result = getFromObjTable(oop);
       if (result == null) {
@@ -134,11 +232,21 @@
          // Handle java.lang.String instances differently. As part of JSR-133, fields of immutable
          // classes have been made final. The algorithm below will not be able to read Strings from
          // debuggee (can't use reflection to set final fields). But, need to read Strings is very
-         // important. FIXME: need a framework to handle many other special cases.
+         // important.
+         // Same for Hashtable, key and hash are final, could not be set in the algorithm too.
+         // FIXME: need a framework to handle many other special cases.
          if (kls.getName().equals(javaLangString())) {
             return OopUtilities.stringOopToString(oop);
          }
 
+         if (kls.getName().equals(javaUtilHashtable())) {
+            return getHashtable(oop, false);
+         }
+
+         if (kls.getName().equals(javaUtilProperties())) {
+            return getHashtable(oop, true);
+         }
+
          Class clz = readClass(kls);
          try {
             result = clz.newInstance();
@@ -164,8 +272,8 @@
                   break;
                } catch (Exception exp) {
                   if (DEBUG) {
-                     System.err.println("Can't create object using " + c);
-                     exp.printStackTrace();
+                     debugPrintln("Can't create object using " + c);
+                     debugPrintStackTrace(exp);
                   }
                }
             }
@@ -329,8 +437,8 @@
                                      arrayObj[ifd.getIndex()] = readObject(field.getValue(getObj()));
                                   } catch (Exception e) {
                                      if (DEBUG) {
-                                        System.err.println("Array element set failed for " + ifd);
-                                        e.printStackTrace();
+                                        debugPrintln("Array element set failed for " + ifd);
+                                        debugPrintStackTrace(e);
                                      }
                                   }
                                }
@@ -348,8 +456,8 @@
 
       private void printFieldSetError(java.lang.reflect.Field f, Exception ex) {
          if (DEBUG) {
-            if (f != null) System.err.println("Field set failed for " + f);
-            ex.printStackTrace();
+            if (f != null) debugPrintln("Field set failed for " + f);
+            debugPrintStackTrace(ex);
          }
       }
 
@@ -601,7 +709,7 @@
             return Class.forName(className, true, cl);
          } catch (Exception e) {
             if (DEBUG) {
-               System.err.println("Can't load class " + className);
+               debugPrintln("Can't load class " + className);
             }
             throw new RuntimeException(e);
          }
diff -r df0df4ae5af2 -r 61f041234eec make/hotspot_version
--- a/make/hotspot_version	Thu Jul 05 23:01:51 2012 -0700
+++ b/make/hotspot_version	Mon Jul 23 12:29:12 2012 +0100
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=23
 HS_MINOR_VER=2
-HS_BUILD_NUMBER=08
+HS_BUILD_NUMBER=09
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
diff -r df0df4ae5af2 -r 61f041234eec make/linux/makefiles/defs.make
--- a/make/linux/makefiles/defs.make	Thu Jul 05 23:01:51 2012 -0700
+++ b/make/linux/makefiles/defs.make	Mon Jul 23 12:29:12 2012 +0100
@@ -228,10 +228,14 @@
 # client and server subdirectories have symbolic links to ../libjsig.so
 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-  ifeq ($(ZIP_DEBUGINFO_FILES),1)
-    EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
-  else
-    EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
+  ifneq ($(ZERO_BUILD), true)
+    ifneq ($(STRIP_POLICY),no_strip)
+      ifeq ($(ZIP_DEBUGINFO_FILES),1)
+        EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
+      else
+        EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
+      endif
+    endif
   endif
 endif
 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
@@ -240,11 +244,15 @@
 ifndef BUILD_CLIENT_ONLY
 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
-  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-    ifeq ($(ZIP_DEBUGINFO_FILES),1)
-      EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
-    else
-      EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
+  ifneq ($(ZERO_BUILD), true)
+    ifneq ($(STRIP_POLICY),no_strip)
+      ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+        ifeq ($(ZIP_DEBUGINFO_FILES),1)
+          EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
+        else
+          EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
+        endif
+      endif
     endif
   endif
 endif
@@ -253,11 +261,13 @@
   ifeq ($(ARCH_DATA_MODEL), 32)
     EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
     EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
-    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-      ifeq ($(ZIP_DEBUGINFO_FILES),1)
-        EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
-      else
-        EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
+    ifneq ($(STRIP_POLICY),no_strip)
+      ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+        ifeq ($(ZIP_DEBUGINFO_FILES),1)
+          EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
+        else
+          EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
+	endif
       endif
     endif
   endif
@@ -270,12 +280,16 @@
 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
                         $(EXPORT_LIB_DIR)/sa-jdi.jar 
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-  ifeq ($(ZIP_DEBUGINFO_FILES),1)
-    ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
-    ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
-  else
-    ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
-    ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+  ifneq ($(ZERO_BUILD), true)
+    ifneq ($(STRIP_POLICY),no_strip)
+      ifeq ($(ZIP_DEBUGINFO_FILES),1)
+        ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+        ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+      else
+        ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+        ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+      endif
+    endif
   endif
 endif
 ADD_SA_BINARIES/ppc   = 
diff -r df0df4ae5af2 -r 61f041234eec make/linux/makefiles/gcc.make
--- a/make/linux/makefiles/gcc.make	Thu Jul 05 23:01:51 2012 -0700
+++ b/make/linux/makefiles/gcc.make	Mon Jul 23 12:29:12 2012 +0100
@@ -25,19 +25,42 @@
 #------------------------------------------------------------------------
 # CC, CXX & AS
 
-# When cross-compiling the ALT_COMPILER_PATH points
-# to the cross-compilation toolset
+ifndef HOST_GCC
 ifdef CROSS_COMPILE_ARCH
-CXX = $(ALT_COMPILER_PATH)/g++
-CC  = $(ALT_COMPILER_PATH)/gcc
-HOSTCXX = g++
-HOSTCC  = gcc
+HOST_GCC = gcc
 else
-CXX = g++
-CC  = gcc
-HOSTCXX = $(CXX)
-HOSTCC  = $(CC)
+HOST_GCC = $(CC)
 endif
+endif
+
+ifndef HOST_CXX
+ifdef CROSS_COMPILE_ARCH
+HOST_CXX = g++
+else
+HOST_CXX = $(CXX)
+endif
+endif
+
+ifndef BUILD_GCC
+ifdef CROSS_COMPILE_ARCH



More information about the distro-pkg-dev mailing list