Merge
authorminqi
Fri, 30 Jan 2015 10:52:25 -0800
changeset 28742 e6ec6ed5be00
parent 28741 1f10b1bd612d (current diff)
parent 28730 106944a21769 (diff)
child 28743 a9eac944c97d
Merge
hotspot/make/linux/makefiles/build_vm_def.sh
--- a/hotspot/make/linux/makefiles/build_vm_def.sh	Thu Jan 29 03:11:01 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# If we're cross compiling use that path for nm
-if [ "$CROSS_COMPILE_ARCH" != "" ]; then 
-NM=$ALT_COMPILER_PATH/nm
-else
-NM=nm
-fi
-
-$NM --defined-only $* \
-    | awk '{
-              if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
-              if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
-              if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
-          }' \
-    | sort -u
--- a/hotspot/make/linux/makefiles/vm.make	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/make/linux/makefiles/vm.make	Fri Jan 30 10:52:25 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2015, 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
@@ -239,8 +239,14 @@
 	rm -f $@
 	cat $^ > $@
 
+VMDEF_PAT  = ^_ZTV
+VMDEF_PAT := ^gHotSpotVM|$(VMDEF_PAT)
+VMDEF_PAT := ^UseSharedSpaces$$|$(VMDEF_PAT)
+VMDEF_PAT := ^_ZN9Arguments17SharedArchivePathE$$|$(VMDEF_PAT)
+
 vm.def: $(Res_Files) $(Obj_Files)
-	sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@
+	$(QUIETLY) $(NM) --defined-only $(Obj_Files) | sort -k3 -u | \
+	awk '$$3 ~ /$(VMDEF_PAT)/ { print "\t" $$3 ";" }' > $@
 
 mapfile_ext:
 	rm -f $@
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Fri Jan 30 10:52:25 2015 -0800
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 1998, 2015, 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
@@ -2996,7 +2996,7 @@
   %}
 
 enc_class enc_String_Equals(o0RegP str1, o1RegP str2, g3RegI cnt, notemp_iRegI result) %{
-    Label Lword_loop, Lpost_word, Lchar, Lchar_loop, Ldone;
+    Label Lchar, Lchar_loop, Ldone;
     MacroAssembler _masm(&cbuf);
 
     Register   str1_reg = reg_to_register_object($str1$$reg);
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Fri Jan 30 10:52:25 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -6194,7 +6194,7 @@
   ShortBranchVerifier sbv(this);
   assert(UseSSE42Intrinsics, "SSE4.2 is required");
 
-  // This method uses pcmpestri inxtruction with bound registers
+  // This method uses pcmpestri instruction with bound registers
   //   inputs:
   //     xmm - substring
   //     rax - substring length (elements count)
@@ -6355,7 +6355,7 @@
   //
   assert(int_cnt2 == -1 || (0 < int_cnt2 && int_cnt2 < 8), "should be != 0");
 
-  // This method uses pcmpestri inxtruction with bound registers
+  // This method uses pcmpestri instruction with bound registers
   //   inputs:
   //     xmm - substring
   //     rax - substring length (elements count)
@@ -6644,7 +6644,6 @@
     // start from first character again because it has aligned address.
     int stride2 = 16;
     int adr_stride  = stride  << scale;
-    int adr_stride2 = stride2 << scale;
 
     assert(result == rax && cnt2 == rdx && cnt1 == rcx, "pcmpestri");
     // rax and rdx are used by pcmpestri as elements counters
@@ -6743,7 +6742,7 @@
     //   inputs:
     //     vec1- substring
     //     rax - negative string length (elements count)
-    //     mem - scaned string
+    //     mem - scanned string
     //     rdx - string length (elements count)
     //     pcmpmask - cmp mode: 11000 (string compare with negated result)
     //               + 00 (unsigned bytes) or  + 01 (unsigned shorts)
--- a/hotspot/src/share/vm/code/codeCache.cpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Fri Jan 30 10:52:25 2015 -0800
@@ -199,15 +199,10 @@
   }
   guarantee(NonProfiledCodeHeapSize + ProfiledCodeHeapSize + NonNMethodCodeHeapSize <= ReservedCodeCacheSize, "Size check");
 
-  // Align reserved sizes of CodeHeaps
-  size_t non_method_size   = ReservedCodeSpace::allocation_align_size_up(NonNMethodCodeHeapSize);
-  size_t profiled_size     = ReservedCodeSpace::allocation_align_size_up(ProfiledCodeHeapSize);
-  size_t non_profiled_size = ReservedCodeSpace::allocation_align_size_up(NonProfiledCodeHeapSize);
-
-  // Compute initial sizes of CodeHeaps
-  size_t init_non_method_size   = MIN2(InitialCodeCacheSize, non_method_size);
-  size_t init_profiled_size     = MIN2(InitialCodeCacheSize, profiled_size);
-  size_t init_non_profiled_size = MIN2(InitialCodeCacheSize, non_profiled_size);
+  // Align CodeHeaps
+  size_t alignment = heap_alignment();
+  size_t non_method_size = align_size_up(NonNMethodCodeHeapSize, alignment);
+  size_t profiled_size   = align_size_down(ProfiledCodeHeapSize, alignment);
 
   // Reserve one continuous chunk of memory for CodeHeaps and split it into
   // parts for the individual heaps. The memory layout looks like this:
@@ -216,18 +211,27 @@
   //      Profiled nmethods
   //         Non-nmethods
   // ---------- low ------------
-  ReservedCodeSpace rs = reserve_heap_memory(non_profiled_size + profiled_size + non_method_size);
+  ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
   ReservedSpace non_method_space    = rs.first_part(non_method_size);
   ReservedSpace rest                = rs.last_part(non_method_size);
   ReservedSpace profiled_space      = rest.first_part(profiled_size);
   ReservedSpace non_profiled_space  = rest.last_part(profiled_size);
 
   // Non-nmethods (stubs, adapters, ...)
-  add_heap(non_method_space, "CodeHeap 'non-nmethods'", init_non_method_size, CodeBlobType::NonNMethod);
+  add_heap(non_method_space, "CodeHeap 'non-nmethods'", CodeBlobType::NonNMethod);
   // Tier 2 and tier 3 (profiled) methods
-  add_heap(profiled_space, "CodeHeap 'profiled nmethods'", init_profiled_size, CodeBlobType::MethodProfiled);
+  add_heap(profiled_space, "CodeHeap 'profiled nmethods'", CodeBlobType::MethodProfiled);
   // Tier 1 and tier 4 (non-profiled) methods and native methods
-  add_heap(non_profiled_space, "CodeHeap 'non-profiled nmethods'", init_non_profiled_size, CodeBlobType::MethodNonProfiled);
+  add_heap(non_profiled_space, "CodeHeap 'non-profiled nmethods'", CodeBlobType::MethodNonProfiled);
+}
+
+size_t CodeCache::heap_alignment() {
+  // If large page support is enabled, align code heaps according to large
+  // page size to make sure that code cache is covered by large pages.
+  const size_t page_size = os::can_execute_large_page_memory() ?
+             os::page_size_for_region_unaligned(ReservedCodeCacheSize, 8) :
+             os::vm_page_size();
+  return MAX2(page_size, (size_t) os::vm_allocation_granularity());
 }
 
 ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
@@ -284,7 +288,7 @@
   return NULL;
 }
 
-void CodeCache::add_heap(ReservedSpace rs, const char* name, size_t size_initial, int code_blob_type) {
+void CodeCache::add_heap(ReservedSpace rs, const char* name, int code_blob_type) {
   // Check if heap is needed
   if (!heap_available(code_blob_type)) {
     return;
@@ -295,8 +299,8 @@
   _heaps->append(heap);
 
   // Reserve Space
+  size_t size_initial = MIN2(InitialCodeCacheSize, rs.size());
   size_initial = round_to(size_initial, os::vm_page_size());
-
   if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) {
     vm_exit_during_initialization("Could not reserve enough space for code cache");
   }
@@ -840,7 +844,7 @@
   } else {
     // Use a single code heap
     ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
-    add_heap(rs, "CodeCache", InitialCodeCacheSize, CodeBlobType::All);
+    add_heap(rs, "CodeCache", CodeBlobType::All);
   }
 
   // Initialize ICache flush mechanism
--- a/hotspot/src/share/vm/code/codeCache.hpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/share/vm/code/codeCache.hpp	Fri Jan 30 10:52:25 2015 -0800
@@ -98,12 +98,13 @@
   // CodeHeap management
   static void initialize_heaps();                             // Initializes the CodeHeaps
   // Creates a new heap with the given name and size, containing CodeBlobs of the given type
-  static void add_heap(ReservedSpace rs, const char* name, size_t size_initial, int code_blob_type);
+  static void add_heap(ReservedSpace rs, const char* name, int code_blob_type);
   static CodeHeap* get_code_heap(const CodeBlob* cb);         // Returns the CodeHeap for the given CodeBlob
   static CodeHeap* get_code_heap(int code_blob_type);         // Returns the CodeHeap for the given CodeBlobType
   // Returns the name of the VM option to set the size of the corresponding CodeHeap
   static const char* get_code_heap_flag_name(int code_blob_type);
   static bool heap_available(int code_blob_type);             // Returns true if an own CodeHeap for the given CodeBlobType is available
+  static size_t heap_alignment();                             // Returns the alignment of the CodeHeaps in bytes
   static ReservedCodeSpace reserve_heap_memory(size_t size);  // Reserves one continuous chunk of memory for the CodeHeaps
 
   // Iteration
--- a/hotspot/src/share/vm/compiler/compilerOracle.cpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/share/vm/compiler/compilerOracle.cpp	Fri Jan 30 10:52:25 2015 -0800
@@ -553,7 +553,8 @@
   int match = MethodMatcher::Exact;
   while (name[0] == '*') {
     match |= MethodMatcher::Suffix;
-    strcpy(name, name + 1);
+    // Copy remaining string plus NUL to the beginning
+    memmove(name, name + 1, strlen(name + 1) + 1);
   }
 
   if (strcmp(name, "*") == 0) return MethodMatcher::Any;
@@ -689,6 +690,13 @@
   return NULL;
 }
 
+int skip_whitespace(char* line) {
+  // Skip any leading spaces
+  int whitespace_read = 0;
+  sscanf(line, "%*[ \t]%n", &whitespace_read);
+  return whitespace_read;
+}
+
 void CompilerOracle::parse_from_line(char* line) {
   if (line[0] == '\0') return;
   if (line[0] == '#')  return;
@@ -755,15 +763,9 @@
 
     line += bytes_read;
 
-    // Skip any leading spaces before signature
-    int whitespace_read = 0;
-    sscanf(line, "%*[ \t]%n", &whitespace_read);
-    if (whitespace_read > 0) {
-      line += whitespace_read;
-    }
-
     // there might be a signature following the method.
     // signatures always begin with ( so match that by hand
+    line += skip_whitespace(line);
     if (1 == sscanf(line, "(%254[[);/" RANGEBASE "]%n", sig + 1, &bytes_read)) {
       sig[0] = '(';
       line += bytes_read;
@@ -786,7 +788,9 @@
       //
       // For future extensions: extend scan_flag_and_value()
       char option[256]; // stores flag for Type (1) and type of Type (2)
-      while (sscanf(line, "%*[ \t]%255[a-zA-Z0-9]%n", option, &bytes_read) == 1) {
+
+      line += skip_whitespace(line);
+      while (sscanf(line, "%255[a-zA-Z0-9]%n", option, &bytes_read) == 1) {
         if (match != NULL && !_quiet) {
           // Print out the last match added
           ttyLocker ttyl;
@@ -816,6 +820,7 @@
           // Type (1) option
           match = add_option_string(c_name, c_match, m_name, m_match, signature, option, true);
         }
+        line += skip_whitespace(line);
       } // while(
     } else {
       match = add_predicate(command, c_name, c_match, m_name, m_match, signature);
--- a/hotspot/src/share/vm/opto/library_call.cpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Fri Jan 30 10:52:25 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, 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
@@ -1351,7 +1351,6 @@
   Node* cache            = __ ConI(cache_i);
   Node* md2              = __ ConI(md2_i);
   Node* lastChar         = __ ConI(target_array->char_at(target_length - 1));
-  Node* targetCount      = __ ConI(target_length);
   Node* targetCountLess1 = __ ConI(target_length - 1);
   Node* targetOffset     = __ ConI(targetOffset_i);
   Node* sourceEnd        = __ SubI(__ AddI(sourceOffset, sourceCount), targetCountLess1);
@@ -1408,8 +1407,6 @@
   Node* arg      = argument(1);
 
   Node* result;
-  // Disable the use of pcmpestri until it can be guaranteed that
-  // the load doesn't cross into the uncommited space.
   if (Matcher::has_match_rule(Op_StrIndexOf) &&
       UseSSE42Intrinsics) {
     // Generate SSE4.2 version of indexOf
@@ -1421,9 +1418,6 @@
       return true;
     }
 
-    ciInstanceKlass* str_klass = env()->String_klass();
-    const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(str_klass);
-
     // Make the merge point
     RegionNode* result_rgn = new RegionNode(4);
     Node*       result_phi = new PhiNode(result_rgn, TypeInt::INT);
--- a/hotspot/src/share/vm/opto/output.cpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/share/vm/opto/output.cpp	Fri Jan 30 10:52:25 2015 -0800
@@ -2475,7 +2475,7 @@
       if( iop == Op_Con ) continue;      // Do not schedule Top
       if( iop == Op_Node &&     // Do not schedule PhiNodes, ProjNodes
           mach->pipeline() == MachNode::pipeline_class() &&
-          !n->is_SpillCopy() )  // Breakpoints, Prolog, etc
+          !n->is_SpillCopy() && !n->is_MachMerge() )  // Breakpoints, Prolog, etc
         continue;
       break;                    // Funny loop structure to be sure...
     }
--- a/hotspot/src/share/vm/opto/postaloc.cpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/share/vm/opto/postaloc.cpp	Fri Jan 30 10:52:25 2015 -0800
@@ -428,6 +428,7 @@
         // Insert the merge node into the block before the first use.
         uint use_index = block->find_node(reg2defuse.at(reg).first_use());
         block->insert_node(merge, use_index++);
+        _cfg.map_node_to_block(merge, block);
 
         // Let the allocator know about the new node, use the same lrg
         _lrg_map.extend(merge->_idx, lrg);
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Fri Jan 30 10:52:25 2015 -0800
@@ -1127,7 +1127,7 @@
 #endif
 
 intx Arguments::scaled_compile_threshold(intx threshold, double scale) {
-  if (scale == 1.0 || scale < 0.0) {
+  if (scale == 1.0 || scale <= 0.0) {
     return threshold;
   } else {
     return (intx)(threshold * scale);
@@ -1143,7 +1143,7 @@
 
   // Check value to avoid calculating log2 of 0.
   if (scale == 0.0) {
-    return 1;
+    return freq_log;
   }
 
   intx scaled_freq = scaled_compile_threshold((intx)1 << freq_log, scale);
@@ -3479,8 +3479,10 @@
     set_mode_flags(_int);
   }
 
-  if ((TieredCompilation && CompileThresholdScaling == 0)
-      || (!TieredCompilation && scaled_compile_threshold(CompileThreshold) == 0)) {
+  // CompileThresholdScaling == 0.0 is same as -Xint: Disable compilation (enable interpreter-only mode),
+  // but like -Xint, leave compilation thresholds unaffected.
+  // With tiered compilation disabled, setting CompileThreshold to 0 disables compilation as well.
+  if ((CompileThresholdScaling == 0.0) || (!TieredCompilation && CompileThreshold == 0)) {
     set_mode_flags(_int);
   }
 
--- a/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java	Fri Jan 30 10:52:25 2015 -0800
@@ -87,6 +87,13 @@
         {
             "-XX:-TieredCompilation",
             "-XX:+PrintFlagsFinal",
+            "-XX:CompileThreshold=1000",
+            "-XX:CompileThresholdScaling=0.0",
+            "-version"
+        },
+        {
+            "-XX:-TieredCompilation",
+            "-XX:+PrintFlagsFinal",
             "-XX:CompileThreshold=0",
             "-XX:CompileThresholdScaling=0.75",
             "-version"
@@ -108,6 +115,11 @@
             "double CompileThresholdScaling                  := 0.750000                            {product}"
         },
         {
+            "intx CompileThreshold                         := 1000                                {pd product}",
+            "double CompileThresholdScaling                  := 0.000000                            {product}",
+            "interpreted mode"
+        },
+        {
             "intx CompileThreshold                         := 0                                   {pd product}",
             "double CompileThresholdScaling                  := 0.750000                            {product}",
             "interpreted mode"
@@ -295,21 +307,21 @@
             "double CompileThresholdScaling                  := 2.000000                            {product}"
         },
         {
-            "intx Tier0BackedgeNotifyFreqLog               := 0                                   {product}",
-            "intx Tier0InvokeNotifyFreqLog                 := 0                                   {product}",
-            "intx Tier23InlineeNotifyFreqLog               := 0                                   {product}",
-            "intx Tier2BackedgeNotifyFreqLog               := 0                                   {product}",
-            "intx Tier2InvokeNotifyFreqLog                 := 0                                   {product}",
-            "intx Tier3BackEdgeThreshold                   := 0                                   {product}",
-            "intx Tier3BackedgeNotifyFreqLog               := 0                                   {product}",
-            "intx Tier3CompileThreshold                    := 0                                   {product}",
-            "intx Tier3InvocationThreshold                 := 0                                   {product}",
-            "intx Tier3InvokeNotifyFreqLog                 := 0                                   {product}",
-            "intx Tier3MinInvocationThreshold              := 0                                   {product}",
-            "intx Tier4BackEdgeThreshold                   := 0                                   {product}",
-            "intx Tier4CompileThreshold                    := 0                                   {product}",
-            "intx Tier4InvocationThreshold                 := 0                                   {product}",
-            "intx Tier4MinInvocationThreshold              := 0                                   {product}",
+            "intx Tier0BackedgeNotifyFreqLog               := 10                                  {product}",
+            "intx Tier0InvokeNotifyFreqLog                 := 7                                   {product}",
+            "intx Tier23InlineeNotifyFreqLog               := 20                                  {product}",
+            "intx Tier2BackedgeNotifyFreqLog               := 14                                  {product}",
+            "intx Tier2InvokeNotifyFreqLog                 := 11                                  {product}",
+            "intx Tier3BackEdgeThreshold                   := 60000                               {product}",
+            "intx Tier3BackedgeNotifyFreqLog               := 13                                  {product}",
+            "intx Tier3CompileThreshold                    := 2000                                {product}",
+            "intx Tier3InvocationThreshold                 := 200                                 {product}",
+            "intx Tier3InvokeNotifyFreqLog                 := 10                                  {product}",
+            "intx Tier3MinInvocationThreshold              := 100                                 {product}",
+            "intx Tier4BackEdgeThreshold                   := 40000                               {product}",
+            "intx Tier4CompileThreshold                    := 15000                               {product}",
+            "intx Tier4InvocationThreshold                 := 5000                                {product}",
+            "intx Tier4MinInvocationThreshold              := 600                                 {product}",
             "double CompileThresholdScaling                  := 0.000000                            {product}",
             "interpreted mode"
         }
--- a/hotspot/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java	Fri Jan 30 10:52:25 2015 -0800
@@ -82,6 +82,9 @@
                 ExitCode.OK,
                 testCaseDescription.getTestOptions(options,
                         CommandLineOptionTest.prepareBooleanFlag(
-                                "PrintCodeCache", printCodeCache)));
+                                "PrintCodeCache", printCodeCache),
+                        // Do not use large pages to avoid large page
+                        // alignment of code heaps affecting their size.
+                        "-XX:-UseLargePages"));
     }
 }
--- a/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java	Fri Jan 30 10:52:25 2015 -0800
@@ -36,7 +36,7 @@
         try {
             // adjust timeout and substract vm init and exit time
             long timeout = Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT);
-            timeout *= 0.9;
+            timeout *= 0.8;
             new TimeLimitedRunner(timeout, 2.0d, this::test).call();
         } catch (Exception e) {
             throw new Error("Exception occurred during test execution", e);
--- a/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java	Fri Jan 30 10:52:25 2015 -0800
@@ -77,7 +77,7 @@
     }
 
     public OverloadCompileQueueTest() {
-        Helper.startInfiniteLoopThread(this::lockUnlock);
+        Helper.startInfiniteLoopThread(this::lockUnlock, 100L);
     }
 
     @Override
@@ -99,8 +99,9 @@
 
     private void lockUnlock() {
         try {
+            int sleep = Helper.RNG.nextInt(MAX_SLEEP);
             Helper.WHITE_BOX.lockCompilation();
-            Thread.sleep(Helper.RNG.nextInt(MAX_SLEEP));
+            Thread.sleep(sleep);
         } catch (InterruptedException e) {
             throw new Error("TESTBUG: lockUnlocker thread was unexpectedly interrupted", e);
         } finally {
--- a/hotspot/test/compiler/oracle/CheckCompileCommandOption.java	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/test/compiler/oracle/CheckCompileCommandOption.java	Fri Jan 30 10:52:25 2015 -0800
@@ -21,12 +21,15 @@
  * questions.
  */
 
+import java.io.PrintWriter;
+import java.io.File;
+
 import com.oracle.java.testlibrary.*;
 
 /*
  * @test CheckCompileCommandOption
- * @bug 8055286 8056964 8059847
- * @summary "Checks parsing of -XX:+CompileCommand=option"
+ * @bug 8055286 8056964 8059847 8069035
+ * @summary "Checks parsing of -XX:CompileCommand=option"
  * @library /testlibrary
  * @run main CheckCompileCommandOption
  */
@@ -45,38 +48,69 @@
     // have the the following types: intx, uintx, bool, ccstr,
     // ccstrlist, and double.
 
+    private static final String[][] FILE_ARGUMENTS = {
+        {
+            "-XX:CompileCommandFile=" + new File(System.getProperty("test.src", "."), "command1.txt"),
+            "-version"
+        },
+        {
+            "-XX:CompileCommandFile=" + new File(System.getProperty("test.src", "."), "command2.txt"),
+            "-version"
+        }
+    };
+
+    private static final String[][] FILE_EXPECTED_OUTPUT = {
+        {
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption1 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption2 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption3 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption4 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption5 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption6 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption7 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption8 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption9 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption10 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption11 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption12 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption13 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption14 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption15 = true",
+            "CompileCommand: option com/oracle/Test.test(I) bool MyBoolOption16 = true"
+        },
+        {
+            "CompileCommand: option Test.test const char* MyListOption = '_foo _bar'",
+            "CompileCommand: option Test.test const char* MyStrOption = '_foo'",
+            "CompileCommand: option Test.test bool MyBoolOption = false",
+            "CompileCommand: option Test.test intx MyIntxOption = -1",
+            "CompileCommand: option Test.test uintx MyUintxOption = 1",
+            "CompileCommand: option Test.test bool MyFlag = true",
+            "CompileCommand: option Test.test double MyDoubleOption = 1.123000"
+        }
+    };
+
     private static final String[][] TYPE_1_ARGUMENTS = {
         {
             "-XX:CompileCommand=option,com/oracle/Test.test,MyBoolOption1",
             "-XX:CompileCommand=option,com/oracle/Test,test,MyBoolOption2",
             "-XX:CompileCommand=option,com.oracle.Test::test,MyBoolOption3",
             "-XX:CompileCommand=option,com/oracle/Test::test,MyBoolOption4",
-            "-version"
-        },
-        {
-            "-XX:CompileCommand=option,com/oracle/Test.test,MyBoolOption1,MyBoolOption2",
-            "-version"
-        },
-        {
-            "-XX:CompileCommand=option,com/oracle/Test,test,MyBoolOption1,MyBoolOption2",
+            "-XX:CompileCommand=option,com/oracle/Test.test,MyBoolOption5,MyBoolOption6",
+            "-XX:CompileCommand=option,com/oracle/Test,test,MyBoolOption7,MyBoolOption8",
             "-version"
         }
     };
 
     private static final String[][] TYPE_1_EXPECTED_OUTPUTS = {
         {
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption1 = true",
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption2 = true",
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption3 = true",
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption4 = true"
-        },
-        {
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption1 = true",
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption2 = true",
-        },
-        {
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption1 = true",
-            "CompilerOracle: option com/oracle/Test.test bool MyBoolOption2 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption1 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption2 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption3 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption4 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption5 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption6 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption7 = true",
+            "CompileCommand: option com/oracle/Test.test bool MyBoolOption8 = true"
         }
     };
 
@@ -88,38 +122,28 @@
             "-XX:CompileCommand=option,Test::test,intx,MyIntxOption,-1",
             "-XX:CompileCommand=option,Test::test,uintx,MyUintxOption,1",
             "-XX:CompileCommand=option,Test::test,MyFlag",
-            "-XX:CompileCommand=option,Test::test,double,MyDoubleOption,1.123",
-            "-version"
-        },
-        {
-            "-XX:CompileCommand=option,Test.test,double,MyDoubleOption,1.123",
-            "-version"
-        },
-        {
-            "-XX:CompileCommand=option,Test::test,bool,MyBoolOption,false,intx,MyIntxOption,-1,uintx,MyUintxOption,1,MyFlag,double,MyDoubleOption,1.123",
+            "-XX:CompileCommand=option,Test::test,double,MyDoubleOption1,1.123",
+            "-XX:CompileCommand=option,Test.test,double,MyDoubleOption2,1.123",
+            "-XX:CompileCommand=option,Test::test,bool,MyBoolOptionX,false,intx,MyIntxOptionX,-1,uintx,MyUintxOptionX,1,MyFlagX,double,MyDoubleOptionX,1.123",
             "-version"
         }
     };
 
     private static final String[][] TYPE_2_EXPECTED_OUTPUTS = {
         {
-            "CompilerOracle: option Test.test const char* MyListOption = '_foo _bar'",
-            "CompilerOracle: option Test.test const char* MyStrOption = '_foo'",
-            "CompilerOracle: option Test.test bool MyBoolOption = false",
-            "CompilerOracle: option Test.test intx MyIntxOption = -1",
-            "CompilerOracle: option Test.test uintx MyUintxOption = 1",
-            "CompilerOracle: option Test.test bool MyFlag = true",
-            "CompilerOracle: option Test.test double MyDoubleOption = 1.123000"
-        },
-        {
-            "CompilerOracle: option Test.test double MyDoubleOption = 1.123000"
-        },
-        {
-            "CompilerOracle: option Test.test bool MyBoolOption = false",
-            "CompilerOracle: option Test.test intx MyIntxOption = -1",
-            "CompilerOracle: option Test.test uintx MyUintxOption = 1",
-            "CompilerOracle: option Test.test bool MyFlag = true",
-            "CompilerOracle: option Test.test double MyDoubleOption = 1.123000",
+            "CompileCommand: option Test.test const char* MyListOption = '_foo _bar'",
+            "CompileCommand: option Test.test const char* MyStrOption = '_foo'",
+            "CompileCommand: option Test.test bool MyBoolOption = false",
+            "CompileCommand: option Test.test intx MyIntxOption = -1",
+            "CompileCommand: option Test.test uintx MyUintxOption = 1",
+            "CompileCommand: option Test.test bool MyFlag = true",
+            "CompileCommand: option Test.test double MyDoubleOption1 = 1.123000",
+            "CompileCommand: option Test.test double MyDoubleOption2 = 1.123000",
+            "CompileCommand: option Test.test bool MyBoolOptionX = false",
+            "CompileCommand: option Test.test intx MyIntxOptionX = -1",
+            "CompileCommand: option Test.test uintx MyUintxOptionX = 1",
+            "CompileCommand: option Test.test bool MyFlagX = true",
+            "CompileCommand: option Test.test double MyDoubleOptionX = 1.123000",
         }
     };
 
@@ -172,7 +196,7 @@
             out.shouldContain(expected_output);
         }
 
-        out.shouldNotContain("CompileCommand: unrecognized line");
+        out.shouldNotContain("CompileCommand: An error occured during parsing");
         out.shouldHaveExitValue(0);
     }
 
@@ -183,7 +207,7 @@
         pb = ProcessTools.createJavaProcessBuilder(arguments);
         out = new OutputAnalyzer(pb.start());
 
-        out.shouldContain("CompileCommand: unrecognized line");
+        out.shouldContain("CompileCommand: An error occured during parsing");
         out.shouldHaveExitValue(0);
     }
 
@@ -212,5 +236,10 @@
         for (String[] arguments: TYPE_2_INVALID_ARGUMENTS) {
             verifyInvalidOption(arguments);
         }
+
+        // Check if commands in command file are parsed correctly
+        for (int i = 0; i < FILE_ARGUMENTS.length; i++) {
+            verifyValidOption(FILE_ARGUMENTS[i], FILE_EXPECTED_OUTPUT[i]);
+        }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/oracle/TestCompileCommand.java	Fri Jan 30 10:52:25 2015 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.PrintWriter;
+import java.io.File;
+
+import com.oracle.java.testlibrary.*;
+
+/*
+ * @test TestCompileCommand
+ * @bug 8069389
+ * @summary "Regression tests of -XX:CompileCommand"
+ * @library /testlibrary
+ * @run main TestCompileCommand
+ */
+
+public class TestCompileCommand {
+
+    private static final String[][] ARGUMENTS = {
+        {
+            "-XX:CompileCommand=print,*01234567890123456789012345678901234567890123456789,*0123456789012345678901234567890123456789",
+            "-version"
+        }
+    };
+
+    private static final String[][] OUTPUTS = {
+        {
+            "print *01234567890123456789012345678901234567890123456789.*0123456789012345678901234567890123456789"
+        }
+    };
+
+    private static void verifyValidOption(String[] arguments, String[] expected_outputs) throws Exception {
+        ProcessBuilder pb;
+        OutputAnalyzer out;
+
+        pb = ProcessTools.createJavaProcessBuilder(arguments);
+        out = new OutputAnalyzer(pb.start());
+
+        for (String expected_output : expected_outputs) {
+            out.shouldContain(expected_output);
+        }
+
+        out.shouldNotContain("CompileCommand: An error occured during parsing");
+        out.shouldHaveExitValue(0);
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (ARGUMENTS.length != OUTPUTS.length) {
+            throw new RuntimeException("Test is set up incorrectly: length of arguments and expected outputs for type (1) options does not match.");
+        }
+
+        // Check if type (1) options are parsed correctly
+        for (int i = 0; i < ARGUMENTS.length; i++) {
+            verifyValidOption(ARGUMENTS[i], OUTPUTS[i]);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/oracle/command1.txt	Fri Jan 30 10:52:25 2015 -0800
@@ -0,0 +1,12 @@
+option,com/oracle/Test.test,MyBoolOption1
+option,com/oracle/Test,test,MyBoolOption2
+option,com.oracle.Test::test,MyBoolOption3
+option,com/oracle/Test::test,MyBoolOption4
+option,com/oracle/Test.test,MyBoolOption5,MyBoolOption6
+option,com/oracle/Test,test,MyBoolOption7,MyBoolOption8
+option,com/oracle/Test.test(I),MyBoolOption9
+option,com/oracle/Test,test,(I),MyBoolOption10
+option,com.oracle.Test::test(I),MyBoolOption11
+option,com/oracle/Test::test(I),MyBoolOption12
+option,com/oracle/Test.test(I),MyBoolOption13,MyBoolOption14
+option,com/oracle/Test,test(I),MyBoolOption15,MyBoolOption16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/oracle/command2.txt	Fri Jan 30 10:52:25 2015 -0800
@@ -0,0 +1,7 @@
+option,Test::test,ccstrlist,MyListOption,_foo,_bar
+option,Test::test,ccstr,MyStrOption,_foo
+option,Test::test,bool,MyBoolOption,false
+option,Test::test,intx,MyIntxOption,-1
+option,Test::test,uintx,MyUintxOption,1
+option,Test::test,MyFlag
+option,Test::test,double,MyDoubleOption,1.123
--- a/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Fri Jan 30 10:52:25 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -119,13 +119,13 @@
             return new String[] { getMethodWithLockName() };
         }
 
-        public void lock(booleab forceAbort) {
+        public void lock(boolean forceAbort) {
             synchronized(monitor) {
                 if (forceAbort) {
                     // We're calling native method in order to force
                     // abort. It's done by explicit xabort call emitted
                     // in SharedRuntime::generate_native_wrapper.
-                    // If an actuall JNI call will be replaced by
+                    // If an actual JNI call will be replaced by
                     // intrinsic - we'll be in trouble, since xabort
                     // will be no longer called and test may fail.
                     UNSAFE.addressSize();
--- a/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java	Thu Jan 29 03:11:01 2015 -0800
+++ b/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java	Fri Jan 30 10:52:25 2015 -0800
@@ -34,7 +34,6 @@
 /*
  * @test
  * @bug 8059624 8064669
- * @ignore 8066998
  * @library /testlibrary /../../test/lib
  * @build ForceNMethodSweepTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
@@ -42,7 +41,7 @@
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  *                   -XX:-TieredCompilation -XX:+WhiteBoxAPI
  *                   -XX:CompileCommand=compileonly,SimpleTestCase$Helper::*
- *                   ForceNMethodSweepTest
+ *                   -XX:-BackgroundCompilation ForceNMethodSweepTest
  * @summary testing of WB::forceNMethodSweep
  */
 public class ForceNMethodSweepTest extends CompilerWhiteBoxTest {