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

Miroslav Wengner mwengner at openjdk.java.net
Sun Oct 25 20:46:50 UTC 2020


On Sun, 25 Oct 2020 19:28:37 GMT, Marcus Hirt <hirt at openjdk.org> wrote:

>> Miroslav Wengner has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:
>> 
>>  - 6669: typo correction
>>  - 6669: only last thread, cleaned
>>  - Merge branch 'master' of https://github.com/openjdk/jmc into bugfix/6669_FlameGraphView_tree_calculation_should_probably_be_interruptable
>>  - 6669: correction
>>  - 6669: spotless needs
>>  - 6669: more executor threads,runnable, canceling threads, cleanup
>>  - 6669: correction
>>  - 6669: spotless needs
>>  - 6669: model calculation cancelation
>
> application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java line 157:
> 
>> 155: 
>> 156: 	private static final int MODEL_EXECUTOR_THREADS_NUMBER = 3;
>> 157: 	private static final ExecutorService MODEL_EXECUTOR = Executors.newFixedThreadPool(MODEL_EXECUTOR_THREADS_NUMBER);
> 
> Perhaps add a thread factory to make it easier to interpret recordings?
> 
> 	private static final ExecutorService MODEL_EXECUTOR = Executors.newFixedThreadPool(MODEL_EXECUTOR_THREADS_NUMBER, new ThreadFactory() {
> 		private ThreadGroup threadGroup = new ThreadGroup("FlameGraphModelCalculatorGroup");
> 		private AtomicInteger threadCounter = new AtomicInteger();
> 		@Override
> 		public Thread newThread(Runnable r) {
> 			Thread t = new Thread(threadGroup, r, "FlameGraphModelCalculator-" + threadCounter.getAndIncrement());
> 			t.setDaemon(true);
> 			return t;
> 		}
> 	});

yeap, It will look better in the threads list ->  added!

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

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


More information about the jmc-dev mailing list