From JanecekPetr at seznam.cz Tue Feb 8 23:28:18 2022 From: JanecekPetr at seznam.cz (=?utf-8?q?Petr_Jane=C4=8Dek?=) Date: Wed, 09 Feb 2022 00:28:18 +0100 (CET) Subject: =?utf-8?q?DTraceAsmProfiler=3A_IllegalStateException=3A_Non-zero_?= =?utf-8?q?error_code_from_dtrace=3A_1?= Message-ID: <4u{.1V1V.7qfd9LwXV9n.1Y0loI@seznam.cz> Hello, I'm using dtraceasm on my MacOS 11.4 (Big Sur) on an Intel-based MBP 16" 2019. When running $ java -jar string-format-benchmarks/target/benchmarks.jar fastFormatStatic -prof dtraceasm on this repo: https://gitlab.com/janecekpetr/string-format, I'm often, but not always, getting # Processing profiler results: DTraceAsmProfiler Exception in thread "main" java.lang.IllegalStateException: Non-zero error code from dtrace: 1 ?? ?at org.openjdk.jmh.profile.DTraceAsmProfiler.afterTrial (DTraceAsmProfiler.java:106) ?? ?at org.openjdk.jmh.runner.Runner.runSeparate(Runner.java:675) ?? ?at org.openjdk.jmh.runner.Runner.runBenchmarks(Runner.java:558) ?? ?at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:310) ?? ?at org.openjdk.jmh.runner.Runner.run(Runner.java:209) ?? ?at org.openjdk.jmh.Main.main(Main.java:71) More info: $ java --version???????????????????????????????????????????????????????????? ????????????????????????????????????????????? ? openjdk 17.0.2 2022-01-18 OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8) OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing) # JMH version: 1.34 hsdis file coming from https://chriswhocodes.com/hsdis/ Last I've seen this it was about killing the process correctly. Maybe something got borked again? What can I do to help isolate the problem? Thanks, PJ From JanecekPetr at seznam.cz Tue Feb 8 23:54:08 2022 From: JanecekPetr at seznam.cz (=?utf-8?q?Petr_Jane=C4=8Dek?=) Date: Wed, 09 Feb 2022 00:54:08 +0100 (CET) Subject: =?utf-8?q?Java_17=3A_Unrecognized_VM_option_=27TraceClassLoading?= =?utf-8?q?=27_when_=27printCompilationInfo=3Dtrue=27?= Message-ID: <4vF.1V1P.1}JxwXlh16I.1Y0mAW@seznam.cz> Hello! On Java 17 using JMH 1.34, if I run java -jar target/benchmarks.jar -prof dtraceasm:printCompilationInfo=true the process fails with: Unrecognized VM option 'TraceClassLoading' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. I believe `-XX:+TraceClassLoading` is no longer there in Java 17: https://chriswhocodes.com/hotspot_options_openjdk8.html?s=TraceClassLoading Thanks, PJ From erich at debian.org Tue Feb 15 09:47:50 2022 From: erich at debian.org (Erich Schubert) Date: Tue, 15 Feb 2022 10:47:50 +0100 Subject: OOM in json writer Message-ID: <1db1f71e-5d6d-63e5-10ce-928a1037e39b@vitavonni.de> Hi, I have been running a rather large set of benchmarks, and it eventually caused an OOM in the JSON writer: Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit ??????? at java.base/java.util.Arrays.copyOf(Arrays.java:3537) ??????? at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:228) ??????? at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:582) ??????? at java.base/java.lang.StringBuilder.append(StringBuilder.java:175) ??????? at org.openjdk.jmh.results.format.JSONResultFormat.tidy(JSONResultFormat.java:321) ??????? at org.openjdk.jmh.results.format.JSONResultFormat.writeOut(JSONResultFormat.java:156) ??????? at org.openjdk.jmh.results.format.ResultFormatFactory$1.writeOut(ResultFormatFactory.java:50) ??????? at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:317) ??????? at org.openjdk.jmh.runner.Runner.run(Runner.java:209) ??????? at org.openjdk.jmh.Main.main(Main.java:71) I will now try -Djmh.json.rawData=false, an seemingly undocumented option. Could you please consider: a) compressed json.gz output format - these files compress very well b) less/optional whitespace in json - right now, it has 4 spaces per depth inserted by the tidy() function. Maybe no whitespace at all in lengthy raw value arrays? Most of the time, json files are meant to be machine readable, not human readable - if desired, a user can pretty print them if desired (e.g., using? python3 -m json.tool). As you can see, the tidy() function does cause the problems here. c) directly writing the output rather than building it entirely in-memory to conserve memory d) maybe eventually use an actual json writer library than the current replaceAll() hack? Building JSON this way is strongly discouraged IMHO. Thank you. Best regards, Erich Schubert