mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-28 16:50:10 +00:00
8379481: Recent JNI methods are missing DTrace probes
Reviewed-by: kbarrett, iklam, jwaters
This commit is contained in:
parent
00c1f4b624
commit
8378d28910
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -366,6 +366,8 @@ provider hotspot_jni {
|
||||
probe IsInstanceOf__return(uintptr_t);
|
||||
probe IsSameObject__entry(void*, void*, void*);
|
||||
probe IsSameObject__return(uintptr_t);
|
||||
probe IsVirtualThread__entry(void*, void*);
|
||||
probe IsVirtualThread__return(uintptr_t);
|
||||
probe MonitorEnter__entry(void*, void*);
|
||||
probe MonitorEnter__return(uint32_t);
|
||||
probe MonitorExit__entry(void*, void*);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2024 Red Hat, Inc.
|
||||
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
@ -3129,16 +3129,21 @@ JNI_END
|
||||
|
||||
|
||||
JNI_ENTRY(jobject, jni_GetModule(JNIEnv* env, jclass clazz))
|
||||
return Modules::get_module(clazz, THREAD);
|
||||
HOTSPOT_JNI_GETMODULE_ENTRY(env, clazz);
|
||||
jobject ret = Modules::get_module(clazz, THREAD);
|
||||
HOTSPOT_JNI_GETMODULE_RETURN(ret);
|
||||
return ret;
|
||||
JNI_END
|
||||
|
||||
JNI_ENTRY(jboolean, jni_IsVirtualThread(JNIEnv* env, jobject obj))
|
||||
HOTSPOT_JNI_ISVIRTUALTHREAD_ENTRY(env, obj);
|
||||
jboolean ret = JNI_FALSE;
|
||||
oop thread_obj = JNIHandles::resolve_external_guard(obj);
|
||||
if (thread_obj != nullptr && thread_obj->is_a(vmClasses::BaseVirtualThread_klass())) {
|
||||
return JNI_TRUE;
|
||||
} else {
|
||||
return JNI_FALSE;
|
||||
ret = JNI_TRUE;
|
||||
}
|
||||
HOTSPOT_JNI_ISVIRTUALTHREAD_RETURN(ret);
|
||||
return ret;
|
||||
JNI_END
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -683,6 +683,10 @@
|
||||
#define HOTSPOT_JNI_GETMETHODID_ENTRY_ENABLED() 0
|
||||
#define HOTSPOT_JNI_GETMETHODID_RETURN(arg0)
|
||||
#define HOTSPOT_JNI_GETMETHODID_RETURN_ENABLED() 0
|
||||
#define HOTSPOT_JNI_GETMODULE_ENTRY(arg0, arg1)
|
||||
#define HOTSPOT_JNI_GETMODULE_ENTRY_ENABLED() 0
|
||||
#define HOTSPOT_JNI_GETMODULE_RETURN(arg0)
|
||||
#define HOTSPOT_JNI_GETMODULE_RETURN_ENABLED() 0
|
||||
#define HOTSPOT_JNI_GETOBJECTARRAYELEMENT_ENTRY(arg0, arg1, arg2)
|
||||
#define HOTSPOT_JNI_GETOBJECTARRAYELEMENT_ENTRY_ENABLED() 0
|
||||
#define HOTSPOT_JNI_GETOBJECTARRAYELEMENT_RETURN(arg0)
|
||||
@ -811,6 +815,10 @@
|
||||
#define HOTSPOT_JNI_ISSAMEOBJECT_ENTRY_ENABLED() 0
|
||||
#define HOTSPOT_JNI_ISSAMEOBJECT_RETURN(arg0)
|
||||
#define HOTSPOT_JNI_ISSAMEOBJECT_RETURN_ENABLED() 0
|
||||
#define HOTSPOT_JNI_ISVIRTUALTHREAD_ENTRY(arg0, arg1)
|
||||
#define HOTSPOT_JNI_ISVIRTUALTHREAD_ENTRY_ENABLED() 0
|
||||
#define HOTSPOT_JNI_ISVIRTUALTHREAD_RETURN(arg0)
|
||||
#define HOTSPOT_JNI_ISVIRTUALTHREAD_RETURN_ENABLED() 0
|
||||
#define HOTSPOT_JNI_MONITORENTER_ENTRY(arg0, arg1)
|
||||
#define HOTSPOT_JNI_MONITORENTER_ENTRY_ENABLED() 0
|
||||
#define HOTSPOT_JNI_MONITORENTER_RETURN(arg0)
|
||||
@ -1080,12 +1088,6 @@
|
||||
#define HOTSPOT_JNI_UNREGISTERNATIVES_RETURN(arg0)
|
||||
#define HOTSPOT_JNI_UNREGISTERNATIVES_RETURN_ENABLED() 0
|
||||
|
||||
/* Modules */
|
||||
#define HOTSPOT_JNI_GETMODULE_ENTRY(arg0, arg1)
|
||||
#define HOTSPOT_JNI_GETMODULE_ENTRY_ENABLED() 0
|
||||
#define HOTSPOT_JNI_GETMODULE_RETURN(arg0)
|
||||
#define HOTSPOT_JNI_GETMODULE_RETURN_ENABLED()
|
||||
|
||||
#else /* !defined(DTRACE_ENABLED) */
|
||||
#error This file should only be included when dtrace is not enabled
|
||||
#endif /* !defined(DTRACE_ENABLED) */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user