Mercurial > hg > truffle
comparison src/share/vm/opto/escape.cpp @ 20688:f913964f3fde
8066199: C2 escape analysis prevents VM from exiting quickly
Summary: Check for safepoint and block during EA Connection graph construction.
Reviewed-by: roland, vlivanov, shade
author | kvn |
---|---|
date | Tue, 02 Dec 2014 12:24:31 -0800 |
parents | 9e69e8d1c900 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20687:a8ebd6f1b030 | 20688:f913964f3fde |
---|---|
1104 #define SAMPLE_SIZE 4 | 1104 #define SAMPLE_SIZE 4 |
1105 if ((next % SAMPLE_SIZE) == 0) { | 1105 if ((next % SAMPLE_SIZE) == 0) { |
1106 // Each 4 iterations calculate how much time it will take | 1106 // Each 4 iterations calculate how much time it will take |
1107 // to complete graph construction. | 1107 // to complete graph construction. |
1108 time.stop(); | 1108 time.stop(); |
1109 // Poll for requests from shutdown mechanism to quiesce compiler | |
1110 // because Connection graph construction may take long time. | |
1111 CompileBroker::maybe_block(); | |
1109 double stop_time = time.seconds(); | 1112 double stop_time = time.seconds(); |
1110 double time_per_iter = (stop_time - start_time) / (double)SAMPLE_SIZE; | 1113 double time_per_iter = (stop_time - start_time) / (double)SAMPLE_SIZE; |
1111 double time_until_end = time_per_iter * (double)(java_objects_length - next); | 1114 double time_until_end = time_per_iter * (double)(java_objects_length - next); |
1112 if ((start_time + time_until_end) >= EscapeAnalysisTimeout) { | 1115 if ((start_time + time_until_end) >= EscapeAnalysisTimeout) { |
1113 timeout = true; | 1116 timeout = true; |