RFR: 6643: Make VM Operations rule consider close consecutive events in score
Jessye Coleman-Shapiro
github.com+29706926+jessyec-s at openjdk.java.net
Mon Feb 10 20:56:08 UTC 2020
On Fri, 7 Feb 2020 13:23:47 GMT, Henrik Dafgård <hdafgard at openjdk.org> wrote:
>> This patch modifies the VM Operations rule's score calculation so that is considers blocking that could result from the combination of multiple close consecutive operations. Right now an application's score only takes into account the longest event in its calculation.
>>
>> At the moment I have determined two events to be "close" if they occur within 0.01 s of one another.
>
> 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?
-------------
PR: https://git.openjdk.java.net/jmc/pull/42
More information about the jmc-dev
mailing list