On Tue, 14 Oct 2025 21:34:42 GMT, Leonid Mesnik <[email protected]> wrote:

>> Francesco Andreuzzi has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   summary
>
> test/hotspot/jtreg/serviceability/EarlyDynamicLoad/libEarlyDynamicLoad.c line 
> 38:
> 
>> 36: static void JNICALL VMStartJcmd(jvmtiEnv* jvmti, JNIEnv* env) {
>> 37:     char cmd[256];
>> 38:     snprintf(cmd, sizeof(cmd), "%s %d JVMTI.agent_load some.jar", 
>> getenv("JCMD_PATH"), PID());
> 
> Wouldn't be easier to have single env variable like ATTACH_CMD `.../bin/jcmd 
> 45678 JVMTI.agent_load some.jar` which is completely set by java? So native 
> code is simplified and there are less dependencies.

Also, I'd suggest to convert native part from C to C++. Some examples in the 
test base can be found easily. There is already a number of tests with C based 
native agents. We need to convert them to C++ at some point.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27766#discussion_r2437610532

Reply via email to