mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8221477: Inject os/cpu-specific constants into Unsafe from JVM
Initialize Unsafe os/cpu-specific constants using injection instead of native callouts Reviewed-by: stuefe, coleenp, dholmes, plevart
This commit is contained in:
parent
7a093bcf50
commit
71164a973b
9 changed files with 190 additions and 52 deletions
|
@ -81,6 +81,7 @@
|
|||
f(java_lang_StackFrameInfo) \
|
||||
f(java_lang_LiveStackFrameInfo) \
|
||||
f(java_util_concurrent_locks_AbstractOwnableSynchronizer) \
|
||||
f(jdk_internal_misc_UnsafeConstants) \
|
||||
//end
|
||||
|
||||
#define BASIC_JAVA_CLASSES_DO(f) \
|
||||
|
@ -1483,6 +1484,15 @@ class java_util_concurrent_locks_AbstractOwnableSynchronizer : AllStatic {
|
|||
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
// Interface to jdk.internal.misc.UnsafeConsants
|
||||
|
||||
class jdk_internal_misc_UnsafeConstants : AllStatic {
|
||||
public:
|
||||
static void set_unsafe_constants();
|
||||
static void compute_offsets() { }
|
||||
static void serialize_offsets(SerializeClosure* f) { }
|
||||
};
|
||||
|
||||
// Use to declare fields that need to be injected into Java classes
|
||||
// for the JVM to use. The name_index and signature_index are
|
||||
// declared in vmSymbols. The may_be_java flag is used to declare
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue