Skip to content

Commit 2a4f329

Browse files
Fix issue where the jfrconv uses native lock samples for leak detection (async-profiler#1630)
1 parent 9c425ca commit 2a4f329

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/converter/one/convert/JfrConverter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ protected EventCollector createCollector(Arguments args) {
8282
}
8383

8484
protected void collectEvents(TimeIntervals timeIntervals) throws IOException {
85-
Class<? extends Event> eventClass = args.nativelock ? NativeLockEvent.class
86-
: args.nativemem ? MallocEvent.class
85+
// args.nativemem ? MallocEvent.class should always be first for the leak detection feature
86+
Class<? extends Event> eventClass = args.nativemem ? MallocEvent.class
87+
: args.nativelock ? NativeLockEvent.class
8788
: args.live ? LiveObject.class
8889
: args.alloc ? AllocationSample.class
8990
: args.lock ? ContendedLock.class

0 commit comments

Comments
 (0)