mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8268368: Adopt cast notation for JavaThread conversions
Reviewed-by: dholmes, stefank
This commit is contained in:
parent
b6cfca8a89
commit
cd678a383f
64 changed files with 139 additions and 145 deletions
|
@ -112,7 +112,7 @@ private:
|
|||
public:
|
||||
JvmtiThreadEventTransition(Thread *thread) : _rm(), _hm(thread) {
|
||||
if (thread->is_Java_thread()) {
|
||||
_jthread = thread->as_Java_thread();
|
||||
_jthread = JavaThread::cast(thread);
|
||||
_saved_state = _jthread->thread_state();
|
||||
if (_saved_state == _thread_in_Java) {
|
||||
ThreadStateTransition::transition_from_java(_jthread, _thread_in_native);
|
||||
|
@ -2307,7 +2307,7 @@ void JvmtiExport::record_vm_internal_object_allocation(oop obj) {
|
|||
NoSafepointVerifier no_sfpt;
|
||||
// Cannot take safepoint here so do not use state_for to get
|
||||
// jvmti thread state.
|
||||
JvmtiThreadState *state = thread->as_Java_thread()->jvmti_thread_state();
|
||||
JvmtiThreadState *state = JavaThread::cast(thread)->jvmti_thread_state();
|
||||
if (state != NULL) {
|
||||
// state is non NULL when VMObjectAllocEventCollector is enabled.
|
||||
JvmtiVMObjectAllocEventCollector *collector;
|
||||
|
@ -2331,7 +2331,7 @@ void JvmtiExport::record_sampled_internal_object_allocation(oop obj) {
|
|||
NoSafepointVerifier no_sfpt;
|
||||
// Cannot take safepoint here so do not use state_for to get
|
||||
// jvmti thread state.
|
||||
JvmtiThreadState *state = thread->as_Java_thread()->jvmti_thread_state();
|
||||
JvmtiThreadState *state = JavaThread::cast(thread)->jvmti_thread_state();
|
||||
if (state != NULL) {
|
||||
// state is non NULL when SampledObjectAllocEventCollector is enabled.
|
||||
JvmtiSampledObjectAllocEventCollector *collector;
|
||||
|
@ -2867,7 +2867,7 @@ NoJvmtiVMObjectAllocMark::NoJvmtiVMObjectAllocMark() : _collector(NULL) {
|
|||
}
|
||||
Thread* thread = Thread::current_or_null();
|
||||
if (thread != NULL && thread->is_Java_thread()) {
|
||||
JavaThread* current_thread = thread->as_Java_thread();
|
||||
JavaThread* current_thread = JavaThread::cast(thread);
|
||||
JvmtiThreadState *state = current_thread->jvmti_thread_state();
|
||||
if (state != NULL) {
|
||||
JvmtiVMObjectAllocEventCollector *collector;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue