[PATCH] JMC-6252 Method profiling rules loading forever

Henrik Dafgård hdafgard at gmail.com
Wed May 29 13:06:51 UTC 2019


The patch looks great and solves a long-standing and annoying issue!

However, since the check for whether or not the browser widget was disposed
has been removed there will be exceptions thrown if the user navigates away
while updates are being applied. This could be solved by e.g. checking
whether or not the browser is disposed inside of the catch clause in the
cmdExecRunnable lambda. We might also consider changing the inner catch
clause to no longer catch all exceptions (or at least avoid catching any
RuntimeException thrown).

Henrik Dafgård

On Tue, 28 May 2019 at 22:03, Kangcheng Xu <kxu at redhat.com> wrote:

> Hello,
> This patch fixes JMC-6252 Method Profiling rule appears to be taking
> forever to evaluate in Ubuntu 18.04 [0]. (Please note this issue is
> general and appears on all platforms.)
> This patch addresses two problems found in the source code:
> 1. The order of JavaScript command execution to update HTML-based UI
> could be stochastic if fired before DOM loaded. Commands executed as
> ProgressListener callbacks could be out-of-order. The solution is to
> store commands in a queue and execute in a FIFO fashion after DOM is
> loaded.
> 2. resultEventQueue.isEmpty() and resultEventQueue.add() together is
> not an atomic operation and could be interrupted in rare cases, which
> leads to resultEventQueue not being completely consumed.
> Please see the attached patch. Any thoughts on this fix? Thanks very much!
> Arvin Kangcheng Xu
> [0]
> https://bugs.openjdk.java.net/browse/JMC-6252

More information about the jmc-dev mailing list