-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8364973: Add JVMTI stress testing mode #26360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
/cc serviceability |
@lmesnik |
Webrevs
|
make/RunTests.gmk
Outdated
# Setup _NT_SYMBOL_PATH on Windows, which points to our pdb files. | ||
ifeq ($(call isTargetOs, windows), true) | ||
ifndef _NT_SYMBOL_PATH | ||
SYMBOL_PATH := $(call PathList, $(sort $(patsubst %/, %, $(dir $(wildcard \ | ||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))))) | ||
export _NT_SYMBOL_PATH := $(subst \\,\, $(call FixPath, \ | ||
$(subst $(DQUOTE),, $(SYMBOL_PATH)))) | ||
$(call LogDebug, Setting _NT_SYMBOL_PATH to $(_NT_SYMBOL_PATH)) | ||
endif | ||
endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened here?
make/RunTests.gmk
Outdated
AGENT := $${LIBRARY_PREFIX}JvmtiStressAgent${SHARED_LIBRARY_SUFFIX}=$${JTREG_JVMTI_STRESS_AGENT} | ||
$1_JTREG_BASIC_OPTIONS += -javaoption:'-agentpath:${TEST_IMAGE_DIR}/hotspot/jtreg/native/$${AGENT}' | ||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \ | ||
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-jvmti-stress-agent.txt) \ | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add the definitions of LIBRARY_PREFIX
and SHARED_LIBRARY_SUFFIX
for this to work in a remote testing situation.
I asked you to not use {}
but ()
when referencing variables in makefiles.
There is no continuation indentation here, please adjust.
@@ -876,6 +877,15 @@ define SetupRunJtregTestBody | |||
)) | |||
endif | |||
|
|||
ifneq ($$(JTREG_JVMTI_STRESS_AGENT), ) | |||
AGENT := $$(LIBRARY_PREFIX)JvmtiStressAgent$$(SHARED_LIBRARY_SUFFIX)=$$(JTREG_JVMTI_STRESS_AGENT) | |||
$1_JTREG_BASIC_OPTIONS += -javaoption:'-agentpath:${TEST_IMAGE_DIR}/hotspot/jtreg/native/$${AGENT}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$1_JTREG_BASIC_OPTIONS += -javaoption:'-agentpath:${TEST_IMAGE_DIR}/hotspot/jtreg/native/$${AGENT}' | |
$1_JTREG_BASIC_OPTIONS += -javaoption:'-agentpath:$(TEST_IMAGE_DIR)/hotspot/jtreg/native/$$(AGENT)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this line looks quite long. Can you check that it does not pass 80 characters? (Can't tell on github reviews...)
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-jvmti-stress-agent.txt) \ | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-jvmti-stress-agent.txt) \ | |
)) | |
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-jvmti-stress-agent.txt) \ | |
)) |
Also, the comment on line length applies here.
* | ||
* Test supports 2 modes: | ||
* - standard, where the agent doesn't require debugging capabilities | ||
* - debug, where the agent additionally test debug-related functionality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* - debug, where the agent additionally test debug-related functionality | |
* - debug, where the agent additionally test debug-related functionality |
* - standard, where the agent doesn't require debugging capabilities | ||
* - debug, where the agent additionally test debug-related functionality | ||
* The debug mode is incompatible with debugger tests and debug jvmti tests. | ||
* The standard mode should be compatible with all tests except probelmlisted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The standard mode should be compatible with all tests except probelmlisted. | |
* The standard mode should be compatible with all tests except problemlisted. |
@@ -876,6 +877,15 @@ define SetupRunJtregTestBody | |||
)) | |||
endif | |||
|
|||
ifneq ($$(JTREG_JVMTI_STRESS_AGENT), ) | |||
AGENT := $$(LIBRARY_PREFIX)JvmtiStressAgent$$(SHARED_LIBRARY_SUFFIX)=$$(JTREG_JVMTI_STRESS_AGENT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the usage scenario here. Are you supposed to run this like make test JTREG=JVMTI_STRESS_AGENT=true
? If so, this will result in -javaoption:'-agentpath:<test-image>/hotspot/jtreg/native/libJvmtiStressAgent.so=true
being sent to jtreg, and that looks sus.
Or how should this be used?
In fact, this option should be described in testing.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a jtreg agent options, I use it like
JTREG_JVMTI_STRESS_AGENT=debugger=false
or
JTREG_JVMTI_STRESS_AGENT=debugger=true,verbose
Any of options enable jvmti agent and parsed by it.
I don't want to add 2 options, for hits. The JTREG_JVMTI_STRESS_AGENT=false doesn't make any sense.
The options are defined by stress agent while makefile just propagate them to the agent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you feedback, I explained the usage of
JTREG_JVMTI_STRESS_AGENT
and applied your changes.
@@ -876,6 +877,15 @@ define SetupRunJtregTestBody | |||
)) | |||
endif | |||
|
|||
ifneq ($$(JTREG_JVMTI_STRESS_AGENT), ) | |||
AGENT := $$(LIBRARY_PREFIX)JvmtiStressAgent$$(SHARED_LIBRARY_SUFFIX)=$$(JTREG_JVMTI_STRESS_AGENT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a jtreg agent options, I use it like
JTREG_JVMTI_STRESS_AGENT=debugger=false
or
JTREG_JVMTI_STRESS_AGENT=debugger=true,verbose
Any of options enable jvmti agent and parsed by it.
I don't want to add 2 options, for hits. The JTREG_JVMTI_STRESS_AGENT=false doesn't make any sense.
The options are defined by stress agent while makefile just propagate them to the agent.
The fix added JVMTI stress testing mode.
This mode enables stress agent that could be executed with jtreg test and help to ensure that jvmti functionality doesn't break the other JVM/JDK functionality.
I filed few issues and more are coming. I want to push the agent so it is possible to provide reproduces for problems uncovered by this agent.
The agent has 2 modes now:
The tests incompatible wiht agent (IR, CDS) and some individual tests from tier1 are excluded. There are not plans to support stable execution of all tests with agent right now. However it provokes some crashes worth to be used for exploratory testing.
Note, that flagless tests are excluded automatically and not executed in this mode.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26360/head:pull/26360
$ git checkout pull/26360
Update a local copy of the PR:
$ git checkout pull/26360
$ git pull https://git.openjdk.org/jdk.git pull/26360/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26360
View PR using the GUI difftool:
$ git pr show -t 26360
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26360.diff
Using Webrev
Link to Webrev Comment