src/share/vm/code/codeCache.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/code/codeCache.cpp Thu Jan 9 15:21:03 2014
--- new/src/share/vm/code/codeCache.cpp Thu Jan 9 15:21:03 2014
*** 626,647 ****
--- 626,670 ----
}
if (VerifyDependencies) {
// Turn off dependency tracing while actually testing deps.
NOT_PRODUCT( FlagSetting fs(TraceDependencies, false) );
+
+ ResourceMark rm;
+ // 'signature_buffers' is used to cache already checked dependencies.
+ GrowableArray<DependencySignatureBuffer*>* dep_signature_buffers = new GrowableArray<DependencySignatureBuffer*>();
+
+ // Iterate over live nmethods and check dependencies of all nmethods that are not
+ // marked for deoptimization.
FOR_ALL_ALIVE_NMETHODS(nm) {
! if (!nm->is_marked_for_deoptimization() &&
! nm->check_all_dependencies()) {
! if (!nm->is_marked_for_deoptimization()) {
! for (Dependencies::DepStream deps(nm); deps.next(); ) {
+ // Get dependency signature buffer for a specific dependency type signature
+ DependencySignatureBuffer* buffer = DependencySignatureBuffer::buffer(dep_signature_buffers, deps.type());
+ // A DependencySignature object abstracts a dependency.
+ DependencySignature current_sig(&deps);
+
+ // Check if the current dependency is already checked
+ if (!buffer->contains(¤t_sig)) {
+ // If the dependency has not already been checked, perform the check and add the
+ // current dependency signature to the checked dependency signatures.
+
+ // Check dependency and print out an error if the dependency check fails.
+ if (deps.check_dependency() != NULL) {
ResourceMark rm;
tty->print_cr("Should have been marked for deoptimization:");
changes.print();
nm->print();
nm->print_dependencies();
}
+ // Add dependency signature to checked dependencies
+ buffer->add(¤t_sig);
+ }
+ }
+ }
}
}
#ifndef PRODUCT
dependentCheckTime.stop();
#endif // PRODUCT
return number_of_marked_CodeBlobs;
src/share/vm/code/codeCache.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File