Skip to content

Commit

Permalink
Use get_method_name + copyright revert in jvmtiThreadState.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pchilano committed Nov 7, 2024
1 parent 5210f0c commit 62b16c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/prims/jvmtiThreadState.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2023, 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,12 @@ void JNICALL VirtualThreadMount(jvmtiEnv* jvmti, ...) {
if (count < verification_count) return;

for (int idx = 0; idx < verification_count; idx++) {
char *methodName = nullptr;

err = jvmti->GetMethodName(frameInfo[idx].method, &methodName, nullptr, nullptr);
check_jvmti_status(jni, err, "event handler: error in JVMTI GetMethodName call");

char* methodName = get_method_name(jvmti, jni, frameInfo[idx].method);
if (strcmp(methodName, expected_methods[idx]) != 0) {
deallocate(jvmti, jni, methodName);
return;
}
deallocate(jvmti, jni, methodName);
}
thread_mount_cnt++;
}
Expand Down Expand Up @@ -98,14 +96,12 @@ void JNICALL VirtualThreadUnmount(jvmtiEnv* jvmti, ...) {
if (count < verification_count) return;

for (int idx = 0; idx < verification_count; idx++) {
char *methodName = nullptr;

err = jvmti->GetMethodName(frameInfo[idx].method, &methodName, nullptr, nullptr);
check_jvmti_status(jni, err, "event handler: error in JVMTI GetMethodName call");

char* methodName = get_method_name(jvmti, jni, frameInfo[idx].method);
if (strcmp(methodName, expected_methods[idx]) != 0) {
deallocate(jvmti, jni, methodName);
return;
}
deallocate(jvmti, jni, methodName);
}
thread_unmount_cnt++;
}
Expand Down

0 comments on commit 62b16c6

Please sign in to comment.