Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Looks good. I filed https://bugs.openjdk.java.net/browse/JDK-8219394 for this bug. Thanks! /Claes On 2019-02-19 18:04, Erik Joelsson wrote: The problem with the jarfile looks to be a missing $(FIXPATH) when running microbenchmarks. The java process is simply unable to understand cygwin paths. Does this patch solve the issue for you, Jorn? diff -r 7c17199fa37d make/RunTests.gmk --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -690,7 +690,7 @@ $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, \ - $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) -jar $$($1_MICRO_BENCHMARKS_JAR) \ + $$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) -jar $$($1_MICRO_BENCHMARKS_JAR) \ $$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \ $$($1_MICRO_WARMUP_ITER) $$($1_MICRO_WARMUP_TIME) \ $$($1_MICRO_VM_OPTIONS) $$($1_MICRO_BASIC_OPTIONS) $$(MICRO_OPTIONS) \ /Erik On 2019-02-18 14:20, Claes Redestad wrote: http://mail.openjdk.java.net/pipermail/jdk-dev/2019-February/002624.html> Hi, On 2019-02-18 22:34, Jorn Vernee wrote: Hi Claes, 1. Does running make test rather than make test-only work? No. Same error there. Sorry, I tried that first and then re-ran with `test-only`. I also tried with a clean build FWIW. 2. Can you run the benchmarks.jar directly? Yes, this is working, thanks. This way I can also pass extra flags to JMH, which is nice :) --- FWIW, I also had some problems when running configure. 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. 2.) My path to the --with-jmh folder had spaces in it, which was causing an error in make/autoconf/lib-tests.m4 on line 76 [1]. Sounds like a bug. But those both had obvious workarounds. --- I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? Thanks! /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Pushed here: http://hg.openjdk.java.net/jdk/jdk/rev/1b40a0178b2a /Claes On 2019-02-19 22:41, Jorn Vernee wrote: Great! Thanks for picking this up. Jorn
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Thanks, looks good! /Erik On 2019-02-19 10:35, Jorn Vernee wrote: Hi Erik, I have included your suggestions: http://cr.openjdk.java.net/~jvernee/micronative/webrev.01 I'm a committer on project Panama, but I'm not sure if I have write access to jdk/jdk as well. If the new webrev looks good I could give it a try, but otherwise someone else would have to create a commit for me. Thanks, Jorn Erik Joelsson schreef op 2019-02-19 18:13: Hello Jorn, This looks pretty good and should probably be pushed to mainline. Some minor nits. In BuildMicrobenchmark.gmk: Please base MICROBENCHMARK_IMAGE dir on TEST_IMAGE_DIR like in RunTests.gmk. Line 131, please add ", \" plus newline like on 123-124. /Erik On 2019-02-19 03:49, Jorn Vernee wrote: Hi, I've taken a first stab at adding support for native dependencies: http://cr.openjdk.java.net/~jvernee/micronative/webrev.00/ With a small test benchmark: http://cr.openjdk.java.net/~jvernee/micronative_test/webrev.00/ Please be aware that both are based on the Panama/foreign branch [1]. I was not able to find a workaround for my problem with the jar file access unfortunately. So I have been testing by manually running the jar file with the expected arguments (but, that's not really testing the RunTests.gmk changes). It would be great if someone can offer a suggestion for that. The jar file is being created in make/test/BuildMicrobenchmark.gmk using the SetupJarArchive function [2]. The execution of the jar is done by code in RunTests.gmk [3]. I guess these 2 are racing to access the jar, and that is what's causing the error from the subject line. Otherwise, I can't really test this properly, so maybe someone else can take it from here. Cheers, Jorn [1] : http://hg.openjdk.java.net/panama/dev/shortlog/tip [2] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/test/BuildMicrobenchmark.gmk#l98 [3] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/RunTests.gmk#l692 Jorn Vernee schreef op 2019-02-18 23:38: Hi, 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. There seems to be a check for this in make/test/BuildMicrobenchmark.gmk [2]: ``` ifeq ($(JMH_CORE_JAR), ) $(info Error: JMH is missing. Please use configure --with-jmh.) $(error Cannot continue) endif ``` But this does not seem to be triggered. I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? The Panama native test sources are being built by 'make/test/JtregNativeJdk.gmk' I'm not sure it's possible to hook directly into that, but maybe it can serve as an example for adding a similar feature to the benchmark suite. I'll try looking into that. Thanks! Thanks for the help! Jorn [2] : http://hg.openjdk.java.net/jdk/jdk/file/6fb43030a1b4/make/test/BuildMicrobenchmark.gmk#l34 /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Great! Thanks for picking this up. Jorn Claes Redestad schreef op 2019-02-19 22:36: Hi Jorn, I'll sponsor this for jdk/jdk. I'll file a RFE, test it and push it seeing it's already reviewed. Thanks! /Claes On 2019-02-19 19:35, Jorn Vernee wrote: Hi Erik, I have included your suggestions: http://cr.openjdk.java.net/~jvernee/micronative/webrev.01 I'm a committer on project Panama, but I'm not sure if I have write access to jdk/jdk as well. If the new webrev looks good I could give it a try, but otherwise someone else would have to create a commit for me. Thanks, Jorn Erik Joelsson schreef op 2019-02-19 18:13: Hello Jorn, This looks pretty good and should probably be pushed to mainline. Some minor nits. In BuildMicrobenchmark.gmk: Please base MICROBENCHMARK_IMAGE dir on TEST_IMAGE_DIR like in RunTests.gmk. Line 131, please add ", \" plus newline like on 123-124. /Erik On 2019-02-19 03:49, Jorn Vernee wrote: Hi, I've taken a first stab at adding support for native dependencies: http://cr.openjdk.java.net/~jvernee/micronative/webrev.00/ With a small test benchmark: http://cr.openjdk.java.net/~jvernee/micronative_test/webrev.00/ Please be aware that both are based on the Panama/foreign branch [1]. I was not able to find a workaround for my problem with the jar file access unfortunately. So I have been testing by manually running the jar file with the expected arguments (but, that's not really testing the RunTests.gmk changes). It would be great if someone can offer a suggestion for that. The jar file is being created in make/test/BuildMicrobenchmark.gmk using the SetupJarArchive function [2]. The execution of the jar is done by code in RunTests.gmk [3]. I guess these 2 are racing to access the jar, and that is what's causing the error from the subject line. Otherwise, I can't really test this properly, so maybe someone else can take it from here. Cheers, Jorn [1] : http://hg.openjdk.java.net/panama/dev/shortlog/tip [2] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/test/BuildMicrobenchmark.gmk#l98 [3] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/RunTests.gmk#l692 Jorn Vernee schreef op 2019-02-18 23:38: Hi, 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. There seems to be a check for this in make/test/BuildMicrobenchmark.gmk [2]: ``` ifeq ($(JMH_CORE_JAR), ) $(info Error: JMH is missing. Please use configure --with-jmh.) $(error Cannot continue) endif ``` But this does not seem to be triggered. I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? The Panama native test sources are being built by 'make/test/JtregNativeJdk.gmk' I'm not sure it's possible to hook directly into that, but maybe it can serve as an example for adding a similar feature to the benchmark suite. I'll try looking into that. Thanks! Thanks for the help! Jorn [2] : http://hg.openjdk.java.net/jdk/jdk/file/6fb43030a1b4/make/test/BuildMicrobenchmark.gmk#l34 /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Hi Jorn, I'll sponsor this for jdk/jdk. I'll file a RFE, test it and push it seeing it's already reviewed. Thanks! /Claes On 2019-02-19 19:35, Jorn Vernee wrote: Hi Erik, I have included your suggestions: http://cr.openjdk.java.net/~jvernee/micronative/webrev.01 I'm a committer on project Panama, but I'm not sure if I have write access to jdk/jdk as well. If the new webrev looks good I could give it a try, but otherwise someone else would have to create a commit for me. Thanks, Jorn Erik Joelsson schreef op 2019-02-19 18:13: Hello Jorn, This looks pretty good and should probably be pushed to mainline. Some minor nits. In BuildMicrobenchmark.gmk: Please base MICROBENCHMARK_IMAGE dir on TEST_IMAGE_DIR like in RunTests.gmk. Line 131, please add ", \" plus newline like on 123-124. /Erik On 2019-02-19 03:49, Jorn Vernee wrote: Hi, I've taken a first stab at adding support for native dependencies: http://cr.openjdk.java.net/~jvernee/micronative/webrev.00/ With a small test benchmark: http://cr.openjdk.java.net/~jvernee/micronative_test/webrev.00/ Please be aware that both are based on the Panama/foreign branch [1]. I was not able to find a workaround for my problem with the jar file access unfortunately. So I have been testing by manually running the jar file with the expected arguments (but, that's not really testing the RunTests.gmk changes). It would be great if someone can offer a suggestion for that. The jar file is being created in make/test/BuildMicrobenchmark.gmk using the SetupJarArchive function [2]. The execution of the jar is done by code in RunTests.gmk [3]. I guess these 2 are racing to access the jar, and that is what's causing the error from the subject line. Otherwise, I can't really test this properly, so maybe someone else can take it from here. Cheers, Jorn [1] : http://hg.openjdk.java.net/panama/dev/shortlog/tip [2] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/test/BuildMicrobenchmark.gmk#l98 [3] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/RunTests.gmk#l692 Jorn Vernee schreef op 2019-02-18 23:38: Hi, 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. There seems to be a check for this in make/test/BuildMicrobenchmark.gmk [2]: ``` ifeq ($(JMH_CORE_JAR), ) $(info Error: JMH is missing. Please use configure --with-jmh.) $(error Cannot continue) endif ``` But this does not seem to be triggered. I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? The Panama native test sources are being built by 'make/test/JtregNativeJdk.gmk' I'm not sure it's possible to hook directly into that, but maybe it can serve as an example for adding a similar feature to the benchmark suite. I'll try looking into that. Thanks! Thanks for the help! Jorn [2] : http://hg.openjdk.java.net/jdk/jdk/file/6fb43030a1b4/make/test/BuildMicrobenchmark.gmk#l34 /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
On Tue, Feb 19, 2019 at 10:37 AM Jorn Vernee wrote: > > I'm a committer on project Panama, but I'm not sure if I have write > access to jdk/jdk as well. You don't https://openjdk.java.net/census#jvernee
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Hi Erik, I have included your suggestions: http://cr.openjdk.java.net/~jvernee/micronative/webrev.01 I'm a committer on project Panama, but I'm not sure if I have write access to jdk/jdk as well. If the new webrev looks good I could give it a try, but otherwise someone else would have to create a commit for me. Thanks, Jorn Erik Joelsson schreef op 2019-02-19 18:13: Hello Jorn, This looks pretty good and should probably be pushed to mainline. Some minor nits. In BuildMicrobenchmark.gmk: Please base MICROBENCHMARK_IMAGE dir on TEST_IMAGE_DIR like in RunTests.gmk. Line 131, please add ", \" plus newline like on 123-124. /Erik On 2019-02-19 03:49, Jorn Vernee wrote: Hi, I've taken a first stab at adding support for native dependencies: http://cr.openjdk.java.net/~jvernee/micronative/webrev.00/ With a small test benchmark: http://cr.openjdk.java.net/~jvernee/micronative_test/webrev.00/ Please be aware that both are based on the Panama/foreign branch [1]. I was not able to find a workaround for my problem with the jar file access unfortunately. So I have been testing by manually running the jar file with the expected arguments (but, that's not really testing the RunTests.gmk changes). It would be great if someone can offer a suggestion for that. The jar file is being created in make/test/BuildMicrobenchmark.gmk using the SetupJarArchive function [2]. The execution of the jar is done by code in RunTests.gmk [3]. I guess these 2 are racing to access the jar, and that is what's causing the error from the subject line. Otherwise, I can't really test this properly, so maybe someone else can take it from here. Cheers, Jorn [1] : http://hg.openjdk.java.net/panama/dev/shortlog/tip [2] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/test/BuildMicrobenchmark.gmk#l98 [3] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/RunTests.gmk#l692 Jorn Vernee schreef op 2019-02-18 23:38: Hi, 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. There seems to be a check for this in make/test/BuildMicrobenchmark.gmk [2]: ``` ifeq ($(JMH_CORE_JAR), ) $(info Error: JMH is missing. Please use configure --with-jmh.) $(error Cannot continue) endif ``` But this does not seem to be triggered. I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? The Panama native test sources are being built by 'make/test/JtregNativeJdk.gmk' I'm not sure it's possible to hook directly into that, but maybe it can serve as an example for adding a similar feature to the benchmark suite. I'll try looking into that. Thanks! Thanks for the help! Jorn [2] : http://hg.openjdk.java.net/jdk/jdk/file/6fb43030a1b4/make/test/BuildMicrobenchmark.gmk#l34 /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Yes, that fixes the problem. Thanks! Jorn Erik Joelsson schreef op 2019-02-19 18:04: The problem with the jarfile looks to be a missing $(FIXPATH) when running microbenchmarks. The java process is simply unable to understand cygwin paths. Does this patch solve the issue for you, Jorn? diff -r 7c17199fa37d make/RunTests.gmk --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -690,7 +690,7 @@ $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, \ - $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) -jar $$($1_MICRO_BENCHMARKS_JAR) \ + $$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) -jar $$($1_MICRO_BENCHMARKS_JAR) \ $$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \ $$($1_MICRO_WARMUP_ITER) $$($1_MICRO_WARMUP_TIME) \ $$($1_MICRO_VM_OPTIONS) $$($1_MICRO_BASIC_OPTIONS) $$(MICRO_OPTIONS) \ /Erik On 2019-02-18 14:20, Claes Redestad wrote: http://mail.openjdk.java.net/pipermail/jdk-dev/2019-February/002624.html> Hi, On 2019-02-18 22:34, Jorn Vernee wrote: Hi Claes, 1. Does running make test rather than make test-only work? No. Same error there. Sorry, I tried that first and then re-ran with `test-only`. I also tried with a clean build FWIW. 2. Can you run the benchmarks.jar directly? Yes, this is working, thanks. This way I can also pass extra flags to JMH, which is nice :) --- FWIW, I also had some problems when running configure. 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. 2.) My path to the --with-jmh folder had spaces in it, which was causing an error in make/autoconf/lib-tests.m4 on line 76 [1]. Sounds like a bug. But those both had obvious workarounds. --- I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? Thanks! /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Hello Jorn, This looks pretty good and should probably be pushed to mainline. Some minor nits. In BuildMicrobenchmark.gmk: Please base MICROBENCHMARK_IMAGE dir on TEST_IMAGE_DIR like in RunTests.gmk. Line 131, please add ", \" plus newline like on 123-124. /Erik On 2019-02-19 03:49, Jorn Vernee wrote: Hi, I've taken a first stab at adding support for native dependencies: http://cr.openjdk.java.net/~jvernee/micronative/webrev.00/ With a small test benchmark: http://cr.openjdk.java.net/~jvernee/micronative_test/webrev.00/ Please be aware that both are based on the Panama/foreign branch [1]. I was not able to find a workaround for my problem with the jar file access unfortunately. So I have been testing by manually running the jar file with the expected arguments (but, that's not really testing the RunTests.gmk changes). It would be great if someone can offer a suggestion for that. The jar file is being created in make/test/BuildMicrobenchmark.gmk using the SetupJarArchive function [2]. The execution of the jar is done by code in RunTests.gmk [3]. I guess these 2 are racing to access the jar, and that is what's causing the error from the subject line. Otherwise, I can't really test this properly, so maybe someone else can take it from here. Cheers, Jorn [1] : http://hg.openjdk.java.net/panama/dev/shortlog/tip [2] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/test/BuildMicrobenchmark.gmk#l98 [3] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/RunTests.gmk#l692 Jorn Vernee schreef op 2019-02-18 23:38: Hi, 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. There seems to be a check for this in make/test/BuildMicrobenchmark.gmk [2]: ``` ifeq ($(JMH_CORE_JAR), ) $(info Error: JMH is missing. Please use configure --with-jmh.) $(error Cannot continue) endif ``` But this does not seem to be triggered. I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? The Panama native test sources are being built by 'make/test/JtregNativeJdk.gmk' I'm not sure it's possible to hook directly into that, but maybe it can serve as an example for adding a similar feature to the benchmark suite. I'll try looking into that. Thanks! Thanks for the help! Jorn [2] : http://hg.openjdk.java.net/jdk/jdk/file/6fb43030a1b4/make/test/BuildMicrobenchmark.gmk#l34 /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
The problem with the jarfile looks to be a missing $(FIXPATH) when running microbenchmarks. The java process is simply unable to understand cygwin paths. Does this patch solve the issue for you, Jorn? diff -r 7c17199fa37d make/RunTests.gmk --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -690,7 +690,7 @@ $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, \ - $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) -jar $$($1_MICRO_BENCHMARKS_JAR) \ + $$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) -jar $$($1_MICRO_BENCHMARKS_JAR) \ $$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \ $$($1_MICRO_WARMUP_ITER) $$($1_MICRO_WARMUP_TIME) \ $$($1_MICRO_VM_OPTIONS) $$($1_MICRO_BASIC_OPTIONS) $$(MICRO_OPTIONS) \ /Erik On 2019-02-18 14:20, Claes Redestad wrote: http://mail.openjdk.java.net/pipermail/jdk-dev/2019-February/002624.html> Hi, On 2019-02-18 22:34, Jorn Vernee wrote: Hi Claes, 1. Does running make test rather than make test-only work? No. Same error there. Sorry, I tried that first and then re-ran with `test-only`. I also tried with a clean build FWIW. 2. Can you run the benchmarks.jar directly? Yes, this is working, thanks. This way I can also pass extra flags to JMH, which is nice :) --- FWIW, I also had some problems when running configure. 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. 2.) My path to the --with-jmh folder had spaces in it, which was causing an error in make/autoconf/lib-tests.m4 on line 76 [1]. Sounds like a bug. But those both had obvious workarounds. --- I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? Thanks! /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Hi, I've taken a first stab at adding support for native dependencies: http://cr.openjdk.java.net/~jvernee/micronative/webrev.00/ With a small test benchmark: http://cr.openjdk.java.net/~jvernee/micronative_test/webrev.00/ Please be aware that both are based on the Panama/foreign branch [1]. I was not able to find a workaround for my problem with the jar file access unfortunately. So I have been testing by manually running the jar file with the expected arguments (but, that's not really testing the RunTests.gmk changes). It would be great if someone can offer a suggestion for that. The jar file is being created in make/test/BuildMicrobenchmark.gmk using the SetupJarArchive function [2]. The execution of the jar is done by code in RunTests.gmk [3]. I guess these 2 are racing to access the jar, and that is what's causing the error from the subject line. Otherwise, I can't really test this properly, so maybe someone else can take it from here. Cheers, Jorn [1] : http://hg.openjdk.java.net/panama/dev/shortlog/tip [2] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/test/BuildMicrobenchmark.gmk#l98 [3] : http://hg.openjdk.java.net/jdk/jdk/file/784537ff9c4e/make/RunTests.gmk#l692 Jorn Vernee schreef op 2019-02-18 23:38: Hi, 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. There seems to be a check for this in make/test/BuildMicrobenchmark.gmk [2]: ``` ifeq ($(JMH_CORE_JAR), ) $(info Error: JMH is missing. Please use configure --with-jmh.) $(error Cannot continue) endif ``` But this does not seem to be triggered. I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? The Panama native test sources are being built by 'make/test/JtregNativeJdk.gmk' I'm not sure it's possible to hook directly into that, but maybe it can serve as an example for adding a similar feature to the benchmark suite. I'll try looking into that. Thanks! Thanks for the help! Jorn [2] : http://hg.openjdk.java.net/jdk/jdk/file/6fb43030a1b4/make/test/BuildMicrobenchmark.gmk#l34 /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
Hi, 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. There seems to be a check for this in make/test/BuildMicrobenchmark.gmk [2]: ``` ifeq ($(JMH_CORE_JAR), ) $(info Error: JMH is missing. Please use configure --with-jmh.) $(error Cannot continue) endif ``` But this does not seem to be triggered. I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? The Panama native test sources are being built by 'make/test/JtregNativeJdk.gmk' I'm not sure it's possible to hook directly into that, but maybe it can serve as an example for adding a similar feature to the benchmark suite. I'll try looking into that. Thanks! Thanks for the help! Jorn [2] : http://hg.openjdk.java.net/jdk/jdk/file/6fb43030a1b4/make/test/BuildMicrobenchmark.gmk#l34 /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76
Re: Running micro benchmark results in 'Error: Unable to access jarfile'
http://mail.openjdk.java.net/pipermail/jdk-dev/2019-February/002624.html> Hi, On 2019-02-18 22:34, Jorn Vernee wrote: Hi Claes, 1. Does running make test rather than make test-only work? No. Same error there. Sorry, I tried that first and then re-ran with `test-only`. I also tried with a clean build FWIW. 2. Can you run the benchmarks.jar directly? Yes, this is working, thanks. This way I can also pass extra flags to JMH, which is nice :) --- FWIW, I also had some problems when running configure. 1.) I did not get a warning when I was missing --with-jmh for configure, although it looks like there is supposed to be one (without --with-jmh I got the same access error, but the benchmarks.jar did not exist). --with-jmh is an optional configure flag, not sure what we could do to warn here. Perhaps there's some way to ensure certain make targets depend on the configure having been run with the necessary prerequistes. Sounds like a fine enhancement. 2.) My path to the --with-jmh folder had spaces in it, which was causing an error in make/autoconf/lib-tests.m4 on line 76 [1]. Sounds like a bug. But those both had obvious workarounds. --- I was hoping to use the framework for Panama, so I'd likely have some native library as dependency of the benchmark. Is there currently any support for building (native) dependencies automatically? There should be support in the build system _somewhere_, but adding a native library to a microbenchmark might still be a non-trivial enhancement to the current implementation. It'd be a great addition, though. I might have time to help out sometime soon, but I've got my hands full right now. Perhaps someone else on this list could advice? Thanks! /Claes Thanks, Jorn [1] : http://hg.openjdk.java.net/jdk/jdk/file/bec6c8739833/make/autoconf/lib-tests.m4#l76