Skip to content

Fix generateSystemDump() to make "J9NO_DUMPS" work - #15122

Merged
keithc-ca merged 1 commit into
eclipse-openj9:masterfrom
knn-k:gphandle_nodump
May 27, 2022
Merged

Fix generateSystemDump() to make "J9NO_DUMPS" work#15122
keithc-ca merged 1 commit into
eclipse-openj9:masterfrom
knn-k:gphandle_nodump

Conversation

@knn-k

@knn-k knn-k commented May 26, 2022

Copy link
Copy Markdown
Contributor

This commit fixes the check for the return code of j9sysinfo_get_env()
so that the environment variable "J9NO_DUMPS" work as expected when
"-Xdump:none" is specified.

Signed-off-by: KONNO Kazuhiro konno@jp.ibm.com

@knn-k knn-k added the comp:vm label May 26, 2022
@knn-k

knn-k commented May 26, 2022

Copy link
Copy Markdown
Contributor Author

getEnvForDumpReturnCode can never be 0, and generateSystemDump() always call j9dump_create() regardless of "J9NO_DUMPS" in the original code.

  • j9sysinfo_get_env() returns -1 when it fails to find the environment variable.
  • It is a positive value (string length + 1) when "J9NO_DUMPS" is set, because 0 is specified as the buffer size here.

@knn-k

knn-k commented May 26, 2022

Copy link
Copy Markdown
Contributor Author

Jenkins test sanity xlinux jdk11

@pshipton
pshipton requested a review from keithc-ca May 26, 2022 13:07
Comment thread runtime/vm/gphandle.c Outdated
This commit fixes the check for the return code of j9sysinfo_get_env()
so that the environment variable "J9NO_DUMPS" work as expected when
"-Xdump:none" is specified.

Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
@knn-k
knn-k force-pushed the gphandle_nodump branch from ebef7bb to c7008dd Compare May 26, 2022 23:20
@knn-k

knn-k commented May 26, 2022

Copy link
Copy Markdown
Contributor Author

Jenkins test sanity xlinux jdk11

@keithc-ca
keithc-ca merged commit 0b75297 into eclipse-openj9:master May 27, 2022
@knn-k
knn-k deleted the gphandle_nodump branch May 27, 2022 11:36
knn-k added a commit to knn-k/openj9 that referenced this pull request Jun 1, 2022
This commit fixes the check for the return code of j9sysinfo_get_env()
so that the environment variable "J9NO_DUMPS" work as expected when
"-Xdump:none" is specified.

Original PR in master: eclipse-openj9#15122

Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants