hsdis output from JVMCI
Doug Simon
doug.simon at oracle.com
Thu May 18 09:58:09 UTC 2017
> On 17 May 2017, at 09:37, Yasumasa Suenaga <yasuenag at gmail.com> wrote:
>
> Hi all,
>
> I tried to disassemble JVMCI installed code via hsdis.
> It works but I got duplicate output from hsdis.
>
> How to reproduce:
>
> 1. Clone reproducer from GitHub
> https://github.com/YaSuenag/jdt-2017-examples
>
> 2. Copy some files from hotspot testcase
> Please read README.md in this repository.
>
> 3. Edit Makefile to use hsdis
> - code-injection/Makefile
> - Enable UnlockDiagnosticVMOptions and CompilerDirectivesFile
>
> 4. Deploy hsdis to JDK 9 EA b169
>
> 5. Run reproducer
> $ make JAVA_HOME=/path/to/jdk9 syscall
>
>
> hsdis is called from JVMCIEnv::register_method() and CodeInstaller::install().
> So we get same output from hsdis twice.
> I think we should fix it as following:
>
> -------------------------
> diff -r d6d7e5caf497 src/share/vm/jvmci/jvmciCodeInstaller.cpp
> --- a/src/share/vm/jvmci/jvmciCodeInstaller.cpp Mon May 15 12:20:15 2017 +0200
> +++ b/src/share/vm/jvmci/jvmciCodeInstaller.cpp Tue May 17 16:21:08 2017 +0900
> @@ -623,7 +623,7 @@
> if (nm != NULL && env == NULL) {
> DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, compiler);
> bool printnmethods = directive->PrintAssemblyOption || directive->PrintNMethodsOption;
> - if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) {
> + if (!printnmethods && (PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers)) {
> nm->print_nmethod(printnmethods);
> }
> DirectivesStack::release(directive);
> -------------------------
That looks like a sensible change to me.
-Doug
More information about the hotspot-compiler-dev
mailing list