Merge
authorminqi
Fri, 31 Jul 2015 07:11:11 +0000
changeset 32076 1c9c9d5945b8
parent 32073 93ee8f24e0a6 (current diff)
parent 32075 a94d2d18e04b (diff)
child 32077 bd3b83ae31b4
Merge
--- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Thu Jul 30 16:23:03 2015 +0000
+++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Fri Jul 31 07:11:11 2015 +0000
@@ -2187,7 +2187,7 @@
 }
 
 void InterpreterMacroAssembler::increment_invocation_counter(Register Rcounters, Register iv_be_count, Register Rtmp_r0) {
-  assert(UseCompiler, "incrementing must be useful");
+  assert(UseCompiler || LogTouchedMethods, "incrementing must be useful");
   Register invocation_count = iv_be_count;
   Register backedge_count   = Rtmp_r0;
   int delta = InvocationCounter::count_increment;
--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp	Thu Jul 30 16:23:03 2015 +0000
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp	Fri Jul 31 07:11:11 2015 +0000
@@ -2314,7 +2314,7 @@
 }
 
 void InterpreterMacroAssembler::increment_invocation_counter( Register Rcounters, Register Rtmp, Register Rtmp2 ) {
-  assert(UseCompiler, "incrementing must be useful");
+  assert(UseCompiler || LogTouchedMethods, "incrementing must be useful");
   assert_different_registers(Rcounters, Rtmp, Rtmp2);
 
   Address inv_counter(Rcounters, MethodCounters::invocation_counter_offset() +
--- a/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java	Thu Jul 30 16:23:03 2015 +0000
+++ b/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java	Fri Jul 31 07:11:11 2015 +0000
@@ -87,6 +87,24 @@
       output.shouldNotContain("TestLogTouchedMethods.methodB:()V");
       output.shouldHaveExitValue(0);
 
+      String[] javaArgs4 = {"-XX:+UnlockDiagnosticVMOptions", "-Xint", "-XX:+LogTouchedMethods", "-XX:+PrintTouchedMethodsAtExit", "-XX:-TieredCompilation", "TestLogTouchedMethods"};
+      pb = ProcessTools.createJavaProcessBuilder(javaArgs4);
+      output = new OutputAnalyzer(pb.start());
+      lines = output.asLines();
+
+      if (lines.size() < 1) {
+        throw new Exception("Empty output");
+      }
+
+      first = lines.get(0);
+      if (!first.equals("# Method::print_touched_methods version 1")) {
+        throw new Exception("First line mismatch");
+      }
+
+      output.shouldContain("TestLogTouchedMethods.methodA:()V");
+      output.shouldNotContain("TestLogTouchedMethods.methodB:()V");
+      output.shouldHaveExitValue(0);
+
       // Test jcmd PrintTouchedMethods VM.print_touched_methods
       String pid = Integer.toString(ProcessTools.getProcessId());
       pb = new ProcessBuilder();