From nick.gasson at arm.com Fri Nov 1 01:58:57 2019 From: nick.gasson at arm.com (Nick Gasson) Date: Fri, 1 Nov 2019 09:58:57 +0800 Subject: RFR(XS): 7902477: JMH perfasm fails with lastest JDK 13 In-Reply-To: <0ecce663-f71f-e8ab-baad-461ba1959b40@redhat.com> References: <969a8d16-4aae-a31e-75eb-8e3e58042209@arm.com> <0ecce663-f71f-e8ab-baad-461ba1959b40@redhat.com> Message-ID: <00f8207c-54c8-e24c-e0b7-3f227a18de89@arm.com> Hi Aleksey, >> >> Pattern.compile("^(\\S.*)( +)\\[(.+), (.+)[\\]\\[](.*)"); > > Can you show the example output where the original regexp fails? Because I think you are adding > another capture group here, which means the matcher indices at L850-751 below should be amended: It's failing on this output, where the format changed in JDK 13 to add the extra "-------"s. - - - [BEGIN] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - StubRoutines::updateBytesCRC32 [0x0000ffff6c819700, 0x0000ffff6c819870] (368 bytes) -------------------------------------------------------------------------------- 0x0000ffff6c819700: stp x29, x30, [sp, #-16]! 0x0000ffff6c819704: mov x29, sp 0x0000ffff6c819708: mvn w0, w0 0x0000ffff6c81970c: subs x2, x2, #0x80 This parsing code is supposed to match the "StubRountines::..." line, which it does, but it also matches the first line of the assembly output. Unless I'm missing something the patch doesn't add an additional capture group. It changes the previous initial capture group (.+) to (\\S.*) and anchors it to the start of the line. Because otherwise it will match like this: ( 0x0000ffff6c819700: stp x29, x30,)( )[(sp), (#-16)](!) The exception then comes from trying to parse "sp" as a hex address. Thanks, Nick From shade at redhat.com Fri Nov 1 09:34:36 2019 From: shade at redhat.com (shade at redhat.com) Date: Fri, 01 Nov 2019 09:34:36 +0000 Subject: hg: code-tools/jmh: 7902477: perfasm fails with latest JDK 13 Message-ID: <201911010934.xA19Ybnf028325@aojmv0008.oracle.com> Changeset: 20e34f451f0c Author: ngasson Date: 2019-10-30 17:31 +0800 URL: https://hg.openjdk.java.net/code-tools/jmh/rev/20e34f451f0c 7902477: perfasm fails with latest JDK 13 Contributed-by: Nick Gasson ! jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java From shade at redhat.com Fri Nov 1 09:35:39 2019 From: shade at redhat.com (Aleksey Shipilev) Date: Fri, 1 Nov 2019 10:35:39 +0100 Subject: RFR(XS): 7902477: JMH perfasm fails with lastest JDK 13 In-Reply-To: <00f8207c-54c8-e24c-e0b7-3f227a18de89@arm.com> References: <969a8d16-4aae-a31e-75eb-8e3e58042209@arm.com> <0ecce663-f71f-e8ab-baad-461ba1959b40@redhat.com> <00f8207c-54c8-e24c-e0b7-3f227a18de89@arm.com> Message-ID: <01d60530-8468-5e2e-11a7-0922d7154190@redhat.com> Hi again, On 11/1/19 2:58 AM, Nick Gasson wrote: > - - - [BEGIN] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > StubRoutines::updateBytesCRC32 [0x0000ffff6c819700, 0x0000ffff6c819870] (368 bytes) > -------------------------------------------------------------------------------- > ? 0x0000ffff6c819700:?? stp???? x29, x30, [sp, #-16]! > ? 0x0000ffff6c819704:?? mov???? x29, sp > ? 0x0000ffff6c819708:?? mvn???? w0, w0 > ? 0x0000ffff6c81970c:?? subs??? x2, x2, #0x80 Thanks for the example, I added it as the comment into the patch. > Unless I'm missing something the patch doesn't add an additional capture group. It changes the > previous initial capture group (.+) to (\\S.*) and anchors it to the start of the line. Because > otherwise it will match like this: Ah, sorry, I misread the patch! You're right, the capture group structure is unaffected. Pushed. -- Thanks, -Aleksey From shade at redhat.com Fri Nov 1 16:00:48 2019 From: shade at redhat.com (Aleksey Shipilev) Date: Fri, 1 Nov 2019 17:00:48 +0100 Subject: JMH 1.22 Message-ID: <72a28da2-6089-683c-5e74-ff275b3bf778@redhat.com> Hi, JMH 1.22 maintenance release is here, published at Maven Central, and ready to use. Changes in this release: *) {xperf, perf, dtrace}asm reliability improvements: 7902477: perfasm fails with latest JDK 13 7902533: xperfasm cannot parse output with commas in symbol names 7902530: dtraceasm should protect from completely corrupted lines 7902529: {perf,dtrace}asm profilers should not swallow IOExceptions *) perfasm profiler got new fancy option -prof perfasm:mergeMethods=true 7902450: perfasm should provide a way to merge all hot regions from the same method *) perf profiler can now select the events, for example -prof perf:events=topdown-fetch-bubbles 7902329: perf profiler should accept events *) Reliability improvements for serialization benchmarks that emit stdout/stderr: 7902528: Reentrant BinaryLinkClient::pushFrame corrupts the stream *) Param values with special characters are not breaking the result outputs: 7902359: @Param values with braces and quotes should be handled specially *) Profilers plugin interface touchups: 7902532: Profiler Javadoc should be clear about SPI-related expectations 7902531: JMH archetypes should include ServicesResourceTransformer *) Debugging improvements: 7902452: Missing RFFieldInfo.toString (As usual, bugs can be reached via https://bugs.openjdk.java.net/browse/CODETOOLS-$number) Enjoy! -- Thanks, -Aleksey From shade at redhat.com Fri Nov 1 16:02:24 2019 From: shade at redhat.com (shade at redhat.com) Date: Fri, 01 Nov 2019 16:02:24 +0000 Subject: hg: code-tools/jmh: 3 new changesets Message-ID: <201911011602.xA1G2Osf006872@aojmv0008.oracle.com> Changeset: 40c1cca654c1 Author: shade Date: 2019-11-01 13:59 +0100 URL: https://hg.openjdk.java.net/code-tools/jmh/rev/40c1cca654c1 JMH v1.22 ! jmh-archetypes/jmh-groovy-benchmark-archetype/pom.xml ! jmh-archetypes/jmh-java-benchmark-archetype/pom.xml ! jmh-archetypes/jmh-kotlin-benchmark-archetype/pom.xml ! jmh-archetypes/jmh-scala-benchmark-archetype/pom.xml ! jmh-archetypes/pom.xml ! jmh-core-benchmarks/pom.xml ! jmh-core-ct/pom.xml ! jmh-core-it/pom.xml ! jmh-core/pom.xml ! jmh-generator-annprocess/pom.xml ! jmh-generator-asm/pom.xml ! jmh-generator-bytecode/pom.xml ! jmh-generator-reflection/pom.xml ! jmh-samples/pom.xml ! pom.xml Changeset: 6f1afda080e7 Author: shade Date: 2019-11-01 14:00 +0100 URL: https://hg.openjdk.java.net/code-tools/jmh/rev/6f1afda080e7 Added tag 1.22 for changeset 40c1cca654c1 ! .hgtags Changeset: c8f9f5b85cd9 Author: shade Date: 2019-11-01 14:00 +0100 URL: https://hg.openjdk.java.net/code-tools/jmh/rev/c8f9f5b85cd9 Continue in 1.23-SNAPSHOT ! jmh-archetypes/jmh-groovy-benchmark-archetype/pom.xml ! jmh-archetypes/jmh-java-benchmark-archetype/pom.xml ! jmh-archetypes/jmh-kotlin-benchmark-archetype/pom.xml ! jmh-archetypes/jmh-scala-benchmark-archetype/pom.xml ! jmh-archetypes/pom.xml ! jmh-core-benchmarks/pom.xml ! jmh-core-ct/pom.xml ! jmh-core-it/pom.xml ! jmh-core/pom.xml ! jmh-generator-annprocess/pom.xml ! jmh-generator-asm/pom.xml ! jmh-generator-bytecode/pom.xml ! jmh-generator-reflection/pom.xml ! jmh-samples/pom.xml ! pom.xml From stepan.koltsov at gmail.com Tue Nov 26 01:08:30 2019 From: stepan.koltsov at gmail.com (Stepan Koltsov) Date: Tue, 26 Nov 2019 01:08:30 +0000 Subject: Race in ident generation Message-ID: Hi folks, some of our builds of libraries with JMH fail with this error: ``` Foo_bar_jmhTest.java:54: error: cannot find symbol nullint startRndMask; ``` We do in-process compilation, and we do many builds concurrently. We cannot reproduce this problem locally (it fails occasionally in our CI). So we have a suspicion it is a race inside JMH: when two threads compute idents, one of them observes partially initialized IDENTS variable. So this is the fix: https://gist.github.com/stepancheg/eadc1b46587b447728a696b4a57dff4f (not tested) Regards, Stepan