Mercurial > hg > truffle
comparison src/share/vm/runtime/safepoint.cpp @ 1003:528d98fe1037
6880029: JDK 1.6.0_u14p Application crashed very early
Reviewed-by: never, ysr, acorn
author | xlu |
---|---|
date | Thu, 24 Sep 2009 12:10:46 -0700 |
parents | 87770dcf831b |
children | 4b0f2f4918ed |
comparison
equal
deleted
inserted
replaced
979:87770dcf831b | 1003:528d98fe1037 |
---|---|
78 | 78 |
79 // Save the starting time, so that it can be compared to see if this has taken | 79 // Save the starting time, so that it can be compared to see if this has taken |
80 // too long to complete. | 80 // too long to complete. |
81 jlong safepoint_limit_time; | 81 jlong safepoint_limit_time; |
82 timeout_error_printed = false; | 82 timeout_error_printed = false; |
83 | |
84 // PrintSafepointStatisticsTimeout can be specified separately. When | |
85 // specified, PrintSafepointStatistics will be set to true in | |
86 // deferred_initialize_stat method. The initialization has to be done | |
87 // early enough to avoid any races. See bug 6880029 for details. | |
88 if (PrintSafepointStatistics || PrintSafepointStatisticsTimeout > 0) { | |
89 deferred_initialize_stat(); | |
90 } | |
83 | 91 |
84 // Begin the process of bringing the system to a safepoint. | 92 // Begin the process of bringing the system to a safepoint. |
85 // Java threads can be in several different states and are | 93 // Java threads can be in several different states and are |
86 // stopped by different mechanisms: | 94 // stopped by different mechanisms: |
87 // | 95 // |
167 } | 175 } |
168 if (TraceSafepoint && Verbose) cur_state->print(); | 176 if (TraceSafepoint && Verbose) cur_state->print(); |
169 } | 177 } |
170 } | 178 } |
171 | 179 |
172 if ( (PrintSafepointStatistics || (PrintSafepointStatisticsTimeout > 0)) | 180 if (PrintSafepointStatistics && iterations == 0) { |
173 && iterations == 0) { | |
174 begin_statistics(nof_threads, still_running); | 181 begin_statistics(nof_threads, still_running); |
175 } | 182 } |
176 | 183 |
177 if (still_running > 0) { | 184 if (still_running > 0) { |
178 // Check for if it takes to long | 185 // Check for if it takes to long |
1024 | 1031 |
1025 init_done = true; | 1032 init_done = true; |
1026 } | 1033 } |
1027 | 1034 |
1028 void SafepointSynchronize::begin_statistics(int nof_threads, int nof_running) { | 1035 void SafepointSynchronize::begin_statistics(int nof_threads, int nof_running) { |
1029 deferred_initialize_stat(); | 1036 assert(init_done, "safepoint statistics array hasn't been initialized"); |
1030 | |
1031 SafepointStats *spstat = &_safepoint_stats[_cur_stat_index]; | 1037 SafepointStats *spstat = &_safepoint_stats[_cur_stat_index]; |
1032 | 1038 |
1033 VM_Operation *op = VMThread::vm_operation(); | 1039 VM_Operation *op = VMThread::vm_operation(); |
1034 spstat->_vmop_type = (op != NULL ? op->type() : -1); | 1040 spstat->_vmop_type = (op != NULL ? op->type() : -1); |
1035 if (op != NULL) { | 1041 if (op != NULL) { |