1017 NMethodIterator iter;
1018 while(iter.next_alive()) {
1019 iter.method()->clear_inline_caches();
1020 }
1021 }
1022
1023 // Keeps track of time spent for checking dependencies
1024 NOT_PRODUCT(static elapsedTimer dependentCheckTime;)
1025
1026 int CodeCache::mark_for_deoptimization(DepChange& changes) {
1027 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
1028 int number_of_marked_CodeBlobs = 0;
1029
1030 // search the hierarchy looking for nmethods which are affected by the loading of this class
1031
1032 // then search the interfaces this class implements looking for nmethods
1033 // which might be dependent of the fact that an interface only had one
1034 // implementor.
1035 // nmethod::check_all_dependencies works only correctly, if no safepoint
1036 // can happen
1037 No_Safepoint_Verifier nsv;
1038 for (DepChange::ContextStream str(changes, nsv); str.next(); ) {
1039 Klass* d = str.klass();
1040 number_of_marked_CodeBlobs += InstanceKlass::cast(d)->mark_dependent_nmethods(changes);
1041 }
1042
1043 #ifndef PRODUCT
1044 if (VerifyDependencies) {
1045 // Object pointers are used as unique identifiers for dependency arguments. This
1046 // is only possible if no safepoint, i.e., GC occurs during the verification code.
1047 dependentCheckTime.start();
1048 nmethod::check_all_dependencies(changes);
1049 dependentCheckTime.stop();
1050 }
1051 #endif
1052
1053 return number_of_marked_CodeBlobs;
1054 }
1055
1056
1057 #ifdef HOTSWAP
|
1017 NMethodIterator iter;
1018 while(iter.next_alive()) {
1019 iter.method()->clear_inline_caches();
1020 }
1021 }
1022
1023 // Keeps track of time spent for checking dependencies
1024 NOT_PRODUCT(static elapsedTimer dependentCheckTime;)
1025
1026 int CodeCache::mark_for_deoptimization(DepChange& changes) {
1027 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
1028 int number_of_marked_CodeBlobs = 0;
1029
1030 // search the hierarchy looking for nmethods which are affected by the loading of this class
1031
1032 // then search the interfaces this class implements looking for nmethods
1033 // which might be dependent of the fact that an interface only had one
1034 // implementor.
1035 // nmethod::check_all_dependencies works only correctly, if no safepoint
1036 // can happen
1037 NoSafepointVerifier nsv;
1038 for (DepChange::ContextStream str(changes, nsv); str.next(); ) {
1039 Klass* d = str.klass();
1040 number_of_marked_CodeBlobs += InstanceKlass::cast(d)->mark_dependent_nmethods(changes);
1041 }
1042
1043 #ifndef PRODUCT
1044 if (VerifyDependencies) {
1045 // Object pointers are used as unique identifiers for dependency arguments. This
1046 // is only possible if no safepoint, i.e., GC occurs during the verification code.
1047 dependentCheckTime.start();
1048 nmethod::check_all_dependencies(changes);
1049 dependentCheckTime.stop();
1050 }
1051 #endif
1052
1053 return number_of_marked_CodeBlobs;
1054 }
1055
1056
1057 #ifdef HOTSWAP
|