On Thu, 23 Mar 2023 22:24:45 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/libToggleNotifyJvmtiTest.cpp > line 77: > >> 75: >> 76: err = jvmti->AddCapabilities(&caps); >> 77: if (err != JVMTI_ERROR_NONE) { > > Can you use check_jvmti_status to ensure that result is not error? No, the `check_jvmti_status` needs a `JNIEnv*` which is not available in the context of `Agent_OnLoad`. > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/libToggleNotifyJvmtiTest.cpp > line 82: > >> 80: } >> 81: err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, >> JVMTI_EVENT_VIRTUAL_THREAD_START, NULL); >> 82: if (err != JVMTI_ERROR_NONE) { > > 2nd Can you use check_jvmti_status to ensure that result is not error? Please, see above. > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/libToggleNotifyJvmtiTest.cpp > line 89: > >> 87: LOG("Agent init: can_support_virtual_threads capability: %d\n", >> caps.can_support_virtual_threads); >> 88: >> 89: err = jvmti->SetEventCallbacks(&callbacks, (jint)sizeof(callbacks)); > > 3rd Can you use check_jvmti_status to ensure that result is not error? Please, see above. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1147069349 PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1147069479 PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1147069520