RFR: 6669: FlameGraphView tree calculation should (probably) be interruptable

Marcus Hirt hirt at openjdk.java.net
Wed Oct 21 11:55:12 UTC 2020


On Tue, 20 Oct 2020 22:26:05 GMT, Miroslav Wengner <mwengner at openjdk.org> wrote:

> fix to bug: https://bugs.openjdk.java.net/browse/JMC-6669

Changes requested by hirt (Lead).

application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java line 306:

> 304: 			}
> 305: 			TraceNode traceNode = TraceTreeUtils.createTree(root, model);
> 306: 			String jsonModel = view.toJSonModel(traceNode, isInvalid).toString();

Java is pass by value. You'll need to pass a reference to this (the ModelRebuildCallable) and query that for isInvalid(), otherwise you'll only have the value at the time of the invocation passed around.

-------------

PR: https://git.openjdk.java.net/jmc/pull/135


More information about the jmc-dev mailing list