mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8232788: Move biased locking initalization
Reviewed-by: pchilanomate, dholmes
This commit is contained in:
parent
31ab60e211
commit
9308d18580
3 changed files with 18 additions and 21 deletions
|
@ -69,6 +69,7 @@
|
|||
#include "prims/jvmtiThreadState.hpp"
|
||||
#include "prims/methodComparator.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/fieldDescriptor.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/javaCalls.hpp"
|
||||
|
@ -456,6 +457,12 @@ InstanceKlass::InstanceKlass(const ClassFileParser& parser, unsigned kind, Klass
|
|||
if (Arguments::is_dumping_archive()) {
|
||||
SystemDictionaryShared::init_dumptime_info(this);
|
||||
}
|
||||
|
||||
// Set biased locking bit for all instances of this class; it will be
|
||||
// cleared if revocation occurs too often for this type
|
||||
if (UseBiasedLocking && BiasedLocking::enabled()) {
|
||||
set_prototype_header(markWord::biased_locking_prototype());
|
||||
}
|
||||
}
|
||||
|
||||
void InstanceKlass::deallocate_methods(ClassLoaderData* loader_data,
|
||||
|
@ -2408,6 +2415,11 @@ void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handl
|
|||
// --> see ArrayKlass::complete_create_array_klass()
|
||||
array_klasses()->restore_unshareable_info(ClassLoaderData::the_null_class_loader_data(), Handle(), CHECK);
|
||||
}
|
||||
|
||||
// Initialize current biased locking state.
|
||||
if (UseBiasedLocking && BiasedLocking::enabled()) {
|
||||
set_prototype_header(markWord::biased_locking_prototype());
|
||||
}
|
||||
}
|
||||
|
||||
// returns true IFF is_in_error_state() has been changed as a result of this call.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue