RFR: 6643: Make VM Operations rule consider close consecutive events in score
Henrik Dafgård
hdafgard at openjdk.java.net
Mon Feb 24 11:02:10 UTC 2020
On Mon, 10 Feb 2020 20:55:15 GMT, Jessye Coleman-Shapiro <jescolem at openjdk.org> wrote:
>> core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/latency/VMOperationRule.java line 185:
>>
>>> 184: return sortedEvents;
>>> 185: }
>>> 186:
>>
>> This is fairly expensive and unnecessary, during parsing events are stored in lanes by type that are disjoint (for events with durations) and sorted. You could use that fact and check for the time between two events in the same lane instead, possibly with a second pass over the IItemCollection if there are multiple lanes.
>
> If there are multiple lanes for one event type, even though the lanes themselves are sorted, is it guaranteed that two consecutive events within a lane are actually consecutive in real time? For example if event A and B occur one after the other, is it not possible for A to be in a different lane than B and not necessarily be the first event that occurs in its lane or the last event that finishes in its lane, but be somewhere in the middle?
The only guarantee is that the lanes are sorted on event times and are disjoint. So that might be a possible outcome.
-------------
PR: https://git.openjdk.java.net/jmc/pull/42
More information about the jmc-dev
mailing list