jmc icon indicating copy to clipboard operation
jmc copied to clipboard

7248: JMC7/8 Automated Analysis taking very long time to produce results for Class Leak Rule.

Open Suchitainf opened this issue 4 years ago • 7 comments

This PR addresses the optimization of Class Leak Rule.

Please refer the JBS for the sample JFR which was taking ~90 minutes to generate results for Class Leak Rule. After the optimization time is reduced to ~10-15 minutes.

Please review the change and let me the know if there are any comments / suggestions.


Progress

  • [x] Commit message must refer to an issue
  • [ ] Change must be properly reviewed

Issue

  • JMC-7248: JMC7/8 Automated Analysis taking very long time to produce results for Class Leak Rule.

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jmc pull/248/head:pull/248
$ git checkout pull/248

Update a local copy of the PR:
$ git checkout pull/248
$ git pull https://git.openjdk.java.net/jmc pull/248/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 248

View PR using the GUI difftool:
$ git pr show -t 248

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jmc/pull/248.diff

Suchitainf avatar May 11 '21 22:05 Suchitainf

:wave: Welcome back schaturvedi! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar May 11 '21 22:05 bridgekeeper[bot]

Webrevs

mlbridge[bot] avatar May 11 '21 22:05 mlbridge[bot]

Hi @bric3 thanks for your review. Looks like we need to redesign this rule because 15 min is too much time in itself to calculate rule results. I tried Stream::parallelStream approach as well but unfortunately that is taking around 25-30 min which is unacceptable. So I will look into it again.

Suchitainf avatar May 26 '21 13:05 Suchitainf

@Suchitainf, Yes indeed this looks long, maybe be redesigning the task itself it might be possible to better leverage an FJP.

bric3 avatar May 28 '21 08:05 bric3

Hi Suchita!

We believe that this rule probably need to be redesigned to be useful in practice. That said, we could take your changes (after acting on @bric3 feedback), as it does at least improve matters, as an improvement until we get around to properly fixing it.

thegreystone avatar Aug 18 '21 17:08 thegreystone

Hi, Sorry for the late reply, I'm on a spring-break with kids. I believe the time out constraints solves a part of the issue, but I still think the executor code should be improved before merging this one.

bric3 avatar Aug 19 '21 07:08 bric3

Hi @Suchitainf - just checking on how you want to proceed with this one.

thegreystone avatar Dec 01 '21 09:12 thegreystone

@Suchitainf this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 7248
git fetch https://git.openjdk.org/jmc master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

openjdk[bot] avatar Feb 17 '23 18:02 openjdk[bot]

@Suchitainf Should we close this PR ?

bric3 avatar Jun 08 '23 20:06 bric3

The changes are done as part of 7879 ticket. Hence, closing this draft PR.

Suchitainf avatar Jul 05 '23 05:07 Suchitainf