changeset 1956:7dd6319394e9

merge with jdk7-b123
author mcimadamore
date Wed, 05 Jan 2011 10:06:07 +0000
parents 9309cc8778f2 0a8e0d4345b3
children 57053c7bee2c
files make/linux/makefiles/makedeps.make make/solaris/makefiles/makedeps.make make/windows/README make/windows/makefiles/makedeps.make src/os/linux/launcher/java.c src/os/linux/launcher/java.h src/os/linux/launcher/java_md.c src/os/linux/launcher/java_md.h src/os/linux/vm/hpi_linux.cpp src/os/linux/vm/hpi_linux.hpp src/os/solaris/launcher/java.c src/os/solaris/launcher/java.h src/os/solaris/launcher/java_md.c src/os/solaris/launcher/java_md.h src/os/solaris/vm/hpi_solaris.cpp src/os/solaris/vm/hpi_solaris.hpp src/os/windows/vm/hpi_windows.cpp src/os/windows/vm/hpi_windows.hpp src/share/tools/MakeDeps/ArgsParser.java src/share/tools/MakeDeps/BuildConfig.java src/share/tools/MakeDeps/Database.java src/share/tools/MakeDeps/DirectoryTree.java src/share/tools/MakeDeps/DirectoryTreeNode.java src/share/tools/MakeDeps/FileFormatException.java src/share/tools/MakeDeps/FileList.java src/share/tools/MakeDeps/FileName.java src/share/tools/MakeDeps/Macro.java src/share/tools/MakeDeps/MacroDefinitions.java src/share/tools/MakeDeps/MakeDeps.java src/share/tools/MakeDeps/MetroWerksMacPlatform.java src/share/tools/MakeDeps/Platform.java src/share/tools/MakeDeps/UnixPlatform.java src/share/tools/MakeDeps/Util.java src/share/tools/MakeDeps/WinGammaPlatform.java src/share/tools/MakeDeps/WinGammaPlatformVC6.java src/share/tools/MakeDeps/WinGammaPlatformVC7.java src/share/tools/MakeDeps/WinGammaPlatformVC8.java src/share/tools/MakeDeps/WinGammaPlatformVC9.java src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep src/share/vm/gc_implementation/includeDB_gc_g1 src/share/vm/gc_implementation/includeDB_gc_parNew src/share/vm/gc_implementation/includeDB_gc_parallelScavenge src/share/vm/gc_implementation/includeDB_gc_serial src/share/vm/gc_implementation/includeDB_gc_shared src/share/vm/includeDB_compiler1 src/share/vm/includeDB_compiler2 src/share/vm/includeDB_core src/share/vm/includeDB_features src/share/vm/includeDB_gc src/share/vm/includeDB_gc_parallel src/share/vm/includeDB_jvmti src/share/vm/includeDB_shark src/share/vm/includeDB_zero src/share/vm/prims/hpi_imported.h src/share/vm/runtime/hpi.cpp src/share/vm/runtime/hpi.hpp
diffstat 1696 files changed, 36255 insertions(+), 29838 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Dec 14 13:00:01 2010 +0000
+++ b/.hgtags	Wed Jan 05 10:06:07 2011 +0000
@@ -134,3 +134,7 @@
 5484e7c53fa7da5e869902437ee08a9ae10c1c69 jdk7-b119
 f5603a6e50422046ebc0d2f1671d55cb8f1bf1e9 jdk7-b120
 3f3653ab7af8dc1ddb9fa75dad56bf94f89e81a8 jdk7-b121
+3a548dc9cb456110ca8fc1514441a8c3bda0014d jdk7-b122
+5484e7c53fa7da5e869902437ee08a9ae10c1c69 hs20-b03
+9669f9b284108a9ee0a0ccbe215c37a130c9dcf5 jdk7-b123
+9669f9b284108a9ee0a0ccbe215c37a130c9dcf5 hs20-b04
--- a/agent/src/os/linux/libproc_impl.c	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/os/linux/libproc_impl.c	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, 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
--- a/agent/src/os/linux/ps_core.c	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/os/linux/ps_core.c	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, 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
--- a/agent/src/os/linux/ps_proc.c	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/os/linux/ps_proc.c	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, 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
@@ -121,15 +121,13 @@
 #define ptrace_getregs(request, pid, addr, data) ptrace(request, pid, data, addr)
 #endif
 
-#ifdef _LP64
-#ifdef PTRACE_GETREGS64
+#if defined(_LP64) && defined(PTRACE_GETREGS64)
 #define PTRACE_GETREGS_REQ PTRACE_GETREGS64
+#elif defined(PTRACE_GETREGS)
+#define PTRACE_GETREGS_REQ PTRACE_GETREGS
+#elif defined(PT_GETREGS)
+#define PTRACE_GETREGS_REQ PT_GETREGS
 #endif
-#else
-#if defined(PTRACE_GETREGS) || defined(PT_GETREGS)
-#define PTRACE_GETREGS_REQ PTRACE_GETREGS
-#endif
-#endif /* _LP64 */
 
 #ifdef PTRACE_GETREGS_REQ
  if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {
--- a/agent/src/os/linux/symtab.c	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/os/linux/symtab.c	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, 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
--- a/agent/src/os/linux/symtab.h	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/os/linux/symtab.h	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeInvoke.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeInvoke.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithCPIndex.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithCPIndex.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/SystemDictionary.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/memory/SystemDictionary.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java	Wed Jan 05 10:06:07 2011 +0000
@@ -60,10 +60,7 @@
     headerSize  = type.getSize();
     elementSize = 0;
     // fetch constants:
-    MULTI_OPERAND_COUNT_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_multi_operand_count_offset").intValue();
-    MULTI_OPERAND_BASE_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_multi_operand_base_offset").intValue();
     INDY_BSM_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_indy_bsm_offset").intValue();
-    INDY_NT_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_indy_nt_offset").intValue();
     INDY_ARGC_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_indy_argc_offset").intValue();
     INDY_ARGV_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_indy_argv_offset").intValue();
   }
@@ -83,10 +80,7 @@
   private static long headerSize;
   private static long elementSize;
 
-  private static int MULTI_OPERAND_COUNT_OFFSET;
-  private static int MULTI_OPERAND_BASE_OFFSET;
   private static int INDY_BSM_OFFSET;
-  private static int INDY_NT_OFFSET;
   private static int INDY_ARGC_OFFSET;
   private static int INDY_ARGV_OFFSET;
 
@@ -296,20 +290,23 @@
   }
 
   /** Lookup for multi-operand (InvokeDynamic) entries. */
-  public int[] getMultiOperandsAt(int i) {
+  public short[] getBootstrapSpecifierAt(int i) {
     if (Assert.ASSERTS_ENABLED) {
       Assert.that(getTagAt(i).isInvokeDynamic(), "Corrupted constant pool");
     }
-    int pos = this.getIntAt(i);
-    int countPos = pos + MULTI_OPERAND_COUNT_OFFSET;  // == pos-1
-    int basePos  = pos + MULTI_OPERAND_BASE_OFFSET;   // == pos
-    if (countPos < 0)  return null;  // safety first
+    if (getTagAt(i).value() == JVM_CONSTANT_InvokeDynamicTrans)
+        return null;
+    int bsmSpec = extractLowShortFromInt(this.getIntAt(i));
     TypeArray operands = getOperands();
     if (operands == null)  return null;  // safety first
-    int length = operands.getIntAt(countPos);
-    int[] values = new int[length];
-    for (int j = 0; j < length; j++) {
-        values[j] = operands.getIntAt(basePos+j);
+    int basePos = VM.getVM().buildIntFromShorts(operands.getShortAt(bsmSpec * 2 + 0),
+                                                operands.getShortAt(bsmSpec * 2 + 1));
+    int argv = basePos + INDY_ARGV_OFFSET;
+    int argc = operands.getShortAt(basePos + INDY_ARGC_OFFSET);
+    int endPos = argv + argc;
+    short[] values = new short[endPos - basePos];
+    for (int j = 0; j < values.length; j++) {
+        values[j] = operands.getShortAt(basePos+j);
     }
     return values;
   }
@@ -334,6 +331,7 @@
     case JVM_CONSTANT_MethodHandle:       return "JVM_CONSTANT_MethodHandle";
     case JVM_CONSTANT_MethodType:         return "JVM_CONSTANT_MethodType";
     case JVM_CONSTANT_InvokeDynamic:      return "JVM_CONSTANT_InvokeDynamic";
+    case JVM_CONSTANT_InvokeDynamicTrans: return "JVM_CONSTANT_InvokeDynamic/transitional";
     case JVM_CONSTANT_Invalid:            return "JVM_CONSTANT_Invalid";
     case JVM_CONSTANT_UnresolvedClass:    return "JVM_CONSTANT_UnresolvedClass";
     case JVM_CONSTANT_UnresolvedClassInError:    return "JVM_CONSTANT_UnresolvedClassInError";
@@ -393,6 +391,7 @@
         case JVM_CONSTANT_MethodHandle:
         case JVM_CONSTANT_MethodType:
         case JVM_CONSTANT_InvokeDynamic:
+        case JVM_CONSTANT_InvokeDynamicTrans:
           visitor.doInt(new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
           break;
         }
@@ -556,19 +555,16 @@
                   break;
               }
 
+              case JVM_CONSTANT_InvokeDynamicTrans:
               case JVM_CONSTANT_InvokeDynamic: {
                   dos.writeByte(cpConstType);
-                  int[] values = getMultiOperandsAt(ci);
-                  for (int vn = 0; vn < values.length; vn++) {
-                      dos.writeShort(values[vn]);
-                  }
-                  int bootstrapMethodIndex = values[INDY_BSM_OFFSET];
-                  int nameAndTypeIndex = values[INDY_NT_OFFSET];
-                  int argumentCount = values[INDY_ARGC_OFFSET];
-                  assert(INDY_ARGV_OFFSET + argumentCount == values.length);
-                  if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + bootstrapMethodIndex
-                                          + ", N&T = " + nameAndTypeIndex
-                                          + ", argc = " + argumentCount);
+                  int value = getIntAt(ci);
+                  short bsmIndex = (short) extractLowShortFromInt(value);
+                  short nameAndTypeIndex = (short) extractHighShortFromInt(value);
+                  dos.writeShort(bsmIndex);
+                  dos.writeShort(nameAndTypeIndex);
+                  if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + bsmIndex
+                                          + ", N&T = " + nameAndTypeIndex);
                   break;
               }
 
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCache.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCache.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCacheEntry.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCacheEntry.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, 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
--- a/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java	Wed Jan 05 10:06:07 2011 +0000
@@ -321,13 +321,16 @@
                      break;
                 }
 
+                case JVM_CONSTANT_InvokeDynamicTrans:
                 case JVM_CONSTANT_InvokeDynamic: {
                      dos.writeByte(cpConstType);
-                     int[] values = cpool.getMultiOperandsAt(ci);
-                     for (int vn = 0; vn < values.length; vn++) {
-                         dos.writeShort(values[vn]);
-                     }
-                     if (DEBUG) debugMessage("CP[" + ci + "] = INDY indexes = " + Arrays.toString(values));
+                     int value = cpool.getIntAt(ci);
+                     short bsmIndex = (short) extractLowShortFromInt(value);
+                     short nameAndTypeIndex = (short) extractHighShortFromInt(value);
+                     dos.writeShort(bsmIndex);
+                     dos.writeShort(nameAndTypeIndex);
+                     if (DEBUG) debugMessage("CP[" + ci + "] = INDY bsm = " +
+                           bsmIndex + ", N&T = " + nameAndTypeIndex);
                      break;
                 }
 
--- a/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java	Wed Jan 05 10:06:07 2011 +0000
@@ -460,7 +460,8 @@
       return buf.toString();
    }
 
-   private String genListOfShort(int[] values) {
+   private String genListOfShort(short[] values) {
+      if (values == null || values.length == 0)  return "";
       Formatter buf = new Formatter(genHTML);
       buf.append('[');
       for (int i = 0; i < values.length; i++) {
@@ -594,9 +595,11 @@
                buf.cell(Integer.toString(cpool.getIntAt(index)));
                break;
 
+            case JVM_CONSTANT_InvokeDynamicTrans:
             case JVM_CONSTANT_InvokeDynamic:
                buf.cell("JVM_CONSTANT_InvokeDynamic");
-               buf.cell(genListOfShort(cpool.getMultiOperandsAt(index)));
+               buf.cell(genLowHighShort(cpool.getIntAt(index)) +
+                        genListOfShort(cpool.getBootstrapSpecifierAt(index)));
                break;
 
             default:
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java	Wed Jan 05 10:06:07 2011 +0000
@@ -40,7 +40,7 @@
   private static int JVM_CONSTANT_NameAndType             = 12;
   private static int JVM_CONSTANT_MethodHandle            = 15;  // JSR 292
   private static int JVM_CONSTANT_MethodType              = 16;  // JSR 292
-  //      static int JVM_CONSTANT_InvokeDynamicTrans      = 17;  // JSR 292, only occurs in old class files
+  private static int JVM_CONSTANT_InvokeDynamicTrans      = 17;  // JSR 292, only occurs in old class files
   private static int JVM_CONSTANT_InvokeDynamic           = 18;  // JSR 292
   private static int JVM_CONSTANT_Invalid                 = 0;   // For bad value initialization
   private static int JVM_CONSTANT_UnresolvedClass         = 100; // Temporary tag until actual use
@@ -67,6 +67,8 @@
     this.tag = tag;
   }
 
+  public int value() { return tag; }
+
   public boolean isKlass()            { return tag == JVM_CONSTANT_Class; }
   public boolean isField ()           { return tag == JVM_CONSTANT_Fieldref; }
   public boolean isMethod()           { return tag == JVM_CONSTANT_Methodref; }
@@ -81,6 +83,7 @@
   public boolean isMethodHandle()     { return tag == JVM_CONSTANT_MethodHandle; }
   public boolean isMethodType()       { return tag == JVM_CONSTANT_MethodType; }
   public boolean isInvokeDynamic()    { return tag == JVM_CONSTANT_InvokeDynamic; }
+  public boolean isInvokeDynamicTrans() { return tag == JVM_CONSTANT_InvokeDynamicTrans; }
 
   public boolean isInvalid()          { return tag == JVM_CONSTANT_Invalid; }
 
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js	Tue Dec 14 13:00:01 2010 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2010, 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
--- a/make/defs.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/defs.make	Wed Jan 05 10:06:07 2011 +0000
@@ -101,15 +101,14 @@
 endif
 
 ifdef HOTSPOT_BUILD_VERSION
-# specified in command line (PRT build)
+# specified in command line
 else
-  ifdef JPRT_BUILD_VERSION
-# JPR build
-    HOTSPOT_BUILD_VERSION=$(JPRT_BUILD_VERSION)
+  ifdef COOKED_BUILD_NUMBER
+# JRE build
+    HOTSPOT_BUILD_VERSION=
   else
-    ifdef COOKED_BUILD_NUMBER
-# JRE build
-      HOTSPOT_BUILD_VERSION=
+    ifdef USER_RELEASE_SUFFIX
+      HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
     else
       HOTSPOT_BUILD_VERSION=internal
     endif
--- a/make/hotspot_distro	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/hotspot_distro	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 # 
-# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
--- a/make/hotspot_version	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/hotspot_version	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 # 
-# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=20
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=03
+HS_BUILD_NUMBER=05
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
--- a/make/jprt.gmk	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/jprt.gmk	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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,9 +25,6 @@
 # JPRT rule to build this workspace
 
 JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
-ifdef JPRT_BUILD_VERSION
-  MILESTONE=$(JPRT_BUILD_VERSION)
-endif
 
 ifeq ($(OSNAME),windows)
   ZIPFLAGS=-q
--- a/make/jprt.properties	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/jprt.properties	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
--- a/make/linux/makefiles/adlc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/adlc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -42,16 +42,14 @@
 SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
 	     $(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad 
 
-Src_Dirs += $(GAMMADIR)/src/share/vm/adlc
-
 EXEC	= $(OUTDIR)/adlc
 
 # set VPATH so make knows where to look for source files
-Src_Dirs_V = ${Src_Dirs} $(GENERATED)/incls
-VPATH    += $(Src_Dirs_V:%=%:)
+Src_Dirs_V += $(GAMMADIR)/src/share/vm/adlc
+VPATH += $(Src_Dirs_V:%=%:)
 
 # set INCLUDES for C preprocessor
-Src_Dirs_I = ${Src_Dirs} $(GENERATED)
+Src_Dirs_I += $(GAMMADIR)/src/share/vm/adlc $(GENERATED)
 INCLUDES += $(Src_Dirs_I:%=-I%)
 
 # set flags for adlc compilation
--- a/make/linux/makefiles/amd64.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/amd64.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2010, 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
@@ -22,9 +22,6 @@
 #  
 #
 
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_x86_64.o
-
 # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
 OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
 # The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
--- a/make/linux/makefiles/build_vm_def.sh	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/build_vm_def.sh	Wed Jan 05 10:06:07 2011 +0000
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # If we're cross compiling use that path for nm
-if [ "$ALT_COMPILER_PATH" != "" ]; then 
+if [ "$CROSS_COMPILE_ARCH" != "" ]; then 
 NM=$ALT_COMPILER_PATH/nm
 else
 NM=nm
--- a/make/linux/makefiles/buildtree.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/buildtree.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -37,7 +37,7 @@
 # OS_FAMILY	- operating system
 # VARIANT	- core, compiler1, compiler2, or tiered
 # HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
-# HOTSPOT_BUILD_VERSION   - internal, PRTjob ID, JPRTjob ID
+# HOTSPOT_BUILD_VERSION   - internal, internal-$(USER_RELEASE_SUFFIX) or empty
 # JRE_RELEASE_VERSION     - <major>.<minor>.<micro> (1.7.0)
 #
 # Builds the directory trees with makefiles plus some convenience files in
@@ -113,7 +113,7 @@
 COMPILER	= $(shell sed -n 's/^compiler[ 	]*=[ 	]*//p' $(PLATFORM_FILE))
 
 SIMPLE_DIRS	= \
-	$(PLATFORM_DIR)/generated/incls \
+	$(PLATFORM_DIR)/generated/dependencies \
 	$(PLATFORM_DIR)/generated/adfiles \
 	$(PLATFORM_DIR)/generated/jvmtifiles
 
@@ -124,7 +124,7 @@
 BUILDTREE_MAKE	= $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
 
 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \
-        env.sh env.csh .dbxrc test_gamma
+        env.sh env.csh jdkpath.sh .dbxrc test_gamma
 
 BUILDTREE_VARS	= GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
 	ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
@@ -197,11 +197,27 @@
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 	echo; \
-	echo "Src_Dirs = \\"; \
+	echo "# Used for platform dispatching"; \
+	echo "TARGET_DEFINES  = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
+	echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
+	echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \
+	echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \
+	echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \
+	echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \
+	echo "CFLAGS += \$$(TARGET_DEFINES)"; \
+	echo; \
+	echo "Src_Dirs_V = \\"; \
 	sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
 	echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
 	echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
 	echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
+	echo; \
+	echo "Src_Dirs_I = \\"; \
+	echo "\$$(GAMMADIR)/src/share/vm \\"; \
+	echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \
+	echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
+	echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
+	echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
 	[ -n "$(CFLAGS_BROWSE)" ] && \
 	    echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
 	[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
@@ -302,6 +318,13 @@
 	sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \
 	) > $@
 
+jdkpath.sh: $(BUILDTREE_MAKE)
+	@echo Creating $@ ...
+	$(QUIETLY) ( \
+	$(BUILDTREE_COMMENT); \
+	echo "JDK=${JAVA_HOME}"; \
+	) > $@	   
+
 .dbxrc:  $(BUILDTREE_MAKE)
 	@echo Creating $@ ...
 	$(QUIETLY) ( \
--- a/make/linux/makefiles/core.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/core.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -24,8 +24,7 @@
 
 # Sets make macros for making core version of VM
 
-# Note the effect on includeDB lists in top.make:
-# includeDB_compiler* and ad_<arch>.*pp are excluded from the build,
+# Select which files to use (in top.make)
 TYPE=CORE
 
 # There is no "core" directory in JDK. Install core build in server directory.
--- a/make/linux/makefiles/defs.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/defs.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
--- a/make/linux/makefiles/gcc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/gcc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -25,7 +25,9 @@
 #------------------------------------------------------------------------
 # CC, CPP & AS
 
-ifdef ALT_COMPILER_PATH
+# When cross-compiling the ALT_COMPILER_PATH points
+# to the cross-compilation toolset
+ifdef CROSS_COMPILE_ARCH
 CPP = $(ALT_COMPILER_PATH)/g++
 CC  = $(ALT_COMPILER_PATH)/gcc
 else
@@ -42,9 +44,13 @@
 
 # check for precompiled headers support
 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
+# Allow the user to turn off precompiled headers from the command line.
+ifneq ($(USE_PRECOMPILED_HEADER),0)
 USE_PRECOMPILED_HEADER=1
 PRECOMPILED_HEADER_DIR=.
-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
+PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp
+PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
+endif
 endif
 
 
@@ -144,6 +150,16 @@
 OPT_CFLAGS/mulnode.o += -O0
 endif
 
+# Flags for generating make dependency flags.
+ifneq ("${CC_VER_MAJOR}", "2")
+DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
+endif
+
+# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
+ifneq ($(USE_PRECOMPILED_HEADER),1)
+CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
+endif
+
 #------------------------------------------------------------------------
 # Linker flags
 
--- a/make/linux/makefiles/i486.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/i486.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -23,8 +23,6 @@
 #
 
 # TLS helper, assembled from .s file
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_x86_32.o
 
 # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
 OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
--- a/make/linux/makefiles/jvmti.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/jvmti.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2010, 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
@@ -37,11 +37,10 @@
 
 JvmtiSrcDir = $(GAMMADIR)/src/share/vm/prims
 InterpreterSrcDir = $(GAMMADIR)/src/share/vm/interpreter
-Src_Dirs += $(JvmtiSrcDir)
 
 # set VPATH so make knows where to look for source files
-Src_Dirs_V = ${Src_Dirs}
-VPATH    += $(Src_Dirs_V:%=%:)
+Src_Dirs_V += $(JvmtiSrcDir)
+VPATH += $(Src_Dirs_V:%=%:)
 
 JvmtiGeneratedNames = \
         jvmtiEnv.hpp \
--- a/make/linux/makefiles/launcher.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/launcher.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -24,19 +24,23 @@
 
 # Rules to build gamma launcher, used by vm.make
 
-# gamma[_g]: launcher
 
+LAUNCHER_SCRIPT = hotspot
 LAUNCHER   = gamma
-LAUNCHER_G = $(LAUNCHER)$(G_SUFFIX)
 
-LAUNCHERDIR   = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher
-LAUNCHERFLAGS = $(ARCHFLAG) \
+LAUNCHERDIR   := $(GAMMADIR)/src/os/posix/launcher
+LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
+LAUNCHERFLAGS := $(ARCHFLAG) \
                 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
+                -I$(LAUNCHERDIR_SHARE) \
                 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
+                -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
+                -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
                 -DARCH=\"$(LIBARCH)\" \
                 -DGAMMA \
                 -DLAUNCHER_TYPE=\"gamma\" \
-                -DLINK_INTO_$(LINK_INTO)
+                -DLINK_INTO_$(LINK_INTO) \
+                $(TARGET_DEFINES)
 
 ifeq ($(LINK_INTO),AOUT)
   LAUNCHER.o                 = launcher.o $(JVM_OBJ_FILES)
@@ -55,22 +59,35 @@
 LINK_LAUNCHER/PRE_HOOK  = $(LINK_LIB.CC/PRE_HOOK)
 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
 
-launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
-	$(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS)
+LAUNCHER_OUT = launcher
 
-launcher.c:
-	@echo Generating $@
-	$(QUIETLY) { \
-	echo '#define debug launcher_debug'; \
-	echo '#include "java.c"'; \
-	echo '#include "java_md.c"'; \
-	} > $@
+SUFFIXES += .d
 
-$(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
-	$(QUIETLY) { \
-	    echo Linking launcher...; \
-	    $(LINK_LAUNCHER/PRE_HOOK) \
-	    $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \
-	    $(LINK_LAUNCHER/POST_HOOK) \
-	    [ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \
-        }
+SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
+SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
+
+OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
+
+DEPFILES := $(patsubst %.o,%.d,$(OBJS))
+-include $(DEPFILES)
+
+$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
+	$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
+	$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
+
+$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
+	$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
+	$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
+
+$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
+	$(QUIETLY) echo Linking launcher...
+	$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
+	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
+	$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
+
+$(LAUNCHER): $(LAUNCHER_SCRIPT)
+
+$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
+	$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
+	$(QUIETLY) chmod +x $@
+
--- a/make/linux/makefiles/makedeps.make	Tue Dec 14 13:00:01 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 2000, 2008, 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.
-#  
-#
-
-include $(GAMMADIR)/make/linux/makefiles/rules.make
-
-COMPILE.JAVAC.FLAGS += -d $(OUTDIR)
-
-MakeDepsSources=\
-	$(GAMMADIR)/src/share/tools/MakeDeps/Database.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/DirectoryTree.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/DirectoryTreeNode.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/FileFormatException.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/FileList.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/FileName.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/Macro.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/MacroDefinitions.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/MakeDeps.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/MetroWerksMacPlatform.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/Platform.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/UnixPlatform.java        
-
-MakeDepsOptions=
--- a/make/linux/makefiles/mapfile-vers-debug	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/mapfile-vers-debug	Wed Jan 05 10:06:07 2011 +0000
@@ -3,7 +3,7 @@
 #
 
 #
-# Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2010, 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
--- a/make/linux/makefiles/mapfile-vers-product	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/mapfile-vers-product	Wed Jan 05 10:06:07 2011 +0000
@@ -3,7 +3,7 @@
 #
 
 #
-# Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2010, 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
--- a/make/linux/makefiles/product.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/product.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
--- a/make/linux/makefiles/rules.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/rules.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2010, 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
@@ -151,20 +151,20 @@
 %.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+	$(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
 else
 %.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
 	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
-	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
-	   $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
+	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
+	   $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE))
 endif
 
 %.o: %.s
 	@echo Assembling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(AS.S) -o $@ $< $(COMPILE_DONE)
+	$(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
 
 %.s: %.cpp
 	@echo Generating assembly for $<
--- a/make/linux/makefiles/saproc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/saproc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -55,10 +55,12 @@
 # if $(AGENT_DIR) does not exist, we don't build SA
 # also, we don't build SA on Itanium, PPC, ARM or zero.
 
-checkAndBuildSA:
-	$(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "arm" -a "$(SRCARCH)" != "ppc" -a "$(SRCARCH)" != "zero" ] ; then \
-	   $(MAKE) -f vm.make $(LIBSAPROC); \
-	fi
+ifneq ($(wildcard $(AGENT_DIR)),)
+ifneq ($(filter-out ia64 arm ppc zero,$(SRCARCH)),)
+  BUILDLIBSAPROC = $(LIBSAPROC)
+endif
+endif
+
 
 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
 
@@ -81,10 +83,10 @@
 	           -lthread_db
 	$(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
 
-install_saproc: checkAndBuildSA
+install_saproc: $(BUILDLIBSAPROC)
 	$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then             \
 	  echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)";     \
 	  cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";  \
 	fi
 
-.PHONY: checkAndBuildSA install_saproc
+.PHONY: install_saproc
--- a/make/linux/makefiles/shark.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/shark.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2008, 2010 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
--- a/make/linux/makefiles/sparc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/sparc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -22,6 +22,3 @@
 #  
 #
 
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_sparc.o
-
--- a/make/linux/makefiles/sparcWorks.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/sparcWorks.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -74,6 +74,14 @@
 OPT_CFLAGS+=-xO4
 OPT_CFLAGS/NOOPT=-xO0
 
+# Flags for creating the dependency files.
+ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
+endif
+
+# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
+CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
+
 #------------------------------------------------------------------------
 # Linker flags
 
--- a/make/linux/makefiles/sparcv9.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/sparcv9.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -21,10 +21,6 @@
 # questions.
 #  
 
-#
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_sparc.o
-
 # gcc 4.0 miscompiles this code in -m64
 OPT_CFLAGS/macro.o = -O0
 
--- a/make/linux/makefiles/top.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/top.make	Wed Jan 05 10:06:07 2011 +0000
@@ -31,7 +31,7 @@
 #   -generate sa-jdi.jar (JDI binding to core files)
 
 # It assumes the following flags are set:
-# CFLAGS Platform_file, Src_Dirs, SYSDEFS, AOUT, Obj_Files
+# CFLAGS Platform_file, Src_Dirs_I, Src_Dirs_V, SYSDEFS, AOUT, Obj_Files
 
 # -- D. Ungar (5/97) from a file by Bill Bush
 
@@ -45,10 +45,6 @@
 Plat_File   = $(Platform_file)
 CDG         = cd $(GENERATED); 
 
-# Pick up MakeDeps' sources and definitions
-include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/makedeps.make
-MakeDepsClass = MakeDeps.class
-
 ifdef USE_PRECOMPILED_HEADER
 PrecompiledOption = -DUSE_PRECOMPILED_HEADER
 UpdatePCH         = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
@@ -57,33 +53,7 @@
 PrecompiledOption = 
 endif
 
-MakeDeps    = $(RUN.JAVA) $(PrecompiledOption) -classpath $(GENERATED) MakeDeps
-
-Include_DBs/GC          = $(VM)/includeDB_gc \
-                          $(VM)/includeDB_gc_parallel \
-                          $(VM)/gc_implementation/includeDB_gc_parallelScavenge \
-                          $(VM)/gc_implementation/includeDB_gc_concurrentMarkSweep \
-                          $(VM)/gc_implementation/includeDB_gc_parNew \
-                          $(VM)/gc_implementation/includeDB_gc_g1     \
-                          $(VM)/gc_implementation/includeDB_gc_serial \
-                          $(VM)/gc_implementation/includeDB_gc_shared
-
-Include_DBs/CORE        = $(VM)/includeDB_core   $(Include_DBs/GC) \
-                          $(VM)/includeDB_jvmti \
-                          $(VM)/includeDB_features
-Include_DBs/COMPILER1   = $(Include_DBs/CORE) $(VM)/includeDB_compiler1
-Include_DBs/COMPILER2   = $(Include_DBs/CORE) $(VM)/includeDB_compiler2
-Include_DBs/TIERED      = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 $(VM)/includeDB_compiler2
-Include_DBs/ZERO        = $(Include_DBs/CORE) $(VM)/includeDB_zero
-Include_DBs/SHARK       = $(Include_DBs/ZERO) $(VM)/includeDB_shark
-Include_DBs = $(Include_DBs/$(TYPE))
-
 Cached_plat = $(GENERATED)/platform.current
-Cached_db   = $(GENERATED)/includeDB.current
-
-Incremental_Lists = $(Cached_db)
-# list generation also creates $(GENERATED)/$(Cached_plat)
-
 
 AD_Dir   = $(GENERATED)/adfiles
 ADLC     = $(AD_Dir)/adlc
@@ -102,7 +72,7 @@
 MFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`
 
 
-# default target: make makeDeps, update lists, make vm
+# default target: update lists, make vm
 # done in stages to force sequential order with parallel make
 #
 
@@ -110,39 +80,18 @@
 	@echo All done.
 
 # This is an explicit dependency for the sake of parallel makes.
-vm_build_preliminaries:  checks $(Incremental_Lists) $(AD_Files_If_Required) jvmti_stuff sa_stuff
+vm_build_preliminaries:  checks $(Cached_plat) $(AD_Files_If_Required) jvmti_stuff sa_stuff
 	@# We need a null action here, so implicit rules don't get consulted.
 
-# make makeDeps: (and zap the cached db files to force a nonincremental run)
-
-$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources)
-	@$(REMOTE) $(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -d $(GENERATED) $(MakeDepsSources)
-	@echo Removing $(Incremental_Lists) to force regeneration.
-	@rm -f $(Incremental_Lists)
-	@$(CDG) echo >$(Cached_plat)
-
-# make incremental_lists, if cached files out of date, run makeDeps
-
-$(Incremental_Lists): $(Include_DBs) $(Plat_File) $(GENERATED)/$(MakeDepsClass)
-	$(CDG) cat $(Include_DBs) > $(GENERATED)/includeDB
-	$(CDG) if [ ! -r incls ] ; then \
-	mkdir incls ; \
-	fi
-	$(CDG) (echo $(CDG) echo $(MakeDeps) diffs UnixPlatform $(Cached_plat) $(Cached_db) $(Plat_File) $(GENERATED)/includeDB $(MakeDepsOptions)) > makeDeps.sh
-	$(CDG) $(REMOTE) sh $(GENERATED)/makeDeps.sh
-	$(CDG) cp includeDB    $(Cached_db)
+$(Cached_plat): $(Plat_File)
 	$(CDG) cp $(Plat_File) $(Cached_plat)
 
-# symbolic target for command lines
-lists: $(Incremental_Lists)
-	@: lists are now up to date
-
 # make AD files as necessary
-ad_stuff: $(Incremental_Lists) $(adjust-mflags)
+ad_stuff: $(Cached_plat) $(adjust-mflags)
 	@$(MAKE) -f adlc.make $(MFLAGS-adjusted)
 
 # generate JVMTI files from the spec
-jvmti_stuff: $(Incremental_Lists) $(adjust-mflags)
+jvmti_stuff: $(Cached_plat) $(adjust-mflags)
 	@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)
 
 # generate SA jar files and native header
@@ -169,7 +118,7 @@
 install: the_vm
 	@$(MAKE) -f vm.make install
 
-# next rules support "make foo.[oi]"
+# next rules support "make foo.[ois]"
 
 %.o %.i %.s:
 	$(UpdatePCH) 
@@ -179,7 +128,6 @@
 # this should force everything to be rebuilt
 clean: 
 	rm -f $(GENERATED)/*.class
-	$(MAKE) $(MFLAGS) $(GENERATED)/$(MakeDepsClass)
 	$(MAKE) -f vm.make $(MFLAGS) clean
 
 # just in case it doesn't, this should do it
--- a/make/linux/makefiles/vm.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/vm.make	Wed Jan 05 10:06:07 2011 +0000
@@ -35,9 +35,10 @@
 # Defs
 
 GENERATED     = ../generated
+DEP_DIR       = $(GENERATED)/dependencies
 
-# read a generated file defining the set of .o's and the .o .h dependencies
-include $(GENERATED)/Dependencies
+# reads the generated files defining the set of .o's and the .o .h dependencies
+-include $(DEP_DIR)/*.d
 
 # read machine-specific adjustments (%%% should do this via buildtree.make?)
 ifeq ($(ZERO_BUILD), true)
@@ -47,16 +48,16 @@
 endif
 
 # set VPATH so make knows where to look for source files
-# Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
-# The incls directory contains generated header file lists for inclusion.
+# Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
 # The adfiles directory contains ad_<arch>.[ch]pp.
 # The jvmtifiles directory contains jvmti*.[ch]pp
-Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls
-VPATH    += $(Src_Dirs_V:%=%:)
+Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles
+VPATH += $(Src_Dirs_V:%=%:)
 
-# set INCLUDES for C preprocessor
-Src_Dirs_I = $(PRECOMPILED_HEADER_DIR) $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)
-INCLUDES += $(Src_Dirs_I:%=-I%)
+# set INCLUDES for C preprocessor.
+Src_Dirs_I += $(GENERATED)
+# The order is important for the precompiled headers to work.
+INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
 
 ifeq (${VERSION}, debug)
   SYMFLAG = -g
@@ -118,6 +119,64 @@
 LIBJVM   = lib$(JVM).so
 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
 
+CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
+CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
+CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm
+CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm
+CORE_PATHS += $(GENERATED)/jvmtifiles
+
+COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1
+
+COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto
+COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt
+COMPILER2_PATHS +=  $(GENERATED)/adfiles
+
+# Include dirs per type.
+Src_Dirs/CORE      := $(CORE_PATHS)
+Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS)
+Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS)
+Src_Dirs/TIERED    := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS)
+Src_Dirs/ZERO      := $(CORE_PATHS)
+Src_Dirs/SHARK     := $(CORE_PATHS)
+Src_Dirs := $(Src_Dirs/$(TYPE))
+
+COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\*
+COMPILER1_SPECIFIC_FILES := c1_\*
+SHARK_SPECIFIC_FILES     := shark
+ZERO_SPECIFIC_FILES      := zero
+
+# Always exclude these.
+Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
+
+# Exclude per type.
+Src_Files_EXCLUDE/CORE      := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
+Src_Files_EXCLUDE/TIERED    := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
+Src_Files_EXCLUDE/ZERO      := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+Src_Files_EXCLUDE/SHARK     := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES)
+
+Src_Files_EXCLUDE +=  $(Src_Files_EXCLUDE/$(TYPE))
+
+# Special handling of arch model.
+ifeq ($(Platform_arch_model), x86_32)
+Src_Files_EXCLUDE += \*x86_64\*
+endif
+ifeq ($(Platform_arch_model), x86_64)
+Src_Files_EXCLUDE += \*x86_32\*
+endif
+
+# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
+define findsrc
+	$(notdir $(shell find $(1)/. ! -name . -prune \
+		-a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
+		-a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \)))
+endef
+
+Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
+
+Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
+
 JVM_OBJ_FILES = $(Obj_Files)
 
 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
@@ -180,10 +239,10 @@
 LINK_VM = $(LINK_LIB.c)
 
 # rule for building precompiled header
-$(PRECOMPILED_HEADER): $(Precompiled_Files)
+$(PRECOMPILED_HEADER):
 	$(QUIETLY) echo Generating precompiled header $@
-	$(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)/incls
-	$(QUIETLY) $(COMPILE.CC) -x c++-header -c $(GENERATED)/incls/_precompiled.incl -o $@ $(COMPILE_DONE)
+	$(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
+	$(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
 
 # making the library:
 
@@ -252,7 +311,7 @@
 
 #----------------------------------------------------------------------
 
-build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) checkAndBuildSA
+build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC)
 
 install: install_jvm install_jsig install_saproc
 
--- a/make/linux/makefiles/zero.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/linux/makefiles/zero.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2009 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -25,7 +25,7 @@
 
 # Setup for Zero (non-Shark) version of VM
 
-# Select which includeDB files to use (in top.make)
+# Select which files to use (in top.make)
 TYPE = ZERO
 
 # Install libjvm.so, etc in in server directory.
--- a/make/solaris/makefiles/adlc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/adlc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2010, 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
@@ -42,16 +42,14 @@
 SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
 	     $(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad 
 
-Src_Dirs += $(GAMMADIR)/src/share/vm/adlc
-
 EXEC	= $(OUTDIR)/adlc
 
 # set VPATH so make knows where to look for source files
-Src_Dirs_V = ${Src_Dirs} $(GENERATED)/incls
-VPATH    += $(Src_Dirs_V:%=%:)
+Src_Dirs_V += $(GAMMADIR)/src/share/vm/adlc
+VPATH += $(Src_Dirs_V:%=%:)
 
 # set INCLUDES for C preprocessor
-Src_Dirs_I = ${Src_Dirs} $(GENERATED)
+Src_Dirs_I += $(GAMMADIR)/src/share/vm/adlc $(GENERATED)
 INCLUDES += $(Src_Dirs_I:%=-I%)
 
 # set flags for adlc compilation
--- a/make/solaris/makefiles/amd64.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/amd64.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2010, 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,9 +25,6 @@
 # Must also specify if CPU is little endian
 CFLAGS += -DVM_LITTLE_ENDIAN
 
-# Not included in includeDB because it has no dependencies
-Obj_Files += solaris_x86_64.o
-
 #
 # Special case flags for compilers and compiler versions on amd64.
 #
--- a/make/solaris/makefiles/buildtree.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/buildtree.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2010, 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
@@ -37,7 +37,7 @@
 # OS_FAMILY	- operating system
 # VARIANT	- core, compiler1, compiler2, or tiered
 # HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
-# HOTSPOT_BUILD_VERSION   - internal, PRTjob ID, JPRTjob ID
+# HOTSPOT_BUILD_VERSION   - internal, internal-$(USER_RELEASE_SUFFIX) or empty
 # JRE_RELEASE_VERSION     - <major>.<minor>.<micro> (1.7.0)
 #
 # Builds the directory trees with makefiles plus some convenience files in
@@ -106,7 +106,7 @@
 COMPILER	= $(shell sed -n 's/^compiler[ 	]*=[ 	]*//p' $(PLATFORM_FILE))
 
 SIMPLE_DIRS	= \
-	$(PLATFORM_DIR)/generated/incls \
+	$(PLATFORM_DIR)/generated/dependencies \
 	$(PLATFORM_DIR)/generated/adfiles \
 	$(PLATFORM_DIR)/generated/jvmtifiles
 
@@ -117,7 +117,7 @@
 BUILDTREE_MAKE	= $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
 
 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \
-        env.ksh env.csh .dbxrc test_gamma
+        env.ksh env.csh jdkpath.sh .dbxrc test_gamma
 
 BUILDTREE_VARS	= GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
 	ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
@@ -191,11 +191,27 @@
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
 	echo; \
-	echo "Src_Dirs = \\"; \
+	echo "# Used for platform dispatching"; \
+	echo "TARGET_DEFINES  = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
+	echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
+	echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \
+	echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \
+	echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \
+	echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \
+	echo "CFLAGS += \$$(TARGET_DEFINES)"; \
+	echo; \
+	echo "Src_Dirs_V = \\"; \
 	sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
 	echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
 	echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
 	echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
+	echo; \
+	echo "Src_Dirs_I = \\"; \
+	echo "\$$(GAMMADIR)/src/share/vm \\"; \
+	echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \
+	echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
+	echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
+	echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
 	[ -n "$(CFLAGS_BROWSE)" ] && \
 	    echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
 	[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
@@ -298,6 +314,13 @@
 	sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \
 	) > $@
 
+jdkpath.sh: $(BUILDTREE_MAKE)
+	@echo Creating $@ ...
+	$(QUIETLY) ( \
+	$(BUILDTREE_COMMENT); \
+	echo "JDK=${JAVA_HOME}"; \
+	) > $@	   
+
 .dbxrc:  $(BUILDTREE_MAKE)
 	@echo Creating $@ ...
 	$(QUIETLY) ( \
--- a/make/solaris/makefiles/core.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/core.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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
@@ -24,8 +24,7 @@
 
 # Sets make macros for making core version of VM
 
-# Note the effect on includeDB lists in top.make:
-# includeDB_compiler* and ad_<arch>.*pp are excluded from the build,
+# Select which files to use (in top.make)
 TYPE=CORE
 
 # There is no "core" directory in JDK. Install core build in server directory.
--- a/make/solaris/makefiles/defs.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/defs.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
--- a/make/solaris/makefiles/dtrace.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/dtrace.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -63,8 +63,6 @@
 
 # making libjvm_db
 
-INCLS = $(GENERATED)/incls
-
 # Use mapfile with libjvm_db.so
 LIBJVM_DB_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_db
 LFLAGS_JVM_DB += $(MAPFLAG:FILENAME=$(LIBJVM_DB_MAPFILE))
@@ -114,7 +112,7 @@
 endif
 
 lib$(GENOFFS).so: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
-                  $(INCLS)/_vmStructs.cpp.incl $(LIBJVM.o)
+                  $(LIBJVM.o)
 	$(QUIETLY) $(CCC) $(CPPFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
 		 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -lc
 
@@ -161,6 +159,27 @@
              $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
 	$(QUIETLY) cat $^ > $@
 
+DTraced_Files = ciEnv.o \
+                classLoadingService.o \
+                compileBroker.o \
+                hashtable.o \
+                instanceKlass.o \
+                java.o \
+                jni.o \
+                jvm.o \
+                memoryManager.o \
+                nmethod.o \
+                objectMonitor.o \
+                runtimeService.o \
+                sharedRuntime.o \
+                synchronizer.o \
+                thread.o \
+                unsafe.o \
+                vmThread.o \
+                vmCMSOperations.o \
+                vmPSOperations.o \
+                vmGCOperations.o \
+
 # Dtrace is available, so we build $(DTRACE.o)  
 $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
 	@echo Compiling $(DTRACE).d
--- a/make/solaris/makefiles/fastdebug.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/fastdebug.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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
--- a/make/solaris/makefiles/gcc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/gcc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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,9 +47,13 @@
 
 # check for precompiled headers support
 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
+# Allow the user to turn off precompiled headers from the command line.
+ifneq ($(USE_PRECOMPILED_HEADER),0)
 USE_PRECOMPILED_HEADER=1
 PRECOMPILED_HEADER_DIR=.
-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
+PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp
+PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
+endif
 endif
 
 
@@ -131,6 +135,17 @@
 endif
 
 OPT_CFLAGS/NOOPT=-O0
+
+# Flags for generating make dependency flags.
+ifneq ("${CC_VER_MAJOR}", "2")
+DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
+endif
+
+# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
+ifneq ($(USE_PRECOMPILED_HEADER),1)
+CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
+endif
+
 #------------------------------------------------------------------------
 # Linker flags
 
--- a/make/solaris/makefiles/i486.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/i486.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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,8 +26,6 @@
 CFLAGS += -DVM_LITTLE_ENDIAN
 
 # TLS helper, assembled from .s file
-# Not included in includeDB because it has no dependencies
-Obj_Files += solaris_x86_32.o
 
 #
 # Special case flags for compilers and compiler versions on i486.
--- a/make/solaris/makefiles/jvmti.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/jvmti.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2010, 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
@@ -36,11 +36,10 @@
 
 JvmtiSrcDir = $(GAMMADIR)/src/share/vm/prims
 InterpreterSrcDir = $(GAMMADIR)/src/share/vm/interpreter
-Src_Dirs += $(JvmtiSrcDir)
 
 # set VPATH so make knows where to look for source files
-Src_Dirs_V = ${Src_Dirs}
-VPATH    += $(Src_Dirs_V:%=%:)
+Src_Dirs_V += $(JvmtiSrcDir)
+VPATH += $(Src_Dirs_V:%=%:)
 
 JvmtiGeneratedNames = \
         jvmtiEnv.hpp \
--- a/make/solaris/makefiles/launcher.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/launcher.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -24,18 +24,22 @@
 
 # Rules to build gamma launcher, used by vm.make
 
-# gamma[_g]: launcher
+LAUNCHER_SCRIPT = hotspot
 LAUNCHER   = gamma
-LAUNCHER_G = $(LAUNCHER)$(G_SUFFIX)
 
-LAUNCHERDIR   = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher
+LAUNCHERDIR   = $(GAMMADIR)/src/os/posix/launcher
+LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
 LAUNCHERFLAGS = $(ARCHFLAG) \
                 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
+                -I$(LAUNCHERDIR_SHARE) \
                 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
+                -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
+                -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
                 -DARCH=\"$(LIBARCH)\" \
                 -DGAMMA \
                 -DLAUNCHER_TYPE=\"gamma\" \
-                -DLINK_INTO_$(LINK_INTO)
+                -DLINK_INTO_$(LINK_INTO) \
+                $(TARGET_DEFINES)
 
 ifeq ($(LINK_INTO),AOUT)
   LAUNCHER.o                 = launcher.o $(JVM_OBJ_FILES)
@@ -68,24 +72,37 @@
 #LAUNCHERFLAGS += -W0,-noglobal
 endif # Platform_compiler == sparcWorks
 
-launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
-	$(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS)
+LAUNCHER_OUT = launcher
 
-launcher.c:
-	@echo Generating $@
-	$(QUIETLY) { \
-	echo '#define debug launcher_debug'; \
-	echo '#include "java.c"'; \
-	echo '#include "java_md.c"'; \
-	} > $@
+SUFFIXES += .d
 
-$(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
+SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
+SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
+
+OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
+
+DEPFILES := $(patsubst %.o,%.d,$(OBJS))
+-include $(DEPFILES)
+
+$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
+	$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
+	$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
+
+$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
+	$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
+	$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
+
+$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
-	@echo Linking launcher...
+	$(QUIETLY) echo Linking launcher...
 	$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
-	$(QUIETLY) \
-	$(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER)
+	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
 	$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
-	[ -f $(LAUNCHER_G) ] || ln -s $@ $(LAUNCHER_G)
 endif # filter -sbfast -xsbfast
 
+$(LAUNCHER): $(LAUNCHER_SCRIPT)
+
+$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
+	$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
+	$(QUIETLY) chmod +x $@
+
--- a/make/solaris/makefiles/makedeps.make	Tue Dec 14 13:00:01 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 1999, 2008, 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.
-#  
-#
-
-include $(GAMMADIR)/make/solaris/makefiles/rules.make
-
-COMPILE.JAVAC.FLAGS += -d $(OUTDIR)
-
-MakeDepsSources=\
-	$(GAMMADIR)/src/share/tools/MakeDeps/Database.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/DirectoryTree.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/DirectoryTreeNode.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/FileFormatException.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/FileList.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/FileName.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/Macro.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/MacroDefinitions.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/MakeDeps.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/MetroWerksMacPlatform.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/Platform.java \
-	$(GAMMADIR)/src/share/tools/MakeDeps/UnixPlatform.java
-
-MakeDepsOptions=
--- a/make/solaris/makefiles/optimized.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/optimized.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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
--- a/make/solaris/makefiles/product.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/product.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
--- a/make/solaris/makefiles/rules.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/rules.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2010, 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
@@ -151,14 +151,14 @@
 %.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+	$(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
 else
 %.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
 	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
-         $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
-         $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
+	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
+	   $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE))
 endif
 
 %.o: %.s
--- a/make/solaris/makefiles/saproc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/saproc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -44,10 +44,9 @@
 
 # if $(AGENT_DIR) does not exist, we don't build SA
 
-checkAndBuildSA:
-	$(QUIETLY) if [ -d $(AGENT_DIR) ] ; then \
-	   $(MAKE) -f vm.make $(LIBSAPROC); \
-	fi
+ifneq ($(wildcard $(AGENT_DIR)),)
+  BUILDLIBSAPROC = $(LIBSAPROC)
+endif
 
 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
 
@@ -75,10 +74,10 @@
 	           -ldl -ldemangle -lthread -lc
 	[ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
 
-install_saproc: checkAndBuildSA
+install_saproc: $(BULDLIBSAPROC)
 	$(QUIETLY) if [ -f $(LIBSAPROC) ] ; then             \
 	  echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)";     \
 	  cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";  \
 	fi
 
-.PHONY: checkAndBuildSA install_saproc
+.PHONY: install_saproc
--- a/make/solaris/makefiles/sparcWorks.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/sparcWorks.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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
@@ -145,7 +145,15 @@
 OPT_CFLAGS/O2=-xO2
 OPT_CFLAGS/NOOPT=-xO1
 
-#################################################
+# Flags for creating the dependency files.
+ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
+endif
+
+# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
+CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
+
+################################################
 # Begin current (>=5.9) Forte compiler options #
 #################################################
 
--- a/make/solaris/makefiles/sparcv9.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/sparcv9.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -22,7 +22,6 @@
 #  
 #
 
-Obj_Files += solaris_sparc.o
 ASFLAGS += $(AS_ARCHFLAG)
 
 ifeq ("${Platform_compiler}", "sparcWorks")
--- a/make/solaris/makefiles/top.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/top.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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,7 +31,7 @@
 #   -generate sa-jdi.jar (JDI binding to core files)
 
 # It assumes the following flags are set:
-# CFLAGS Platform_file, Src_Dirs, SYSDEFS, AOUT, Jvm_Obj_Files
+# CFLAGS Platform_file, Src_Dirs_I, Src_Dirs_V, SYSDEFS, AOUT, Jvm_Obj_Files
 
 # -- D. Ungar (5/97) from a file by Bill Bush
 
@@ -44,42 +44,7 @@
 Plat_File   = $(Platform_file)
 CDG         = cd $(GENERATED); 
 
-# Pick up MakeDeps' sources and definitions
-include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/makedeps.make
-MakeDepsClass = MakeDeps.class
-MakeDeps    = $(RUN.JAVA) -classpath . MakeDeps
-
-Include_DBs/GC     = $(VM)/includeDB_gc \
-                     $(VM)/includeDB_gc_parallel \
-                     $(VM)/gc_implementation/includeDB_gc_parallelScavenge \
-                     $(VM)/gc_implementation/includeDB_gc_concurrentMarkSweep \
-                     $(VM)/gc_implementation/includeDB_gc_parNew \
-                     $(VM)/gc_implementation/includeDB_gc_g1 \
-                     $(VM)/gc_implementation/includeDB_gc_serial \
-                     $(VM)/gc_implementation/includeDB_gc_shared
-
-
-Include_DBs/KERNEL      = $(VM)/includeDB_core $(VM)/includeDB_gc \
-                          $(VM)/gc_implementation/includeDB_gc_serial \
-                          $(VM)/includeDB_jvmti \
-                          $(VM)/includeDB_compiler1
-
-Include_DBs/CORE        = $(VM)/includeDB_core   $(Include_DBs/GC) \
-                          $(VM)/includeDB_jvmti \
-                          $(VM)/includeDB_features
-Include_DBs/COMPILER1   = $(Include_DBs/CORE) $(VM)/includeDB_compiler1
-Include_DBs/COMPILER2   = $(Include_DBs/CORE) $(VM)/includeDB_compiler2
-Include_DBs/TIERED      = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 \
-                          $(VM)/includeDB_compiler2
-
-Include_DBs = $(Include_DBs/$(TYPE))
-
-Cached_plat = platform.current
-Cached_db   = includeDB.current
-
-Incremental_Lists =$(GENERATED)/$(Cached_db)
-# list generation also creates $(GENERATED)/$(Cached_plat)
-
+Cached_plat = $(GENERATED)/platform.current
 
 AD_Dir   = $(GENERATED)/adfiles
 ADLC     = $(AD_Dir)/adlc
@@ -98,7 +63,7 @@
 MFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`
 
 
-# default target: make makeDeps, update lists, make vm
+# default target: update lists, make vm
 # done in stages to force sequential order with parallel make
 #
 
@@ -106,38 +71,18 @@
 	@echo All done.
 
 # This is an explicit dependency for the sake of parallel makes.
-vm_build_preliminaries:  checks $(Incremental_Lists) $(AD_Files_If_Required) jvmti_stuff sa_stuff
+vm_build_preliminaries:  checks $(Cached_plat) $(AD_Files_If_Required) jvmti_stuff sa_stuff
 	@# We need a null action here, so implicit rules don't get consulted.
 
-# make makeDeps: (and zap the cached db files to force a nonincremental run)
-
-$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources)
-	@$(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -d $(GENERATED) $(MakeDepsSources)
-	@echo Removing $(Incremental_Lists) to force regeneration.
-	@rm -f $(Incremental_Lists)
-	@$(CDG) echo >$(Cached_plat)
-
-# make incremental_lists, if cached files out of date, run makeDeps
-
-$(Incremental_Lists):  $(Include_DBs) $(Plat_File) $(GENERATED)/$(MakeDepsClass)
-	$(CDG)  cat $(Include_DBs) > includeDB
-	$(CDG) if [ ! -r incls ] ; then \
-	mkdir incls ; \
-	fi
-	$(CDG)  $(MakeDeps) diffs UnixPlatform $(Cached_plat) $(Cached_db) $(Plat_File) includeDB $(MakeDepsOptions)
-	$(CDG)  cp includeDB    $(Cached_db)
-	$(CDG)  cp $(Plat_File) $(Cached_plat)
-
-# symbolic target for command lines
-lists: $(Incremental_Lists)
-	@: lists are now up to date
+$(Cached_plat): $(Plat_File)
+	$(CDG) cp $(Plat_File) $(Cached_plat)
 
 # make AD files as necessary
-ad_stuff: $(Incremental_Lists) $(adjust-mflags)
+ad_stuff: $(Cached_plat) $(adjust-mflags)
 	@$(MAKE) -f adlc.make $(MFLAGS-adjusted)
 
 # generate JVMTI files from the spec
-jvmti_stuff: $(Incremental_Lists) $(adjust-mflags)
+jvmti_stuff: $(Cached_plat) $(adjust-mflags)
 	@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)
 
 # generate SA jar files and native header
@@ -172,7 +117,6 @@
 # this should force everything to be rebuilt
 clean: 
 	rm -f $(GENERATED)/*.class
-	$(MAKE) $(MFLAGS) $(GENERATED)/$(MakeDepsClass)
 	$(MAKE) -f vm.make $(MFLAGS) clean
 
 # just in case it doesn't, this should do it
--- a/make/solaris/makefiles/vm.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/solaris/makefiles/vm.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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
@@ -35,23 +35,23 @@
 # Defs
 
 GENERATED     = ../generated
+DEP_DIR       = $(GENERATED)/dependencies
 
-# read a generated file defining the set of .o's and the .o .h dependencies
-include $(GENERATED)/Dependencies
+# reads the generated files defining the set of .o's and the .o .h dependencies
+-include $(DEP_DIR)/*.d
 
 # read machine-specific adjustments (%%% should do this via buildtree.make?)
 include $(MAKEFILES_DIR)/$(BUILDARCH).make
 
 # set VPATH so make knows where to look for source files
-# Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
-# The incls directory contains generated header file lists for inclusion.
+# Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
 # The adfiles directory contains ad_<arch>.[ch]pp.
 # The jvmtifiles directory contains jvmti*.[ch]pp
-Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls
-VPATH    += $(Src_Dirs_V:%=%:)
+Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles
+VPATH += $(Src_Dirs_V:%=%:)
 
 # set INCLUDES for C preprocessor
-Src_Dirs_I = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED) 
+Src_Dirs_I += $(GENERATED)
 INCLUDES += $(Src_Dirs_I:%=-I%)
 
 ifeq (${VERSION}, debug)
@@ -106,17 +106,17 @@
 # Not sure what the 'designed for' comment is referring too above.
 #   The order may not be too significant anymore, but I have placed this
 #   older libm before libCrun, just to make sure it's found and used first.
-LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc
+LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc -ldemangle
 else
 ifeq ($(COMPILER_REV_NUMERIC), 502)
 # SC6.1 has it's own libm.so: specifying anything else provokes a name conflict.
-LIBS += -ldl -lthread -lsocket -lm -lsched -ldoor
+LIBS += -ldl -lthread -lsocket -lm -lsched -ldoor -ldemangle
 else
-LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor
+LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor -ldemangle
 endif # 502
 endif # 505
 else
-LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc
+LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle
 endif # sparcWorks
 
 # By default, link the *.o into the library, not the executable.
@@ -135,6 +135,64 @@
 LIBJVM   = lib$(JVM).so
 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
 
+CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
+CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
+CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm
+CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm
+CORE_PATHS += $(GENERATED)/jvmtifiles
+
+COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1
+
+COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto
+COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt
+COMPILER2_PATHS +=  $(GENERATED)/adfiles
+
+# Include dirs per type.
+Src_Dirs/CORE      := $(CORE_PATHS)
+Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS)
+Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS)
+Src_Dirs/TIERED    := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS)
+Src_Dirs/ZERO      := $(CORE_PATHS)
+Src_Dirs/SHARK     := $(CORE_PATHS)
+Src_Dirs := $(Src_Dirs/$(TYPE))
+
+COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\*
+COMPILER1_SPECIFIC_FILES := c1_\*
+SHARK_SPECIFIC_FILES     := shark
+ZERO_SPECIFIC_FILES      := zero
+
+# Always exclude these.
+Src_Files_EXCLUDE := dtrace jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
+
+# Exclude per type.
+Src_Files_EXCLUDE/CORE      := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
+Src_Files_EXCLUDE/TIERED    := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
+Src_Files_EXCLUDE/ZERO      := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+Src_Files_EXCLUDE/SHARK     := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES)
+
+Src_Files_EXCLUDE +=  $(Src_Files_EXCLUDE/$(TYPE))
+
+# Special handling of arch model.
+ifeq ($(Platform_arch_model), x86_32)
+Src_Files_EXCLUDE += \*x86_64\*
+endif
+ifeq ($(Platform_arch_model), x86_64)
+Src_Files_EXCLUDE += \*x86_32\*
+endif
+
+# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
+define findsrc
+	$(notdir $(shell find $(1)/. ! -name . -prune \
+		-a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
+		-a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \)))
+endef
+
+Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
+
+Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
+
 JVM_OBJ_FILES = $(Obj_Files) $(DTRACE_OBJS)
 
 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
@@ -205,7 +263,7 @@
 
 #----------------------------------------------------------------------
 
-build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) checkAndBuildSA dtraceCheck
+build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) $(BUILDLIBSAPROC) dtraceCheck
 
 install: install_jvm install_jsig install_saproc
 
--- a/make/windows/README	Tue Dec 14 13:00:01 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-Copyright (c) 2007 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.
-
-________________________________________________________________________________
-
-__Introduction__________________________________________________________________
-
-This readme file should provide all the information needed to build
-the HotSpot VM for Windows 95/Windows NT from its teamware workspace.
-It is intended as a starting point for people who want to learn how
-to work with the current HotSpot source workspace and who need to
-build the VM locally. It is not intended as a tutorial for licensees.
-
-Last update: 03/28/05
-
-
-__Platform______________________________________________________________________
-
-The VM builds under the following platforms:
-- Windows NT 4.0 on Intel x486 or greater
-- x486 PC (or greater), 32MByte or more
-
-
-__Tools_________________________________________________________________________
-
-For building/testing the following tools need to be available:
-- Microsoft Visual C++ 6.0 (with nmake version 1.62.7022 or greater)
-- MKS Toolkit 6.1 or greater
-  see: /net/reinstall/export/vol0/pc-archive/software/mks6.1 (NFS)
-   or: \\reinstall\pc-archive\software\mks6.1                (NT)
-
-
-__JDK___________________________________________________________________________
-
-The workspace works with the following version of the JDK:
-(NOTE: these are out of date)
-- JDK1.2FCS "V" build
-  see: /usr/local/java/jdk1.2/win32
-
-and the following version(s) of HotJava:
-- hjb1.1.4
-- hjb1.1.5
-  see /usr/local/java/hjb1.1.x/win32
-
-
-__Environment variables_________________________________________________________
-
-The following environment variables need to be set up for the IDE
-build process.  For batch builds these do not need to be set.
-
-HotSpotMksHome     points to the (NFS or PC-local) directory where the MKS
-                   executables (like sh.exe and grep.exe) are installed
-
-Optionally you may set the following variables in your environment and they
-will be picked up by the create.bat script used to generate the vm.vcproj files.
-See the section on building within MS Developer Studio for more details.
-
-HotSpotWorkSpace   points to the (NFS) directory where the workspace is located
-HotSpotBuildSpace  points to the (PC-local) directory where the vm is built
-HotSpotReleaseBinDest points to the (NFS or PC-local) directory where the product DLL is
-		      written
-HotSpotDebugBinDest   points to the (NFS or PC-local) directory where the debug DLL is
-		      written
-
-NOTE: For both batch and IDE builds, java and javac must be in your
-PATH, and the versions found by default must work. (If this turns out
-to be a problem, we can define HotSpotJava and HotSpotJavaC for
-bootstrapping...)
-
-__Building the JVM from the command line________________________________________
-
-1) choose a directory in which you want to build the vm
-   (the build process will create a subdirectory)
-
-2) To build the 'core' version (debug || optimized)
-   %HotSpotWorkSpace%\build\windows\build <flavor> core %HotSpotWorkSpace% <jdk_dir>
-   To build the 'compiler2' version (debug || optimized)
-   %HotSpotWorkSpace%\build\windows\build <flavor> compiler2 %HotSpotWorkSpace% <jdk_dir>
-
-   where <jdk_dir> is a full path to a JDK in which bin/java and
-   bin/javac are present and working.
-
-3) If you have problems with building, first try:
-   vcvars32 <CR> (sets path for VC++)
-
-4) In addition to jvm.dll, the Serviceability Agent (SA) based JDI connector 
-   and command line tools are built if dbgeng.h and dbgeng.lib
-   can be located, and BUILD_WIN_SA=1 is specified.   We look for dbgeng.h here:
-        $(MSVCDIR)\PlatformSDK\Include
-        $(SYSTEMROOT)\..\Program Files\Microsoft SDK\include
-
-  The first directory is part of  Visual Studio VC .NET 2003.
-  The second is used on Windows-amd64.
-
-
-__Building the JVM from within MS Developer Studio______________________________
-
-0) Set environment variables as described above
-
-1) Run the following script:
-   %HotSpotWorkSpace%\build\windows\create <type> { <workspace> <buildspace> <productbindest> <debugbindest> }
-   where type is one of core, compiler1, compiler2.  If you leave off the
-   "<workspace> <buildspace> <productbindest> <debugbindest>" part, the script expects to find their
-   values in the HotSpotWorkSpace, HotSpotBuildSpace, HotSpotReleaseBinDest, and HotSpotDebugBinDest environment
-   variables.  The resulting vm.vcproj does not depend on these values in the environment.
-
-   This will populate the build space with the appropriate makefiles
-   and run nmake in it. This builds and runs makedeps, which now
-   generates the appropriate vm.vcproj into the build space. It also
-   builds and runs adlc.
-
-   To regenerate the .incl and .dsp files after changing the include
-   databases, just run nmake in the build space.
-
-   The build process now relies on java and javac. For the IDE builds,
-   the full path to a JDK (in which bin/java and bin/javac are present
-   and working) can be specified either explicitly with the
-   ALT_BOOTDIR environment variable (like the JDK build process), via
-   the JDK build's default BOOTDIR environment variable, via JAVA_HOME,
-   or implicitly via the PATH.
-
-   (Note that there are now many more command line options to MakeDeps
-   on the Windows platform than before. These have been bundled into
-   makefiles/makedeps.make, but it is still necessary to keep this in
-   sync with the batch makefiles, in vm/generated.)
-
-   If you have problems with building (i.e,. finding nmake), first try:
-   vcvars32 <CR> (sets path for VC++)
-
-2) Double-click the vm.vcproj file in the %HotSpotBuildSpace% directory
-   to open MS Developer Studio.
-
-3) build desired or all versions:
-   menu Build -> Batch Build... -> Build (or Rebuild All)
-
-4) jvm.dll is in the %HotSpotReleaseBinDest% or %HotSpotDebugBinDest% directory
-   depending on which configuration you built (release or debug).
-
-Note: do not edit any of the files (especially the vm.vcproj file) in the
-build space, since they are all either autogenerated or copied from
-the work space. If necessary, modify the original Makefiles in
-%HotSpotWorkSpace%\build\windows\projectfiles, or the shared
-makedeps arguments in
-%HotSpotWorkSpace%\build\windows\makefiles\makedeps.make.
-
-Note that it appears that some options set in the IDE (for example,
-the default executable) show up not in the .dsp file, but in the .opt
-file, so the automatic regeneration of the .dsp file should not
-destroy the project settings. However, makedeps.make should be edited
-to supply per-file compiler options.
-
-To build adlc from within the IDE for debugging purposes:
-
-1) in MS Developer Studio, open ADLCompiler.dsw:
-   menu File -> Open Workspace...
-   select & double-click ADLCompiler.dsw
-
-2) rebuild all (debug mode is enough)
-   menu Build -> Rebuild All (make sure Win32 Debug version is selected)
-
-
-__Testing the VM________________________________________________________________
-
-To test the VM using the Tonga Testsuite, use testlook. testlook is a very
-simple testing framework on top of Tonga which allows us to use one (Tonga)
-test file, that can be extended with attributes.
-
-1) copy %HotSpotWorkSpace%\test\testlook.bat onto PC (preferably
-   %HotSpotBuildSpace%\bin, which should ideally be in the path)
-
-2) run testlook <cr> or testlook help <cr> for details
-
-3) to run testlook you need to have Tonga mounted:
-   net use T: \\tapas\export1\psqe
-
-
-__HotJava under HotSpot_________________________________________________________
-
-To run HotJava, use the .bat file %HotSpotWorkSpace%\test\h.bat. Copy
-it into %HotSpotBuildSpace%/<flavor> (which ideally is in the path) and run
-HotJava: h java <flags> (e.g., h java_g -Xint).
-
-
-__Preferred directory setup under Windows NT____________________________________
-
-Within the HotSpot group we are using the following directory setup:
-
-D:\jdk1.2          - where we install the JDK
-
-The following drives are mounted for testing/putbacks/etc.:
-
-net use T: \\tapas\export1\psqe
-net use Y: \\rschmidt\GammaBase
-net use Z: \\animorphic\animorphic
--- a/make/windows/build.bat	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/build.bat	Wed Jan 05 10:06:07 2011 +0000
@@ -1,6 +1,6 @@
 @echo off
 REM
-REM Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+REM Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 REM
 REM This code is free software; you can redistribute it and/or modify it
--- a/make/windows/build_vm_def.sh	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/build_vm_def.sh	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2010, 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
@@ -45,6 +45,9 @@
 echo "EXPORTS" > vm1.def
 
 AWK="$MKS_HOME/awk.exe"
+if [ ! -e $AWK ]; then
+    AWK="$MKS_HOME/gawk.exe"
+fi
 GREP="$MKS_HOME/grep.exe"
 SORT="$MKS_HOME/sort.exe"
 UNIQ="$MKS_HOME/uniq.exe"
@@ -57,7 +60,7 @@
 LINK_VER="$1"
 fi
 
-if [ "x$LINK_VER" != "x800" -a  "x$LINK_VER" != "x900" ]; then
+if [ "x$LINK_VER" != "x800" -a  "x$LINK_VER" != "x900" -a "x$LINK_VER" != "x1000" ]; then
 $DUMPBIN /symbols *.obj | "$GREP" "??_7.*@@6B@" | "$GREP" -v "type_info" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def
 else
 # Can't use pipes when calling cl.exe or link.exe from IDE. Using transit file vm3.def
--- a/make/windows/create.bat	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/create.bat	Wed Jan 05 10:06:07 2011 +0000
@@ -1,6 +1,6 @@
 @echo off
 REM
-REM Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
+REM Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 REM
 REM This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,8 @@
 REM This is the interactive build setup script (as opposed to the batch
 REM build execution script). It creates $HotSpotBuildSpace if necessary,
 REM copies the appropriate files out of $HotSpotWorkSpace into it, and
-REM builds and runs MakeDeps in it. This has the side-effect of creating
+REM builds and runs ProjectCreator in it. This has the side-effect of creating
 REM the vm.vcproj file in the buildspace, which is then used in Visual C++.
-REM 
-REM The generated project file depends upon the include databases. If
-REM those are changed then MakeDeps is rerun.
 
 REM
 REM Since we don't have uname and we could be cross-compiling,
@@ -39,6 +36,20 @@
 REM Note: Running this batch file from the Windows command shell requires
 REM that "grep" be accessible on the PATH. An MKS install does this.
 REM 
+
+cl 2>NUL >NUL
+if %errorlevel% == 0 goto nexttest
+echo Make sure cl.exe is in your PATH before running this script.
+goto end
+
+:nexttest
+grep -V 2>NUL >NUL
+if %errorlevel% == 0 goto testit
+echo Make sure grep.exe is in your PATH before running this script. Either cygwin or MKS should work.
+goto end
+
+
+:testit
 cl 2>&1 | grep "IA-64" >NUL
 if %errorlevel% == 0 goto isia64
 cl 2>&1 | grep "AMD64" >NUL
@@ -47,37 +58,40 @@
 set BUILDARCH=i486
 set Platform_arch=x86
 set Platform_arch_model=x86_32
-goto end
+goto done
 :amd64
 set ARCH=x86
 set BUILDARCH=amd64
 set Platform_arch=x86
 set Platform_arch_model=x86_64
-goto end
+goto done
 :isia64
 set ARCH=ia64
 set BUILDARCH=ia64
 set Platform_arch=ia64
 set Platform_arch_model=ia64
-:end
+:done
 
 setlocal
 
 if "%1" == "" goto usage
 
-if not "%4" == "" goto usage
+if not "%2" == "" goto usage
 
-set HotSpotWorkSpace=%1
-set HotSpotBuildSpace=%2
-set HotSpotJDKDist=%3
+REM Set HotSpotWorkSpace to the directy two steps above this script
+for %%i in ("%~dp0..") do ( set HotSpotWorkSpace=%%~dpi)
+set HotSpotBuildRoot=%HotSpotWorkSpace%build
+set HotSpotBuildSpace=%HotSpotBuildRoot%\vs
+set HotSpotJDKDist=%1
+
 
 REM figure out MSC version
 for /F %%i in ('sh %HotSpotWorkSpace%/make/windows/get_msc_ver.sh') do set %%i
 
 echo **************************************************************
-set ProjectFile=vm.vcproj
+set ProjectFile=jvm.vcproj
 if "%MSC_VER%" == "1200" (
-set ProjectFile=vm.dsp
+set ProjectFile=jvm.dsp
 echo Will generate VC6 project {unsupported}
 ) else (
 if "%MSC_VER%" == "1400" (
@@ -86,10 +100,16 @@
 if "%MSC_VER%" == "1500" (
 echo Will generate VC9 {Visual Studio 2008}
 ) else (
+if "%MSC_VER%" == "1600" (
+echo Detected Visual Studio 2010, but
+echo will generate VC9 {Visual Studio 2008}
+echo Use conversion wizard in VS 2010.
+) else (
 echo Will generate VC7 project {Visual Studio 2003 .NET}
 )
 )
 )
+)
 echo                            %ProjectFile%
 echo **************************************************************
 
@@ -121,6 +141,8 @@
 
 :test3
 if not "%HOTSPOTMKSHOME%" == "" goto makedir
+if exist c:\cygwin\bin set HOTSPOTMKSHOME=c:\cygwin\bin
+if not "%HOTSPOTMKSHOME%" == "" goto makedir
 echo Warning: please set variable HOTSPOTMKSHOME to place where 
 echo          your MKS/Cygwin installation is
 echo.
@@ -136,21 +158,24 @@
 REM This is now safe to do.
 :copyfiles
 for /D %%i in (compiler1, compiler2, tiered, core, kernel) do (
-if NOT EXIST %HotSpotBuildSpace%\%%i mkdir %HotSpotBuildSpace%\%%i
-copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\ > NUL
+if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
+copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
 )
 
 REM force regneration of ProjectFile
 if exist %HotSpotBuildSpace%\%ProjectFile% del %HotSpotBuildSpace%\%ProjectFile%
 
 for /D %%i in (compiler1, compiler2, tiered, core, kernel) do (
-
-echo # Generated file!                                                 >    %HotSpotBuildSpace%\%%i\local.make
+echo -- %%i --
+echo # Generated file!                                                        >    %HotSpotBuildSpace%\%%i\local.make
 echo # Changing a variable below and then deleting %ProjectFile% will cause  >>    %HotSpotBuildSpace%\%%i\local.make
 echo # %ProjectFile% to be regenerated with the new values.  Changing the    >>    %HotSpotBuildSpace%\%%i\local.make
-echo # version requires rerunning create.bat.                         >>    %HotSpotBuildSpace%\%%i\local.make
+echo # version requires rerunning create.bat.                                >>    %HotSpotBuildSpace%\%%i\local.make
 echo.                                      >>    %HotSpotBuildSpace%\%%i\local.make
+echo Variant=%%i			   >>    %HotSpotBuildSpace%\%%i\local.make
+echo WorkSpace=%HotSpotWorkSpace%   	   >>    %HotSpotBuildSpace%\%%i\local.make
 echo HOTSPOTWORKSPACE=%HotSpotWorkSpace%   >>    %HotSpotBuildSpace%\%%i\local.make
+echo HOTSPOTBUILDROOT=%HotSpotBuildRoot%   >>    %HotSpotBuildSpace%\%%i\local.make
 echo HOTSPOTBUILDSPACE=%HotSpotBuildSpace% >>    %HotSpotBuildSpace%\%%i\local.make
 echo HOTSPOTJDKDIST=%HotSpotJDKDist%       >>    %HotSpotBuildSpace%\%%i\local.make
 echo ARCH=%ARCH%                           >>    %HotSpotBuildSpace%\%%i\local.make
@@ -158,29 +183,37 @@
 echo Platform_arch=%Platform_arch%         >>    %HotSpotBuildSpace%\%%i\local.make
 echo Platform_arch_model=%Platform_arch_model% >>    %HotSpotBuildSpace%\%%i\local.make
 
-REM build config specific stuff
+for /D %%j in (debug, fastdebug, product) do (
+if NOT EXIST %HotSpotBuildSpace%\%%i\%%j mkdir %HotSpotBuildSpace%\%%i\%%j
+)
 
-pushd %HotSpotBuildSpace%\%%i
+pushd %HotSpotBuildSpace%\%%i\generated
 nmake /nologo
 popd
+
 )
 
+pushd %HotSpotBuildRoot%
+
+REM It doesn't matter which variant we use here, "compiler1" is as good as any of the others - we need the common variables
+nmake /nologo /F %HotSpotWorkSpace%/make/windows/projectfiles/common/Makefile LOCAL_MAKE=%HotSpotBuildSpace%\compiler1\local.make %HotSpotBuildRoot%/%ProjectFile%
+
+popd
+
 goto end
 
 :usage
-echo Usage: create HotSpotWorkSpace HotSpotBuildSpace HotSpotJDKDist
+echo Usage: create HotSpotJDKDist
 echo.
-echo This is the interactive build setup script (as opposed to the batch
-echo build execution script). It creates HotSpotBuildSpace if necessary,
-echo copies the appropriate files out of HotSpotWorkSpace into it, and
-echo builds and runs MakeDeps in it. This has the side-effect of creating
+echo This is the VS build setup script (as opposed to the batch
+echo build execution script). It creates a build directory if necessary,
+echo copies the appropriate files out of the workspace into it, and
+echo builds and runs ProjectCreator in it. This has the side-effect of creating
 echo the %ProjectFile% file in the build space, which is then used in Visual C++.
-echo The HotSpotJDKDist defines place where JVM binaries should be placed.
+echo.
+echo The HotSpotJDKDist defines the JDK that should be used when running the JVM.
 echo Environment variable FORCE_MSC_VER allows to override MSVC version autodetection.
 echo.
-echo The generated project file depends upon the include databases. If
-echo those are changed then MakeDeps is rerun.
-echo.
 echo NOTE that it is now NOT safe to modify any of the files in the build
 echo space, since they may be overwritten whenever this script is run or
 echo nmake is run in that directory.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/windows/create_obj_files.sh	Wed Jan 05 10:06:07 2011 +0000
@@ -0,0 +1,128 @@
+#
+# Copyright (c) 2010, 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.
+#  
+#
+
+set -e
+
+# Note that we currently do not have a way to set HotSpotMksHome in
+# the batch build, but so far this has not seemed to be a problem. The
+# reason this environment variable is necessary is that it seems that
+# Windows truncates very long PATHs when executing shells like MKS's
+# sh, and it has been found that sometimes `which sh` fails.
+
+if [ "x$HotSpotMksHome" != "x" ]; then
+  TOOL_DIR="$HotSpotMksHome"
+else
+  # HotSpotMksHome is not set so use the directory that contains "sh".
+  # This works with both MKS and Cygwin.
+  SH=`which sh`
+  TOOL_DIR=`dirname "$SH"`
+fi
+
+DIRNAME="$TOOL_DIR/dirname"
+FIND="$TOOL_DIR/find"
+
+TYPE=$1
+Platform_arch=$2
+Platform_arch_model=$3
+Platform_os_family=windows
+Platform_os_arch=windows_$Platform_arch
+
+WorkSpace=$4
+GENERATED=$5
+
+BASE_PATHS="` $FIND ${WorkSpace}/src/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`"
+BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/share/vm/gc_implementation/shared"
+BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os/${Platform_os_family}/vm"
+BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/cpu/${Platform_arch}/vm"
+BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os_cpu/${Platform_os_arch}/vm"
+BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles"
+
+CORE_PATHS="${BASE_PATHS}"
+# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS.
+CORE_PATHS="${CORE_PATHS} `$FIND ${WorkSpace}/src/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
+
+COMPILER1_PATHS="${WorkSpace}/src/share/vm/c1"
+
+COMPILER2_PATHS="${WorkSpace}/src/share/vm/opto"
+COMPILER2_PATHS="${COMPILER2_PATHS} ${WorkSpace}/src/share/vm/libadt"
+COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles"
+
+# Include dirs per type.
+case "${TYPE}" in
+    "core")      Src_Dirs="${CORE_PATHS}" ;;
+    "kernel")    Src_Dirs="${BASE_PATHS} ${COMPILER1_PATHS}" ;;
+    "compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;;
+    "compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;;
+    "tiered")    Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;;
+    "zero")      Src_Dirs="${CORE_PATHS}" ;;
+    "shark")     Src_Dirs="${CORE_PATHS}" ;;
+esac
+
+COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp chaitin* c2_* runtime_*"
+COMPILER1_SPECIFIC_FILES="c1_*"
+SHARK_SPECIFIC_FILES="shark"
+ZERO_SPECIFIC_FILES="zero"
+
+# These files need to be excluded when building the kernel target.
+KERNEL_EXCLUDED_FILES="attachListener.cpp attachListener_windows.cpp dump.cpp dump_${Platform_arch_model}.cpp forte.cpp fprofiler.cpp heapDumper.cpp heapInspection.cpp jniCheck.cpp jvmtiCodeBlobEvents.cpp jvmtiExtensions.cpp jvmtiImpl.cpp jvmtiRawMonitor.cpp jvmtiTagMap.cpp jvmtiTrace.cpp restore.cpp serialize.cpp vmStructs.cpp g1MemoryPool.cpp psMemoryPool.cpp gcAdaptivePolicyCounters.cpp concurrentGCThread.cpp mutableNUMASpace.cpp allocationStats.cpp gSpaceCounters.cpp immutableSpace.cpp mutableSpace.cpp spaceCounters.cpp yieldingWorkgroup.cpp"
+
+# Always exclude these.
+Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp"
+
+# Exclude per type.
+case "${TYPE}" in
+    "core")      Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
+    "kernel")    Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ${KERNEL_EXCLUDED_FILES} ciTypeFlow.cpp" ;;
+    "compiler1") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
+    "compiler2") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
+    "tiered")    Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
+    "zero")      Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
+    "shark")     Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES}" ;;
+esac
+
+# Special handling of arch model.
+case "${Platform_arch_model}" in
+	"x86_32") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_64*" ;;
+	"x86_64") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_32*" ;;
+esac
+
+# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
+function findsrc {
+    $FIND ${1}/. ! -name . -prune \
+		-a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
+		-a \! \( -name ${Src_Files_EXCLUDE// / -o -name } \) \
+		| sed 's/.*\/\(.*\)/\1/';
+}
+
+Src_Files=
+for e in ${Src_Dirs}; do
+   Src_Files="${Src_Files}`findsrc ${e}` "
+done 
+
+Obj_Files=
+for e in ${Src_Files}; do
+	Obj_Files="${Obj_Files}${e%\.[!.]*}.obj "
+done
+
+echo Obj_Files=${Obj_Files}
--- a/make/windows/get_msc_ver.sh	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/get_msc_ver.sh	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
--- a/make/windows/makefiles/adlc.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/adlc.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -22,7 +22,6 @@
 #  
 #
 
-!include $(WorkSpace)/make/windows/makefiles/compile.make
 
 # Rules for building adlc.exe
 
@@ -46,27 +45,16 @@
 ADLCFLAGS=-q -T -U_LP64
 !endif
 
-CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE  
+ADLC_CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
 
 CPP_INCLUDE_DIRS=\
-  /I "..\generated"                          \
-  /I "$(WorkSpace)\src\share\vm\compiler"    \
-  /I "$(WorkSpace)\src\share\vm\code"        \
-  /I "$(WorkSpace)\src\share\vm\interpreter" \
-  /I "$(WorkSpace)\src\share\vm\classfile"   \
-  /I "$(WorkSpace)\src\share\vm\asm"         \
-  /I "$(WorkSpace)\src\share\vm\memory"      \
-  /I "$(WorkSpace)\src\share\vm\oops"        \
-  /I "$(WorkSpace)\src\share\vm\prims"       \
-  /I "$(WorkSpace)\src\share\vm\runtime"     \
-  /I "$(WorkSpace)\src\share\vm\utilities"   \
-  /I "$(WorkSpace)\src\share\vm\libadt"      \
-  /I "$(WorkSpace)\src\share\vm\opto"        \
-  /I "$(WorkSpace)\src\os\windows\vm"          \
+  /I "..\generated" \
+  /I "$(WorkSpace)\src\share\vm" \
+  /I "$(WorkSpace)\src\os\windows\vm" \
   /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
 
-# NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_INCL
-# and MakeDepsIDEOptions in makedeps.make. 
+# NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_DIR
+# and ProjectCreatorIDEOptions in projectcreator.make. 
 GENERATED_NAMES=\
   ad_$(Platform_arch_model).cpp \
   ad_$(Platform_arch_model).hpp \
@@ -81,24 +69,24 @@
   dfa_$(Platform_arch_model).cpp
 
 # NOTE! This must be kept in sync with GENERATED_NAMES
-GENERATED_NAMES_IN_INCL=\
-  incls/ad_$(Platform_arch_model).cpp \
-  incls/ad_$(Platform_arch_model).hpp \
-  incls/ad_$(Platform_arch_model)_clone.cpp \
-  incls/ad_$(Platform_arch_model)_expand.cpp \
-  incls/ad_$(Platform_arch_model)_format.cpp \
-  incls/ad_$(Platform_arch_model)_gen.cpp \
-  incls/ad_$(Platform_arch_model)_misc.cpp \
-  incls/ad_$(Platform_arch_model)_peephole.cpp \
-  incls/ad_$(Platform_arch_model)_pipeline.cpp \
-  incls/adGlobals_$(Platform_arch_model).hpp \
-  incls/dfa_$(Platform_arch_model).cpp
+GENERATED_NAMES_IN_DIR=\
+  $(AdlcOutDir)\ad_$(Platform_arch_model).cpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model).hpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model)_clone.cpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model)_expand.cpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model)_format.cpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model)_gen.cpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model)_misc.cpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model)_peephole.cpp \
+  $(AdlcOutDir)\ad_$(Platform_arch_model)_pipeline.cpp \
+  $(AdlcOutDir)\adGlobals_$(Platform_arch_model).hpp \
+  $(AdlcOutDir)\dfa_$(Platform_arch_model).cpp
 
 {$(WorkSpace)\src\share\vm\adlc}.cpp.obj::
-        $(CPP) $(CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $<
+        $(CPP) $(ADLC_CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $<
 
 {$(WorkSpace)\src\share\vm\opto}.cpp.obj::
-        $(CPP) $(CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $<
+        $(CPP) $(ADLC_CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $<
 
 adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \
           forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj
@@ -110,10 +98,12 @@
 	$(MT) /manifest $@.manifest /outputresource:$@;#1
 !endif
 
-$(GENERATED_NAMES_IN_INCL): $(Platform_arch_model).ad adlc.exe includeDB.current 
+$(GENERATED_NAMES_IN_DIR): $(Platform_arch_model).ad adlc.exe
 	rm -f $(GENERATED_NAMES)
+	if exist $(AdlcOutDir) rmdir /s /q $(AdlcOutDir)
+	mkdir $(AdlcOutDir)
 	$(ADLC) $(ADLCFLAGS) $(Platform_arch_model).ad
-	mv $(GENERATED_NAMES) incls/
+	mv $(GENERATED_NAMES) $(AdlcOutDir)/
 
 $(Platform_arch_model).ad: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad
 	rm -f $(Platform_arch_model).ad
--- a/make/windows/makefiles/compile.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/compile.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2010, 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
@@ -80,6 +80,20 @@
 CPP=ARCH_ERROR
 !endif
 
+CPP_FLAGS=$(CPP_FLAGS) /D "WIN32" /D "_WINDOWS"
+
+# Must specify this for sharedRuntimeTrig.cpp
+CPP_FLAGS=$(CPP_FLAGS) /D "VM_LITTLE_ENDIAN"
+
+# Used for platform dispatching
+CPP_FLAGS=$(CPP_FLAGS) /D TARGET_OS_FAMILY_windows
+CPP_FLAGS=$(CPP_FLAGS) /D TARGET_ARCH_$(Platform_arch)
+CPP_FLAGS=$(CPP_FLAGS) /D TARGET_ARCH_MODEL_$(Platform_arch_model)
+CPP_FLAGS=$(CPP_FLAGS) /D TARGET_OS_ARCH_windows_$(Platform_arch)
+CPP_FLAGS=$(CPP_FLAGS) /D TARGET_OS_ARCH_MODEL_windows_$(Platform_arch_model)
+CPP_FLAGS=$(CPP_FLAGS) /D TARGET_COMPILER_visCPP
+
+
 # MSC_VER is a 4 digit number that tells us what compiler is being used
 #    and is generated when the local.make file is created by build.make
 #    via the script get_msc_ver.sh
--- a/make/windows/makefiles/debug.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/debug.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2010, 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
@@ -28,7 +28,12 @@
 SAWINDBG=sawindbg.dll
 GENERATED=../generated
 
-default:: _build_pch_file.obj $(AOUT) checkAndBuildSA
+# Allow the user to turn off precompiled headers from the command line.
+!if "$(USE_PRECOMPILED_HEADER)" != "0"
+BUILD_PCH_FILE=_build_pch_file.obj
+!endif
+
+default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA
 
 !include ../local.make
 !include compile.make
@@ -38,15 +43,15 @@
 !include $(WorkSpace)/make/windows/makefiles/vm.make
 !include local.make
 
-!include $(GENERATED)/Dependencies
-
 HS_BUILD_ID=$(HS_BUILD_VER)-debug
 
 # Force resources to be rebuilt every time
 $(Res_Files): FORCE
 
-$(AOUT): $(Res_Files) $(Obj_Files)
+vm.def: $(Obj_Files)
 	sh $(WorkSpace)/make/windows/build_vm_def.sh
+
+$(AOUT): $(Res_Files) $(Obj_Files) vm.def
 	$(LINK) @<<
   $(LINK_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
 <<
@@ -59,3 +64,4 @@
 
 !include $(WorkSpace)/make/windows/makefiles/shared.make
 !include $(WorkSpace)/make/windows/makefiles/sa.make
+!include $(WorkSpace)/make/windows/makefiles/launcher.make
--- a/make/windows/makefiles/defs.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/defs.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
--- a/make/windows/makefiles/fastdebug.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/fastdebug.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -28,7 +28,12 @@
 SAWINDBG=sawindbg.dll
 GENERATED=../generated
 
-default:: _build_pch_file.obj $(AOUT) checkAndBuildSA
+# Allow the user to turn off precompiled headers from the command line.
+!if "$(USE_PRECOMPILED_HEADER)" != "0"
+BUILD_PCH_FILE=_build_pch_file.obj
+!endif
+
+default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA
 
 !include ../local.make
 !include compile.make
@@ -38,15 +43,15 @@
 !include $(WorkSpace)/make/windows/makefiles/vm.make
 !include local.make
 
-!include $(GENERATED)/Dependencies
-
 HS_BUILD_ID=$(HS_BUILD_VER)-fastdebug
 
 # Force resources to be rebuilt every time
 $(Res_Files): FORCE
 
-$(AOUT): $(Res_Files) $(Obj_Files)
+vm.def: $(Obj_Files)
 	sh $(WorkSpace)/make/windows/build_vm_def.sh
+
+$(AOUT): $(Res_Files) $(Obj_Files) vm.def
 	$(LINK) @<<
   $(LINK_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
 <<
@@ -57,6 +62,6 @@
 	$(MT) /manifest $@.manifest /outputresource:$@;#2
 !endif
 
-
 !include $(WorkSpace)/make/windows/makefiles/shared.make
 !include $(WorkSpace)/make/windows/makefiles/sa.make
+!include $(WorkSpace)/make/windows/makefiles/launcher.make
--- a/make/windows/makefiles/generated.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/generated.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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
@@ -23,7 +23,7 @@
 #
 
 !include ../local.make
-!include $(WorkSpace)/make/windows/makefiles/makedeps.make
+!include $(WorkSpace)/make/windows/makefiles/projectcreator.make
 !include local.make
 
 # Pick up rules for building JVMTI (JSR-163)
@@ -33,68 +33,25 @@
 # Pick up rules for building SA
 !include $(WorkSpace)/make/windows/makefiles/sa.make
 
+AdlcOutDir=adfiles
+
 !if ("$(Variant)" == "compiler2") || ("$(Variant)" == "tiered")
-default:: includeDB.current Dependencies incls/ad_$(Platform_arch_model).cpp incls/dfa_$(Platform_arch_model).cpp $(JvmtiGeneratedFiles)
+default:: $(AdlcOutDir)/ad_$(Platform_arch_model).cpp $(AdlcOutDir)/dfa_$(Platform_arch_model).cpp $(JvmtiGeneratedFiles) buildobjfiles
 !else
-default:: includeDB.current Dependencies $(JvmtiGeneratedFiles)
+default:: $(JvmtiGeneratedFiles) buildobjfiles
 !endif
 
-# core plus serial gc
-IncludeDBs_base=$(WorkSpace)/src/share/vm/includeDB_core \
-           $(WorkSpace)/src/share/vm/includeDB_jvmti \
-           $(WorkSpace)/src/share/vm/includeDB_gc \
-           $(WorkSpace)/src/share/vm/gc_implementation/includeDB_gc_serial
+buildobjfiles:
+	@ sh $(WorkSpace)/make/windows/create_obj_files.sh $(Variant) $(Platform_arch) $(Platform_arch_model) $(WorkSpace) .	> objfiles.make
 
-# parallel gc
-IncludeDBs_gc= $(WorkSpace)/src/share/vm/includeDB_gc_parallel \
-           $(WorkSpace)/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge \
-           $(WorkSpace)/src/share/vm/gc_implementation/includeDB_gc_shared \
-           $(WorkSpace)/src/share/vm/gc_implementation/includeDB_gc_parNew \
-           $(WorkSpace)/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep \
-           $(WorkSpace)/src/share/vm/gc_implementation/includeDB_gc_g1
-
-IncludeDBs_core=$(IncludeDBs_base) $(IncludeDBs_gc) \
-                $(WorkSpace)/src/share/vm/includeDB_features
-
-!if "$(Variant)" == "core"
-IncludeDBs=$(IncludeDBs_core)
-!endif
-
-!if "$(Variant)" == "kernel"
-IncludeDBs=$(IncludeDBs_base) $(WorkSpace)/src/share/vm/includeDB_compiler1
-!endif
-
-!if "$(Variant)" == "compiler1"
-IncludeDBs=$(IncludeDBs_core) $(WorkSpace)/src/share/vm/includeDB_compiler1
-!endif
-
-
-!if "$(Variant)" == "compiler2"
-IncludeDBs=$(IncludeDBs_core) $(WorkSpace)/src/share/vm/includeDB_compiler2
-!endif
-
-!if "$(Variant)" == "tiered"
-IncludeDBs=$(IncludeDBs_core) $(WorkSpace)/src/share/vm/includeDB_compiler1 \
-           $(WorkSpace)/src/share/vm/includeDB_compiler2
-!endif
-
-# Note we don't generate a Visual C++ project file using MakeDeps for
-# the batch build.
-includeDB.current Dependencies: classes/MakeDeps.class $(IncludeDBs)
-	cat $(IncludeDBs) > includeDB
-	if exist incls rmdir /s /q incls
-	mkdir incls
-	$(RUN_JAVA) -Djava.class.path=classes MakeDeps WinGammaPlatform$(VcVersion) $(WorkSpace)/make/windows/platform_$(BUILDARCH) includeDB $(MakeDepsOptions)
-	rm -f includeDB.current
-	cp includeDB includeDB.current
-
-classes/MakeDeps.class: $(MakeDepsSources)
+classes/ProjectCreator.class: $(ProjectCreatorSources)
 	if exist classes rmdir /s /q classes
 	mkdir classes
-	$(COMPILE_JAVAC) -classpath $(WorkSpace)\src\share\tools\MakeDeps -d classes $(MakeDepsSources)
+	$(COMPILE_JAVAC) -classpath $(WorkSpace)\src\share\tools\ProjectCreator -d classes $(ProjectCreatorSources)
 
 !if ("$(Variant)" == "compiler2") || ("$(Variant)" == "tiered")
 
+!include $(WorkSpace)/make/windows/makefiles/compile.make
 !include $(WorkSpace)/make/windows/makefiles/adlc.make
 
 !endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/windows/makefiles/launcher.make	Wed Jan 05 10:06:07 2011 +0000
@@ -0,0 +1,71 @@
+#
+# Copyright (c) 2010, 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.
+#  
+#
+
+
+LAUNCHER_FLAGS=$(CPP_FLAGS) $(ARCHFLAG) \
+	/D FULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
+	/D JDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
+	/D JDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
+	/D GAMMA \
+	/D LAUNCHER_TYPE=\"gamma\" \
+	/D _CRT_SECURE_NO_WARNINGS \
+	/D _CRT_SECURE_NO_DEPRECATE \
+	/D LINK_INTO_LIBJVM \
+	/I $(WorkSpace)\src\os\windows\launcher \
+	/I $(WorkSpace)\src\share\tools\launcher \
+	/I $(WorkSpace)\src\share\vm\prims \
+	/I $(WorkSpace)\src\share\vm \
+	/I $(WorkSpace)\src\cpu\$(Platform_arch)\vm \
+	/I $(WorkSpace)\src\os\windows\vm
+
+LINK_FLAGS=/manifest $(HS_INTERNAL_NAME).lib kernel32.lib user32.lib /nologo /machine:$(MACHINE) /map /debug /subsystem:console 
+
+!if "$(COMPILER_NAME)" == "VS2005"
+# This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib
+#    on the link command line, otherwise we get missing __security_check_cookie
+#    externals at link time. Even with /GS-, you need bufferoverflowU.lib.
+BUFFEROVERFLOWLIB = bufferoverflowU.lib
+LINK_FLAGS = $(LINK_FLAGS) $(BUFFEROVERFLOWLIB)
+!endif
+
+LAUNCHERDIR = $(WorkSpace)/src/os/windows/launcher
+LAUNCHERDIR_SHARE = $(WorkSpace)/src/share/tools/launcher
+
+OUTDIR = launcher
+
+{$(LAUNCHERDIR)}.c{$(OUTDIR)}.obj:
+	-mkdir $(OUTDIR) 2>NUL >NUL
+        $(CPP) $(LAUNCHER_FLAGS) /c /Fo$@ $<
+
+{$(LAUNCHERDIR_SHARE)}.c{$(OUTDIR)}.obj:
+	-mkdir $(OUTDIR) 2>NUL >NUL
+        $(CPP) $(LAUNCHER_FLAGS) /c /Fo$@ $<
+
+$(OUTDIR)\*.obj: $(LAUNCHERDIR)\*.c $(LAUNCHERDIR)\*.h $(LAUNCHERDIR_SHARE)\*.c $(LAUNCHERDIR_SHARE)\*.h
+
+launcher: $(OUTDIR)\java.obj $(OUTDIR)\java_md.obj $(OUTDIR)\jli_util.obj
+	echo $(JAVA_HOME) > jdkpath.txt  
+	$(LINK) $(LINK_FLAGS) /out:hotspot.exe $**
+
+
--- a/make/windows/makefiles/makedeps.make	Tue Dec 14 13:00:01 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-#
-# Copyright (c) 1999, 2009, 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.
-#  
-#
-
-!include $(WorkSpace)/make/windows/makefiles/rules.make
-
-# This is used externally by both batch and IDE builds, so can't
-# reference any of the HOTSPOTWORKSPACE, HOTSPOTBUILDSPACE,
-# HOTSPOTRELEASEBINDEST, or HOTSPOTDEBUGBINDEST environment variables.
-#
-# NOTE: unfortunately the MakeDepsSources list must be kept
-# synchronized between this and the Solaris version
-# (make/solaris/makefiles/makedeps.make).
-
-MakeDepsSources=\
-        $(WorkSpace)\src\share\tools\MakeDeps\Database.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\DirectoryTree.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\DirectoryTreeNode.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\FileFormatException.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\FileList.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\FileName.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\Macro.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\MacroDefinitions.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\MakeDeps.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\MetroWerksMacPlatform.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\Platform.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\UnixPlatform.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatform.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC6.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC7.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC8.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC9.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\Util.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\BuildConfig.java \
-        $(WorkSpace)\src\share\tools\MakeDeps\ArgsParser.java
-
-# This is only used internally
-MakeDepsIncludesPRIVATE=\
-        -relativeInclude src\share\vm\c1 \
-        -relativeInclude src\share\vm\compiler \
-        -relativeInclude src\share\vm\code \
-        -relativeInclude src\share\vm\interpreter \
-        -relativeInclude src\share\vm\ci \
-        -relativeInclude src\share\vm\classfile \
-        -relativeInclude src\share\vm\gc_implementation\parallelScavenge \
-        -relativeInclude src\share\vm\gc_implementation\shared \
-        -relativeInclude src\share\vm\gc_implementation\parNew \
-        -relativeInclude src\share\vm\gc_implementation\concurrentMarkSweep \
-        -relativeInclude src\share\vm\gc_implementation\g1 \
-        -relativeInclude src\share\vm\gc_interface \
-        -relativeInclude src\share\vm\asm \
-        -relativeInclude src\share\vm\memory \
-        -relativeInclude src\share\vm\oops \
-        -relativeInclude src\share\vm\prims \
-        -relativeInclude src\share\vm\runtime \
-        -relativeInclude src\share\vm\services \
-        -relativeInclude src\share\vm\utilities \
-        -relativeInclude src\share\vm\libadt \
-        -relativeInclude src\share\vm\opto \
-        -relativeInclude src\os\windows\vm \
-        -relativeInclude src\os_cpu\windows_$(Platform_arch)\vm \
-        -relativeInclude src\cpu\$(Platform_arch)\vm
-
-# This is referenced externally by both the IDE and batch builds
-MakeDepsOptions=
-
-# This is used externally, but only by the IDE builds, so we can
-# reference environment variables which aren't defined in the batch
-# build process.
-
-MakeDepsIDEOptions = \
-        -useToGeneratePch  java.cpp \
-        -disablePch        os_windows.cpp \
-        -disablePch        os_windows_$(Platform_arch).cpp \
-        -disablePch        osThread_windows.cpp \
-        -disablePch        bytecodeInterpreter.cpp \
-        -disablePch        bytecodeInterpreterWithChecks.cpp \
-	-disablePch        getThread_windows_$(Platform_arch).cpp \
-        -disablePch_compiler2     opcodes.cpp    
-
-# Common options for the IDE builds for core, c1, and c2
-MakeDepsIDEOptions=\
-        $(MakeDepsIDEOptions) \
-        -sourceBase $(HOTSPOTWORKSPACE) \
-	-buildBase $(HOTSPOTBUILDSPACE)\%f\%b \
-        -startAt src \
-	-compiler $(VcVersion) \
-        -projectFileName $(HOTSPOTBUILDSPACE)\$(ProjectFile) \
-        -jdkTargetRoot $(HOTSPOTJDKDIST) \
-        -define ALIGN_STACK_FRAMES \
-        -define VM_LITTLE_ENDIAN \
-        -additionalFile includeDB_compiler1 \
-        -additionalFile includeDB_compiler2 \
-        -additionalFile includeDB_core \
-        -additionalFile includeDB_features \
-        -additionalFile includeDB_jvmti \
-        -additionalFile includeDB_gc \
-        -additionalFile includeDB_gc_parallel \
-        -additionalFile includeDB_gc_parallelScavenge \
-        -additionalFile includeDB_gc_concurrentMarkSweep \
-        -additionalFile includeDB_gc_g1 \
-        -additionalFile includeDB_gc_parNew \
-        -additionalFile includeDB_gc_shared \
-        -additionalFile includeDB_gc_serial \
-        -additionalGeneratedFile $(HOTSPOTBUILDSPACE)\%f\%b vm.def \
-        -prelink  "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b	set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME)	$(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LINK_VER)" \
-       $(MakeDepsIncludesPRIVATE)
-
-# Add in build-specific options
-!if "$(BUILDARCH)" == "i486"
-MakeDepsIDEOptions=$(MakeDepsIDEOptions) -define IA32
-!endif
-
-##################################################
-# JKERNEL specific options
-##################################################
-MakeDepsIDEOptions=$(MakeDepsIDEOptions) \
- -define_kernel KERNEL \
-
-##################################################
-# Client(C1) compiler specific options
-##################################################
-MakeDepsIDEOptions=$(MakeDepsIDEOptions) \
- -define_compiler1 COMPILER1 \
-
-##################################################
-# Server(C2) compiler specific options
-##################################################
-#NOTE! This list must be kept in sync with GENERATED_NAMES in adlc.make.
-MakeDepsIDEOptions=$(MakeDepsIDEOptions) \
- -define_compiler2 COMPILER2 \
- -absoluteInclude_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls \
- -additionalFile_compiler2 $(Platform_arch_model).ad \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model).cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model).hpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model)_clone.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model)_expand.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model)_format.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model)_gen.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model)_misc.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model)_peephole.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls ad_$(Platform_arch_model)_pipeline.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls adGlobals_$(Platform_arch_model).hpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/incls dfa_$(Platform_arch_model).cpp 
-
-# Add in the jvmti (JSR-163) options
-# NOTE: do not pull in jvmtiEnvRecommended.cpp.  This file is generated
-#       so the programmer can diff it with jvmtiEnv.cpp to be sure the
-#       code merge was done correctly (@see jvmti.make and jvmtiEnvFill.java).
-#       If so, they would then check it in as a new version of jvmtiEnv.cpp.
-MakeDepsIDEOptions=$(MakeDepsIDEOptions) \
- -absoluteInclude $(HOTSPOTBUILDSPACE)/jvmtifiles \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/jvmtifiles jvmtiEnv.hpp \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/jvmtifiles jvmtiEnter.cpp \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/jvmtifiles jvmtiEnterTrace.cpp \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/jvmtifiles jvmti.h \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/jvmtifiles bytecodeInterpreterWithChecks.cpp 
--- a/make/windows/makefiles/product.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/product.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, 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,7 +27,12 @@
 AOUT=$(HS_FNAME)
 GENERATED=../generated
 
-default:: _build_pch_file.obj $(AOUT) checkAndBuildSA
+# Allow the user to turn off precompiled headers from the command line.
+!if "$(USE_PRECOMPILED_HEADER)" != "0"
+BUILD_PCH_FILE=_build_pch_file.obj
+!endif
+
+default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA
 
 !include ../local.make
 !include compile.make
@@ -41,8 +46,6 @@
 !include $(WorkSpace)/make/windows/makefiles/vm.make
 !include local.make
 
-!include $(GENERATED)/Dependencies
-
 HS_BUILD_ID=$(HS_BUILD_VER)
 
 # Force resources to be rebuilt every time
@@ -55,8 +58,10 @@
   $(LINK_FLAGS) /out:$@ /implib:$*.lib $(Obj_Files) $(Res_Files)
 <<
 !else
-$(AOUT): $(Res_Files) $(Obj_Files)
+vm.def: $(Obj_Files)
 	sh $(WorkSpace)/make/windows/build_vm_def.sh
+
+$(AOUT): $(Res_Files) $(Obj_Files) vm.def
 	$(LINK) @<<
   $(LINK_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
 <<
@@ -70,3 +75,4 @@
 
 !include $(WorkSpace)/make/windows/makefiles/shared.make
 !include $(WorkSpace)/make/windows/makefiles/sa.make
+!include $(WorkSpace)/make/windows/makefiles/launcher.make
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/windows/makefiles/projectcreator.make	Wed Jan 05 10:06:07 2011 +0000
@@ -0,0 +1,235 @@
+#
+# Copyright (c) 1999, 2010, 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.
+#  
+#
+
+!include $(WorkSpace)/make/windows/makefiles/rules.make
+
+# This is used externally by both batch and IDE builds, so can't
+# reference any of the HOTSPOTWORKSPACE, HOTSPOTBUILDSPACE,
+# HOTSPOTRELEASEBINDEST, or HOTSPOTDEBUGBINDEST environment variables.
+#
+# NOTE: unfortunately the ProjectCreatorSources list must be kept
+# synchronized between this and the Solaris version
+# (make/solaris/makefiles/projectcreator.make).
+
+ProjectCreatorSources=\
+        $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTree.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTreeNode.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\FileFormatException.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\Macro.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\MacroDefinitions.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\ProjectCreator.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatform.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC6.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC7.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC8.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC9.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\Util.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\BuildConfig.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\ArgsParser.java
+
+# This is only used internally
+ProjectCreatorIncludesPRIVATE=\
+        -relativeInclude src\share\vm \
+        -relativeInclude src\share\vm\prims \
+        -relativeInclude src\os\windows\vm \
+        -relativeInclude src\os_cpu\windows_$(Platform_arch)\vm \
+        -relativeInclude src\cpu\$(Platform_arch)\vm \
+        -absoluteInclude $(HOTSPOTBUILDSPACE)/%f/generated \
+        -ignorePath $(HOTSPOTBUILDSPACE)/%f/generated \
+        -ignorePath src\share\vm\adlc \
+        -ignorePath src\share\vm\shark
+
+# This is referenced externally by both the IDE and batch builds
+ProjectCreatorOptions=
+
+# This is used externally, but only by the IDE builds, so we can
+# reference environment variables which aren't defined in the batch
+# build process.
+
+ProjectCreatorIDEOptions = \
+        -useToGeneratePch  java.cpp \
+        -disablePch        os_windows.cpp \
+        -disablePch        os_windows_$(Platform_arch).cpp \
+        -disablePch        osThread_windows.cpp \
+        -disablePch        bytecodeInterpreter.cpp \
+        -disablePch        bytecodeInterpreterWithChecks.cpp \
+        -disablePch        getThread_windows_$(Platform_arch).cpp \
+        -disablePch_compiler2     opcodes.cpp    
+
+# Common options for the IDE builds for core, c1, and c2
+ProjectCreatorIDEOptions=\
+        $(ProjectCreatorIDEOptions) \
+        -sourceBase $(HOTSPOTWORKSPACE) \
+        -buildBase $(HOTSPOTBUILDSPACE)\%f\%b \
+        -startAt src \
+        -compiler $(VcVersion) \
+        -projectFileName $(HOTSPOTBUILDROOT)\$(ProjectFile) \
+        -jdkTargetRoot $(HOTSPOTJDKDIST) \
+        -define ALIGN_STACK_FRAMES \
+        -define VM_LITTLE_ENDIAN \
+        -prelink  "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b	set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME)	$(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LINK_VER)" \
+        -postbuild "" "Building hotspot.exe..." "cd $(HOTSPOTBUILDSPACE)\%f\%b	set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME)	nmake -f $(HOTSPOTWORKSPACE)\make\windows\projectfiles\common\Makefile LOCAL_MAKE=$(HOTSPOTBUILDSPACE)\%f\local.make JAVA_HOME=$(HOTSPOTJDKDIST) launcher" \
+        -ignoreFile jsig.c \
+        -ignoreFile jvmtiEnvRecommended.cpp \
+        -ignoreFile jvmtiEnvStub.cpp \
+        -ignoreFile globalDefinitions_gcc.hpp \
+        -ignoreFile globalDefinitions_sparcWorks.hpp \
+        -ignoreFile version.rc \
+        -ignoreFile Xusage.txt \
+        -define TARGET_ARCH_x86 \
+        -define TARGET_OS_ARCH_windows_x86 \
+        -define TARGET_OS_FAMILY_windows \
+        -define TARGET_COMPILER_visCPP \
+       $(ProjectCreatorIncludesPRIVATE)
+
+# Add in build-specific options
+!if "$(BUILDARCH)" == "i486"
+ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
+        -define IA32 \
+        -ignorePath x86_64 \
+        -define TARGET_ARCH_MODEL_x86_32
+!else
+ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
+        -ignorePath x86_32 \
+        -define TARGET_ARCH_MODEL_x86_64
+!endif
+
+ProjectCreatorIDEOptionsIgnoreCompiler1=\
+ -ignorePath_TARGET c1_
+
+ProjectCreatorIDEOptionsIgnoreCompiler2=\
+ -ignorePath_TARGET src/share/vm/opto \
+ -ignorePath_TARGET src/share/vm/libadt \
+ -ignorePath_TARGET adfiles \
+ -ignoreFile_TARGET bcEscapeAnalyzer.cpp \
+ -ignoreFile_TARGET bcEscapeAnalyzer.hpp \
+ -ignorePath_TARGET chaitin \
+ -ignorePath_TARGET c2_ \
+ -ignorePath_TARGET runtime_ \
+ -ignoreFile_TARGET ciTypeFlow.cpp \
+ -ignoreFile_TARGET ciTypeFlow.hpp \
+ -ignoreFile_TARGET $(Platform_arch_model).ad
+
+##################################################
+# Without compiler(core) specific options
+##################################################
+ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
+$(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=core) \
+$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=core)
+
+##################################################
+# JKERNEL specific options
+##################################################
+ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
+ -define_kernel KERNEL \
+$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=kernel) \
+ -ignorePath_kernel src/share/vm/gc_implementation/parallelScavenge \
+ -ignorePath_kernel src/share/vm/gc_implementation/parNew \
+ -ignorePath_kernel src/share/vm/gc_implementation/concurrentMarkSweep \
+ -ignorePath_kernel src/share/vm/gc_implementation/g1 \
+ -ignoreFile_kernel attachListener.cpp \
+ -ignoreFile_kernel attachListener_windows.cpp \
+ -ignoreFile_kernel dump.cpp \
+ -ignoreFile_kernel dump_$(Platform_arch_model).cpp \
+ -ignoreFile_kernel forte.cpp \
+ -ignoreFile_kernel fprofiler.cpp \
+ -ignoreFile_kernel heapDumper.cpp \
+ -ignoreFile_kernel heapInspection.cpp \
+ -ignoreFile_kernel jniCheck.cpp \
+ -ignoreFile_kernel jvmtiCodeBlobEvents.cpp \
+ -ignoreFile_kernel jvmtiExtensions.cpp \
+ -ignoreFile_kernel jvmtiImpl.cpp \
+ -ignoreFile_kernel jvmtiRawMonitor.cpp \
+ -ignoreFile_kernel jvmtiTagMap.cpp \
+ -ignoreFile_kernel jvmtiTrace.cpp \
+ -ignoreFile_kernel jvmtiTrace.hpp \
+ -ignoreFile_kernel restore.cpp \
+ -ignoreFile_kernel serialize.cpp \
+ -ignoreFile_kernel vmStructs.cpp \
+ -ignoreFile_kernel g1MemoryPool.cpp \
+ -ignoreFile_kernel g1MemoryPool.hpp \
+ -ignoreFile_kernel psMemoryPool.cpp \
+ -ignoreFile_kernel psMemoryPool.hpp \
+ -ignoreFile_kernel gcAdaptivePolicyCounters.cpp \
+ -ignoreFile_kernel concurrentGCThread.cpp \
+ -ignoreFile_kernel mutableNUMASpace.cpp \
+ -ignoreFile_kernel ciTypeFlow.cpp \
+ -ignoreFile_kernel ciTypeFlow.hpp \
+ -ignoreFile_kernel oop.pcgc.inline.hpp \
+ -ignoreFile_kernel oop.psgc.inline.hpp \
+ -ignoreFile_kernel allocationStats.cpp \
+ -ignoreFile_kernel allocationStats.hpp \
+ -ignoreFile_kernel concurrentGCThread.hpp \
+ -ignoreFile_kernel gSpaceCounters.cpp \
+ -ignoreFile_kernel gSpaceCounters.hpp \
+ -ignoreFile_kernel gcAdaptivePolicyCounters.hpp \
+ -ignoreFile_kernel immutableSpace.cpp \
+ -ignoreFile_kernel mutableNUMASpace.hpp \
+ -ignoreFile_kernel mutableSpace.cpp \
+ -ignoreFile_kernel spaceCounters.cpp \
+ -ignoreFile_kernel spaceCounters.hpp \
+ -ignoreFile_kernel yieldingWorkgroup.cpp \
+ -ignoreFile_kernel yieldingWorkgroup.hpp \
+ -ignorePath_kernel vmStructs_ \
+ -ignoreFile_kernel $(Platform_arch_model).ad \
+ -additionalFile_kernel gcTaskManager.hpp
+
+##################################################
+# Client(C1) compiler specific options
+##################################################
+ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
+ -define_compiler1 COMPILER1 \
+$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1)
+
+##################################################
+# Server(C2) compiler specific options
+##################################################
+#NOTE! This list must be kept in sync with GENERATED_NAMES in adlc.make.
+ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
+ -define_compiler2 COMPILER2 \
+ -additionalFile_compiler2 $(Platform_arch_model).ad \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model).cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model).hpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_clone.cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_expand.cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_format.cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_gen.cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_misc.cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_peephole.cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_pipeline.cpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles adGlobals_$(Platform_arch_model).hpp \
+ -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles dfa_$(Platform_arch_model).cpp \
+ $(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=compiler2)
+
+# Add in the jvmti (JSR-163) options
+# NOTE: do not pull in jvmtiEnvRecommended.cpp.  This file is generated
+#       so the programmer can diff it with jvmtiEnv.cpp to be sure the
+#       code merge was done correctly (@see jvmti.make and jvmtiEnvFill.java).
+#       If so, they would then check it in as a new version of jvmtiEnv.cpp.
+ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
+ -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnv.hpp \
+ -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnter.cpp \
+ -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnterTrace.cpp \
+ -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmti.h \
+ -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles bytecodeInterpreterWithChecks.cpp
--- a/make/windows/makefiles/rules.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/rules.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2010, 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
@@ -48,7 +48,7 @@
 JAVAC_FLAGS=-g -encoding ascii
 BOOTSTRAP_JAVAC_FLAGS=$(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
 
-ProjectFile=vm.vcproj
+ProjectFile=jvm.vcproj
 
 !if "$(MSC_VER)" == "1200"
 
@@ -63,6 +63,11 @@
 
 VcVersion=VC9
 
+!elseif "$(MSC_VER)" == "1600"
+
+# for compatibility - we don't yet have a ProjectCreator for VC10
+VcVersion=VC9
+
 !else
 
 VcVersion=VC7
--- a/make/windows/makefiles/sanity.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/sanity.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
--- a/make/windows/makefiles/vm.make	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/makefiles/vm.make	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2010, 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,6 +25,8 @@
 # Resource file containing VERSIONINFO
 Res_Files=.\version.res
 
+!include ..\generated\objfiles.make
+
 !ifdef RELEASE 
 !ifdef DEVELOP
 CPP_FLAGS=$(CPP_FLAGS) /D "DEBUG"
@@ -69,10 +71,7 @@
 CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
 CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_VM_DISTRO=\"$(HOTSPOT_VM_DISTRO)\""
 
-CPP_FLAGS=$(CPP_FLAGS) /D "WIN32" /D "_WINDOWS" $(CPP_INCLUDE_DIRS)
-
-# Must specify this for sharedRuntimeTrig.cpp
-CPP_FLAGS=$(CPP_FLAGS) /D "VM_LITTLE_ENDIAN"
+CPP_FLAGS=$(CPP_FLAGS) $(CPP_INCLUDE_DIRS)
 
 # Define that so jni.h is on correct side
 CPP_FLAGS=$(CPP_FLAGS) /D "_JNI_IMPLEMENTATION_"
@@ -94,6 +93,8 @@
 !endif
 !endif
 
+# If you modify exports below please do the corresponding changes in
+# src/share/tools/ProjectCreator/WinGammaPlatformVC7.java 
 LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
   /export:JNI_GetDefaultJavaVMInitArgs       \
   /export:JNI_CreateJavaVM                   \
@@ -111,37 +112,24 @@
   /export:JVM_InitAgentProperties
 
 CPP_INCLUDE_DIRS=\
-  /I "..\generated"                          \
-  /I "..\generated\jvmtifiles"               \
-  /I "$(WorkSpace)\src\share\vm\c1"          \
-  /I "$(WorkSpace)\src\share\vm\compiler"    \
-  /I "$(WorkSpace)\src\share\vm\code"        \
-  /I "$(WorkSpace)\src\share\vm\interpreter" \
-  /I "$(WorkSpace)\src\share\vm\ci"          \
-  /I "$(WorkSpace)\src\share\vm\classfile"   \
-  /I "$(WorkSpace)\src\share\vm\gc_implementation\parallelScavenge"\
-  /I "$(WorkSpace)\src\share\vm\gc_implementation\shared"\
-  /I "$(WorkSpace)\src\share\vm\gc_implementation\parNew"\
-  /I "$(WorkSpace)\src\share\vm\gc_implementation\concurrentMarkSweep"\
-  /I "$(WorkSpace)\src\share\vm\gc_implementation\g1"\
-  /I "$(WorkSpace)\src\share\vm\gc_interface"\
-  /I "$(WorkSpace)\src\share\vm\asm"         \
-  /I "$(WorkSpace)\src\share\vm\memory"      \
-  /I "$(WorkSpace)\src\share\vm\oops"        \
-  /I "$(WorkSpace)\src\share\vm\prims"       \
-  /I "$(WorkSpace)\src\share\vm\runtime"     \
-  /I "$(WorkSpace)\src\share\vm\services"    \
-  /I "$(WorkSpace)\src\share\vm\utilities"   \
-  /I "$(WorkSpace)\src\share\vm\libadt"      \
-  /I "$(WorkSpace)\src\share\vm\opto"        \
-  /I "$(WorkSpace)\src\os\windows\vm"          \
+  /I "..\generated" \
+  /I "$(WorkSpace)\src\share\vm" \
+  /I "$(WorkSpace)\src\share\vm\prims" \
+  /I "$(WorkSpace)\src\os\windows\vm" \
   /I "$(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm" \
   /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
 
-CPP_USE_PCH=/Fp"vm.pch" /Yu"incls/_precompiled.incl"
+CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
+
+!if "$(USE_PRECOMPILED_HEADER)" != "0"
+CPP_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
+!else
+CPP_USE_PCH=$(CPP_DONT_USE_PCH)
+!endif
 
 # Where to find the source code for the virtual machine
-VM_PATH=../generated/incls
+VM_PATH=../generated
+VM_PATH=$(VM_PATH);../generated/adfiles
 VM_PATH=$(VM_PATH);../generated/jvmtifiles
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/c1
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/compiler
@@ -173,31 +161,31 @@
 # Special case files not using precompiled header files.
 
 c1_RInfo_$(Platform_arch).obj: $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp 
-	 $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
+	 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
 
 os_windows.obj: $(WorkSpace)\src\os\windows\vm\os_windows.cpp
-        $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp
 
 os_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
-        $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
 
 osThread_windows.obj: $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
-        $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
 
 conditionVar_windows.obj: $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
-        $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
 
 getThread_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
-        $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
 
 opcodes.obj: $(WorkSpace)\src\share\vm\opto\opcodes.cpp
-        $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp
 
 bytecodeInterpreter.obj: $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
-        $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
 
 bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
-        $(CPP) $(CPP_FLAGS) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
+        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
 
 # Default rules for the Virtual Machine
 {$(WorkSpace)\src\share\vm\c1}.cpp.obj::
@@ -280,11 +268,14 @@
 {..\generated\incls}.cpp.obj::
         $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
 
+{..\generated\adfiles}.cpp.obj::
+        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
+
 {..\generated\jvmtifiles}.cpp.obj::
         $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
 
 default::
 
 _build_pch_file.obj:
-        @echo #include "incls/_precompiled.incl" > ../generated/_build_pch_file.cpp
-        $(CPP) $(CPP_FLAGS) /Fp"vm.pch" /Yc"incls/_precompiled.incl" /c ../generated/_build_pch_file.cpp
+        @echo #include "precompiled.hpp" > ../generated/_build_pch_file.cpp
+        $(CPP) $(CPP_FLAGS) /Fp"vm.pch" /Yc"precompiled.hpp" /c ../generated/_build_pch_file.cpp
--- a/make/windows/projectfiles/common/Makefile	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/common/Makefile	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -22,6 +22,11 @@
 #  
 #
 
+!ifdef LOCAL_MAKE
+!include $(LOCAL_MAKE)
+!endif
+
+
 WorkSpace=$(HOTSPOTWORKSPACE)
 
 !ifdef ALT_BOOTDIR
@@ -32,74 +37,39 @@
 !else
 !ifdef JAVA_HOME
 BootStrapDir=$(JAVA_HOME)
+!else
+!ifdef HOTSPOTJDKDIST
+BootStrapDir=$(HOTSPOTJDKDIST)
+!endif
 !endif
 !endif
 !endif
 
-!include $(HOTSPOTWORKSPACE)/make/windows/makefiles/makedeps.make
+
+
+!include $(HOTSPOTWORKSPACE)/make/windows/makefiles/projectcreator.make
+!include $(WorkSpace)/make/windows/makefiles/compile.make
 
 # Pick up rules for building JVMTI (JSR-163)
-JvmtiOutDir=$(HOTSPOTBUILDSPACE)\jvmtifiles
+JvmtiOutDir=$(HOTSPOTBUILDSPACE)\$(Variant)\generated\jvmtifiles
 !include $(HOTSPOTWORKSPACE)/make/windows/makefiles/jvmti.make
 
 Platform=$(HOTSPOTWORKSPACE)/make/windows/platform_$(BUILDARCH)
 
-default:: $(AdditionalTargets) $(JvmtiGeneratedFiles)
-
-IncludeDBs_base=$(HOTSPOTWORKSPACE)/src/share/vm/includeDB_core  \
-                $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_jvmti \
-                $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_gc    \
-                $(HOTSPOTWORKSPACE)/src/share/vm/gc_implementation/includeDB_gc_serial
-
-# Parallel gc files
-IncludeDBs_gc=$(HOTSPOTWORKSPACE)/src/share/vm/includeDB_gc_parallel       \
-    $(HOTSPOTWORKSPACE)/src/share/vm/gc_implementation/includeDB_gc_shared \
-    $(HOTSPOTWORKSPACE)/src/share/vm/gc_implementation/includeDB_gc_parNew \
-    $(HOTSPOTWORKSPACE)/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge \
-    $(HOTSPOTWORKSPACE)/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep \
-    $(HOTSPOTWORKSPACE)/src/share/vm/gc_implementation/includeDB_gc_g1
-
-
-IncludeDBs_kernel =$(IncludeDBs_base) \
-                    $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_compiler1
-
-IncludeDBs_core =$(IncludeDBs_base) $(IncludeDBs_gc) \
-                 $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_features
-
-IncludeDBs_compiler1=$(IncludeDBs_core) \
-                     $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_compiler1
-
-IncludeDBs_compiler2=$(IncludeDBs_core) \
-                    $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_compiler2
-
-IncludeDBs_tiered=$(IncludeDBs_core) \
-                    $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_compiler1 \
-                    $(HOTSPOTWORKSPACE)/src/share/vm/includeDB_compiler2
-
-
-!if "$(Variant)" == "compiler1"
-IncludeDBs = $(IncludeDBs_compiler1)
-!endif
-
 !if "$(Variant)" == "compiler2"
-IncludeDBs = $(IncludeDBs_compiler2)
 # Pick up rules for building adlc
 !include $(HOTSPOTWORKSPACE)/make/windows/makefiles/adlc.make
 !endif
 
 !if "$(Variant)" == "tiered"
-IncludeDBs = $(IncludeDBs_tiered)
 # Pick up rules for building adlc
 !include $(HOTSPOTWORKSPACE)/make/windows/makefiles/adlc.make
 !endif
 
-!if "$(Variant)" == "core"
-IncludeDBs = $(IncludeDBs_core)
-!endif
+HS_INTERNAL_NAME=jvm
+!include $(HOTSPOTWORKSPACE)/make/windows/makefiles/launcher.make
 
-!if "$(Variant)" == "kernel"
-IncludeDBs = $(IncludeDBs_kernel)
-!endif
+default:: $(AdditionalTargets) $(JvmtiGeneratedFiles)
 
 !include $(HOTSPOTWORKSPACE)/make/hotspot_version
 
@@ -108,7 +78,11 @@
 !else
 HOTSPOT_RELEASE_VERSION="$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)"
 !endif
+!if "$(USER_RELEASE_SUFFIX)" != ""
+HOTSPOT_BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = internal-$(USER_RELEASE_SUFFIX)
+!else
 HOTSPOT_BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = internal
+!endif
 !if "$(HOTSPOT_BUILD_VERSION)" != ""
 HOTSPOT_RELEASE_VERSION="$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)"
 !endif
@@ -130,55 +104,22 @@
 !endif
 !endif
 
-MakeDepsIDEOptions =       $(MakeDepsIDEOptions) \
-      -includeDB_kernel    $(HOTSPOTBUILDSPACE)\includeDB_kernel \
-      -includeDB_core      $(HOTSPOTBUILDSPACE)\includeDB_core \
-      -includeDB_compiler1 $(HOTSPOTBUILDSPACE)\includeDB_compiler1 \
-      -includeDB_compiler2 $(HOTSPOTBUILDSPACE)\includeDB_compiler2 \
-      -includeDB_tiered    $(HOTSPOTBUILDSPACE)\includeDB_tiered \
+ProjectCreatorIDEOptions =       $(ProjectCreatorIDEOptions) \
       -platform            $(Platform) \
       -define              HOTSPOT_RELEASE_VERSION=\\\"$(HOTSPOT_RELEASE_VERSION)\\\" \
       -define              JRE_RELEASE_VERSION=\\\"$(JRE_RELEASE_VERSION)\\\" \
       -define              HOTSPOT_VM_DISTRO=\\\"$(HOTSPOT_VM_DISTRO)\\\"
 
-incls:
-	@mkdir incls
-
-includeDB.current $(ProjectFile) Dependencies: local.make $(HOTSPOTBUILDSPACE)/classes/MakeDeps.class \
-                                               $(IncludeDBs) incls
-	@rm -f includeDB $(HOTSPOTBUILDSPACE)\includeDB_kernel \
-                         $(HOTSPOTBUILDSPACE)\includeDB_core \
-                         $(HOTSPOTBUILDSPACE)\includeDB_compiler1 \
-                         $(HOTSPOTBUILDSPACE)\includeDB_compiler2 \
-                         $(HOTSPOTBUILDSPACE)\includeDB_tiered
-	@cat $(IncludeDBs_kernel) > $(HOTSPOTBUILDSPACE)\includeDB_kernel
-	@cat $(IncludeDBs_core) > $(HOTSPOTBUILDSPACE)\includeDB_core
-	@cat $(IncludeDBs_compiler1)   > $(HOTSPOTBUILDSPACE)\includeDB_compiler1
-	@cat $(IncludeDBs_compiler2)   > $(HOTSPOTBUILDSPACE)\includeDB_compiler2
-	@cat $(IncludeDBs_tiered)      > $(HOTSPOTBUILDSPACE)\includeDB_tiered
-	@echo java.cpp jni.h >  includeDB
-	@$(RUN_JAVA) -Djava.class.path=$(HOTSPOTBUILDSPACE)/classes MakeDeps diffs WinGammaPlatform$(VcVersion) \
-                  $(Platform) includeDB.current $(Platform) includeDB $(MakeDepsOptions) $(MakeDepsIDEOptions)
-	@rm -f includeDB.current
-	@cp includeDB includeDB.current
-
-lists: $(HOTSPOTBUILDSPACE)/classes/MakeDeps.class FORCE
-	@if exist incls rmdir /s /q incls
-	@rm -f includeDB
-	@cat $(IncludeDBs) > includeDB
-	@mkdir incls
-	@$(RUN_JAVA) -Djava.class.path=$(HOTSPOTBUILDSPACE)/classes MakeDeps WinGammaPlatform$(VcVersion) \
-                 $(Platform) includeDB $(MakeDepsOptions) $(MakeDepsIDEOptions)
-	@rm -f includeDB.current
-	@cp includeDB includeDB.current
+$(HOTSPOTBUILDROOT)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
+	@$(RUN_JAVA) -Djava.class.path=$(HOTSPOTBUILDSPACE)/classes ProjectCreator WinGammaPlatform$(VcVersion) $(ProjectCreatorIDEOptions)
 
 clean:
-	@rm -rf incls $(HOTSPOTBUILDSPACE)/classes
-	@rm -f includeDB includeDB.current $(ProjectFile) Dependencies
+	@rm -rf $(HOTSPOTBUILDSPACE)/classes
+	@rm -r ../$(ProjectFile)
 
-$(HOTSPOTBUILDSPACE)/classes/MakeDeps.class: $(MakeDepsSources)
+$(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class: $(ProjectCreatorSources)
 	@if exist $(HOTSPOTBUILDSPACE)\classes rmdir /s /q $(HOTSPOTBUILDSPACE)\classes
 	@mkdir $(HOTSPOTBUILDSPACE)\classes
-	@$(COMPILE_JAVAC) -classpath $(HOTSPOTWORKSPACE)\src\share\tools\MakeDeps -d $(HOTSPOTBUILDSPACE)/classes $(MakeDepsSources)
+	@$(COMPILE_JAVAC) -classpath $(HOTSPOTWORKSPACE)\src\share\tools\ProjectCreator -d $(HOTSPOTBUILDSPACE)/classes $(ProjectCreatorSources)
 
 FORCE:
--- a/make/windows/projectfiles/compiler1/Makefile	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/compiler1/Makefile	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, 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
@@ -22,7 +22,6 @@
 #  
 #
 
-Variant=compiler1
-!include local.make
+!include ../local.make
 
 !include $(HOTSPOTWORKSPACE)/make/windows/projectfiles/common/Makefile
--- a/make/windows/projectfiles/compiler1/vm.def	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/compiler1/vm.def	Wed Jan 05 10:06:07 2011 +0000
@@ -2,6 +2,6 @@
 ; This .DEF file is a placeholder for one which is automatically
 ; generated during the build process. See
 ; make\windows\build_vm_def.sh and
-; make\windows\makefiles\makedeps.make (esp. the "-prelink"
+; make\windows\makefiles\projectcreator.make (esp. the "-prelink"
 ; options).
 ;
--- a/make/windows/projectfiles/compiler2/Makefile	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/compiler2/Makefile	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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
@@ -22,8 +22,8 @@
 #  
 #
 
-Variant=compiler2
-!include local.make
-AdditionalTargets=incls/ad_$(Platform_arch_model).cpp incls/dfa_$(Platform_arch_model).cpp
+!include ../local.make
+AdlcOutDir=$(HOTSPOTBUILDSPACE)\$(Variant)\generated\adfiles
+AdditionalTargets=$(AdlcOutDir)\ad_$(Platform_arch_model).cpp $(AdlcOutDir)\dfa_$(Platform_arch_model).cpp
 
 !include $(HOTSPOTWORKSPACE)/make/windows/projectfiles/common/Makefile
--- a/make/windows/projectfiles/compiler2/vm.def	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/compiler2/vm.def	Wed Jan 05 10:06:07 2011 +0000
@@ -2,6 +2,6 @@
 ; This .DEF file is a placeholder for one which is automatically
 ; generated during the build process. See
 ; make\windows\build_vm_def.sh and
-; make\windows\makefiles\makedeps.make (esp. the "-prelink"
+; make\windows\makefiles\projectcreator.make (esp. the "-prelink"
 ; options).
 ;
--- a/make/windows/projectfiles/core/Makefile	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/core/Makefile	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2010, 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
@@ -22,7 +22,6 @@
 #  
 #
 
-Variant=core
-!include local.make
+!include ../local.make
 
 !include $(HOTSPOTWORKSPACE)/make/windows/projectfiles/common/Makefile
--- a/make/windows/projectfiles/core/vm.def	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/core/vm.def	Wed Jan 05 10:06:07 2011 +0000
@@ -2,6 +2,6 @@
 ; This .DEF file is a placeholder for one which is automatically
 ; generated during the build process. See
 ; make\windows\build_vm_def.sh and
-; make\windows\makefiles\makedeps.make (esp. the "-prelink"
+; make\windows\makefiles\projectcreator.make (esp. the "-prelink"
 ; options).
 ;
--- a/make/windows/projectfiles/kernel/Makefile	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/kernel/Makefile	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2010 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
@@ -22,7 +22,6 @@
 #  
 #
 
-Variant=compiler1
-!include local.make
+!include ../local.make
 
 !include $(HOTSPOTWORKSPACE)/make/windows/projectfiles/common/Makefile
--- a/make/windows/projectfiles/kernel/vm.def	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/kernel/vm.def	Wed Jan 05 10:06:07 2011 +0000
@@ -2,6 +2,6 @@
 ; This .DEF file is a placeholder for one which is automatically
 ; generated during the build process. See
 ; make\windows\build_vm_def.sh and
-; make\windows\makefiles\makedeps.make (esp. the "-prelink"
+; make\windows\makefiles\projectcreator.make (esp. the "-prelink"
 ; options).
 ;
--- a/make/windows/projectfiles/tiered/Makefile	Tue Dec 14 13:00:01 2010 +0000
+++ b/make/windows/projectfiles/tiered/Makefile	Wed Jan 05 10:06:07 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2010, 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
@@ -22,8 +22,8 @@
 #  
 #
 
-Variant=tiered
-!include local.make
-AdditionalTargets=incls/ad_$(Platform_arch_model).cpp incls/dfa_$(Platform_arch_model).cpp
+!include ../local.m