Skip to content
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

Update documentation for com.ibm.jvm.Dump API #953

Open
chandrams opened this issue Jan 17, 2018 · 3 comments
Open

Update documentation for com.ibm.jvm.Dump API #953

chandrams opened this issue Jan 17, 2018 · 3 comments
Labels

Comments

@chandrams
Copy link
Contributor

chandrams commented Jan 17, 2018

Dump.setDumpOptions() did not work when I passed the below option:
"java:events=throw,filter=java/lang/NullPointerException#DumpTest.main*,range=1..1"

After investigation, I found -Xdump:dynamic has to be specified if throw/catch events are configured through Dump.setDumpOptions() when JIT is ON, whereas this option is not required when we set the above option on command line using -Xdump

Documentation for com.ibm.jvm.Dump API needs to be updated. Also update the user guide as required.

@chandrams
Copy link
Contributor Author

@pshipton @keithc-ca

The OpenJ9DiagnosticsMXBean internally uses Dump.setDumpOptions() to dynamically configure dump options and trigger dumps on a remote application. At present we need to specify -Xdump:dynamic during the application startup for dynamically configuring throw/catch events using Dump.setDumpOptions() to work, which is not good as the application has to be restarted and the whole purpose of dynamic configuration is lost.

Can we enable -Xdump:dynamic option by default when JIT is ON and the user specified throw/catch events using Dump.setDumpOptions() ?

#718

@pshipton
Copy link
Member

pshipton commented Apr 16, 2018

There is a performance penalty for enabling -Xdump:dynamic which is why its not enabled by default. The following hooks are enabled.

J9HOOK_VM_EXCEPTION_THROW
J9HOOK_VM_EXCEPTION_CATCH

@pshipton
Copy link
Member

It appears using -Xdump:dynamic disables aot.

   if ((*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_CATCH) ||
       (*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_THROW))
      {
      self()->setOption(TR_DisableThrowToGoto);
      doAOT = false;
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants