void StackWatermarkSet::before_unwind(JavaThread* jt) {
verify_processing_context();
assert(jt->has_last_Java_frame(), "must have a Java frame"); for (StackWatermark* current = head(jt); current != NULL; current = current->next()) {
current->before_unwind();
}
SafepointMechanism::update_poll_values(jt);
}
void StackWatermarkSet::after_unwind(JavaThread* jt) {
verify_processing_context();
assert(jt->has_last_Java_frame(), "must have a Java frame"); for (StackWatermark* current = head(jt); current != NULL; current = current->next()) {
current->after_unwind();
}
SafepointMechanism::update_poll_values(jt);
}
void StackWatermarkSet::on_iteration(JavaThread* jt, const frame& fr) { if (VMError::is_error_reported()) { // Don't perform barrier when error reporting walks the stack. return;
}
verify_processing_context(); for (StackWatermark* current = head(jt); current != NULL; current = current->next()) {
current->on_iteration(fr);
} // We don't call SafepointMechanism::update_poll_values here, because the thread // calling this might not be Thread::current().
}
void StackWatermarkSet::start_processing(JavaThread* jt, StackWatermarkKind kind) {
verify_processing_context();
assert(!jt->is_terminated(), "Poll after termination is a bug");
StackWatermark* watermark = get(jt, kind); if (watermark != NULL) {
watermark->start_processing();
} // We don't call SafepointMechanism::update_poll_values here, because the thread // calling this might not be Thread::current(). The thread the stack belongs to // will always update the poll values when waking up from a safepoint.
}
bool StackWatermarkSet::processing_started(JavaThread* jt) { for (StackWatermark* current = head(jt); current != NULL; current = current->next()) { if (!current->processing_started()) { returnfalse;
}
} returntrue;
}
void StackWatermarkSet::finish_processing(JavaThread* jt, void* context, StackWatermarkKind kind) {
StackWatermark* watermark = get(jt, kind); if (watermark != NULL) {
watermark->finish_processing(context);
} // We don't call SafepointMechanism::update_poll_values here, because the thread // calling this might not be Thread::current().
}
uintptr_t StackWatermarkSet::lowest_watermark(JavaThread* jt) {
uintptr_t max_watermark = uintptr_t(0) - 1;
uintptr_t watermark = max_watermark; for (StackWatermark* current = head(jt); current != NULL; current = current->next()) {
watermark = MIN2(watermark, current->watermark());
} if (watermark == max_watermark) { return0;
} else { return watermark;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.