RFR: 7879: Automated Analysis taking very long time to produce results for Class Leak Rule and showing wrong results. [v6]
Brice Dutheil
bdutheil at openjdk.org
Wed Jan 18 21:08:53 UTC 2023
On Sun, 8 Jan 2023 19:44:04 GMT, Suchita Chaturvedi <schaturvedi at openjdk.org> wrote:
>> This PR takes care of optimizing and correcting the Class leak rule results on Automated Analysis Page.
>
> Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed the synchronized block and used ConcurrentLinkedQueue instead
OK for me. There's one tidbit I think should be changed is using the jul logger over `System.out`.
core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/util/DefaultIItemResultSet.java line 75:
> 73: aggregators.addAll(query.getAggregators());
> 74: info = new HashMap<>(attributes.size() + aggregators.size());
> 75: exec = Executors.newWorkStealingPool();
Later, I think we may need to find a may to inject thread pools rather than creating them in each result sets (Maybe via `ItemResultSetFactory`. But this is a different task (need to create a jira ticket).
core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/util/DefaultIItemResultSet.java line 166:
> 164: System.out.println(
> 165: "The results may be inaccurate as JMC is unable to process all the class entries to determine "
> 166: + "the class leak results. Please increase the configured timeout in preferences to see the accurate results. ");
I believe this should be changed to use the jul logger. Other flighrecorder component uses that.
E.g.
private final static Logger LOGGER = Logger.getLogger("org.openjdk.jmc.flighrecorder.rules.jdk.util");
-------------
Marked as reviewed by bdutheil (Author).
PR: https://git.openjdk.org/jmc/pull/419
More information about the jmc-dev
mailing list