Skip to content

Commit 7c6da95

Browse files
galderzshipilev
authored andcommitted
7903740: JMH: Perf event validation not working with skid options
Reviewed-by: shade
1 parent c2931c9 commit 7c6da95

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jmh-core-it/src/test/java/org/openjdk/jmh/it/profilers/LinuxPerfAsmProfilerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void test() throws RunnerException {
5757

5858
Map<String, Result> sr = rr.getSecondaryResults();
5959
String out = ProfilerTestUtils.checkedGet(sr, "asm").extendedInfo();
60-
if (!checkDisassembly(out)) {
60+
if (!checkDisassembly(out) && someEventsCaptured(out)) {
6161
throw new IllegalStateException("Profile does not contain the required frame: " + out);
6262
}
6363
}

jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class LinuxPerfAsmProfiler extends AbstractPerfAsmProfiler {
4646
public LinuxPerfAsmProfiler(String initLine) throws ProfilerException {
4747
super(initLine, "cycles");
4848

49-
String[] senseCmd = { PerfSupport.PERF_EXEC, "stat", "--event", Utils.join(requestedEventNames, ","), "--log-fd", "2", "echo", "1" };
49+
String[] senseCmd = { PerfSupport.PERF_EXEC, "record", "-q", "--event", Utils.join(requestedEventNames, ","), "-o", "-", "echo", "1"};
5050

5151
Collection<String> failMsg = Utils.tryWith(senseCmd);
5252
if (!failMsg.isEmpty()) {

0 commit comments

Comments
 (0)