RFR: 6946: There should be an option to build the agent in the build script [v14]

Marcus Hirt hirt at openjdk.java.net
Tue Jan 12 15:50:00 UTC 2021


On Tue, 12 Jan 2021 15:36:38 GMT, Marcus Hirt <hirt at openjdk.org> wrote:

>> Changes requested by hirt (Lead).
>
> Perhaps the text when the agent has been built should be:
> Agent library build complete. You can now run an example with the agent using --runAgentExample, or use the agent with your own applications. See agent/README.md for more information.
> 
> (Is currently: You can run the agent, see agent/README.md)

In the windows batch file, the variables should probably be declared in terms of each other:
set PATH_TO_AGENT_JAR=%cd%\agent\target\org.openjdk.jmc.agent-1.0.0-SNAPSHOT.jar
set PATH_TO_AGENT_TARGET_DIR=%cd%\agent\target

Also, cp is wrong (using = instead of cp delimiter), and path delimiter is wrong for file specifications. Should probably be:
call java --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -XX:+FlightRecorder -javaagent:"%PATH_TO_AGENT_JAR%"="%PATH_TO_AGENT_TARGET_DIR%"/test-classes/org/openjdk/jmc/agent/test/jfrprobes_template.xml -cp "%PATH_TO_AGENT_JAR%"="%PATH_TO_AGENT_TARGET_DIR%"/test-classes/ org.openjdk.jmc.agent.converters.test.InstrumentMeConverter

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

PR: https://git.openjdk.java.net/jmc/pull/183


More information about the jmc-dev mailing list