changeset 52075:34d163468b3b cont

ptestlevels
author rpressler
date Mon, 15 Oct 2018 13:53:01 +0100
parents c1e0b34f98c1
children 879c331eb873
files microbenchmarks/loom/run_perf.sh microbenchmarks/loom/src/main/java/org/openjdk/benchmarks/cont/OneShot.java src/hotspot/share/runtime/continuation.cpp src/hotspot/share/runtime/continuation.hpp
diffstat 4 files changed, 18 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/microbenchmarks/loom/run_perf.sh	Fri Oct 12 16:46:01 2018 +0100
+++ b/microbenchmarks/loom/run_perf.sh	Mon Oct 15 13:53:01 2018 +0100
@@ -1,28 +1,23 @@
 #!/bin/bash
 
-declare -a arr=("5" "10" "15" "20" "25" "30")
+perflevels=(5 10 15 20 25 30)
 
-PATH=$1
+benchmarks='yield$'
+params=(-p stackDepth=5 -p paramCount=3)
+
+iter=20
+forks=2
+file=jmh.out
+
+JDK=$1
 OPTIONS=${@:2}
 
-iter=20
+for perf in "${perflevels[@]}"; do
+	echo
+	echo "======================================================"
+	echo "perf=$perf OPTIONS=$OPTIONS"
+	echo "------------------------------------------------------"
+	echo
 
-for perf in "${arr[@]}"; do
-	COUNTER=0
-	while [  $COUNTER -lt 2 ]; do
-		echo
-		echo "======================================================"
-		echo "perf=$perf OPTIONS=$OPTIONS"
-		echo "------------------------------------------------------"
-		echo
-
-		$PATH/jdk/bin/java -XX:+UseParallelGC -XX:+UnlockDiagnosticVMOptions $OPTIONS -XX:ContPerfTest=$perf -jar target/benchmarks.jar 'yield$' -foe true -i $iter -p stackDepth=5 -p paramCount=3
-
-		echo
-		echo "perf=$perf"
-		echo "------------------------------------------------------"
-		echo
-
-		let COUNTER=COUNTER+1 
-	done
+	$JDK/jdk/bin/java --add-opens java.base/java.io=ALL-UNNAMED -XX:+UseParallelGC -XX:+UnlockDiagnosticVMOptions $OPTIONS -XX:ContPerfTest=$perf -jar target/benchmarks.jar $benchmarks -foe true -f $forks -i $iter -v SILENT -rf text -rff $file ${params[@]} && cat $file
 done
--- a/microbenchmarks/loom/src/main/java/org/openjdk/benchmarks/cont/OneShot.java	Fri Oct 12 16:46:01 2018 +0100
+++ b/microbenchmarks/loom/src/main/java/org/openjdk/benchmarks/cont/OneShot.java	Mon Oct 15 13:53:01 2018 +0100
@@ -180,7 +180,7 @@
 
     @Setup(Level.Iteration)
     public void setup() {
-        System.out.println("pc = " + paramCount + " sd = " + stackDepth);
+        // System.out.println("pc = " + paramCount + " sd = " + stackDepth);
         cont = Yielder.continuation(paramCount, stackDepth, true);
     }
 
--- a/src/hotspot/share/runtime/continuation.cpp	Fri Oct 12 16:46:01 2018 +0100
+++ b/src/hotspot/share/runtime/continuation.cpp	Mon Oct 15 13:53:01 2018 +0100
@@ -2795,10 +2795,6 @@
   return pc;
 }
 
-bool Continuation::is_return_barrier_entry(address pc) {
-  return pc == StubRoutines::cont_returnBarrier();
-}
-
 address Continuation::fix_continuation_bottom_sender(const frame* callee, RegisterMap* map, address pc) {
   return (map->thread() != NULL && is_return_barrier_entry(pc)) ? get_entry_pc_past_barrier(map->thread(), *callee) : pc;
 }
--- a/src/hotspot/share/runtime/continuation.hpp	Fri Oct 12 16:46:01 2018 +0100
+++ b/src/hotspot/share/runtime/continuation.hpp	Mon Oct 15 13:53:01 2018 +0100
@@ -61,7 +61,7 @@
 
   static bool is_continuation_entry_frame(const frame& f, const RegisterMap* map);
   static bool is_cont_bottom_frame(const frame& f);
-  static bool is_return_barrier_entry(const address pc);
+  static bool is_return_barrier_entry(const address pc) { return pc == StubRoutines::cont_returnBarrier(); }
   static bool is_frame_in_continuation(JavaThread* thread, const frame& f);
   static address fix_continuation_bottom_sender(const frame* callee, RegisterMap* map, address pc);