RFR: 8275185: Remove dead code and clean up jvmstat LocalVmManager [v2]
Serguei Spitsyn
sspitsyn at openjdk.java.net
Sat Nov 6 12:19:44 UTC 2021
On Thu, 4 Nov 2021 02:15:45 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> LocalVmManager and PerfDataFile have APIs that are supposed to look for VMs owned by a specific user. No one uses these APIs, and they don't work anyway.
>>
>> The current code is very confusing to look at. Since we're likely to change code in this area for further container support, it's better to clean up the code now.
>>
>> - Remove all APIs that take a user name
>> - Also removed PerfDataFile.getFile() methods that are unused
>> - Cleaned up the code that looks up the hsperfdata_xxx files
>> - Fix comments to explain what's happening
>> - Avoid using Matcher.reset which is not thread-safe
>> - Renamed confusing variables such as `userFilter` to make the code more readable
>> - LocalVmManager.activeVms() probably doesn't need to be synchronized, but I kept it anyway to avoid unnecessary risks.
>>
>> Testing with Oracle CI: tiers1-4, plus hs-tier5-rt (which tests containers and have extensive use of the management tools).
>
> Ioi Lam 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 three additional commits since the last revision:
>
> - Merge branch 'master' into 8275185-jvmstat-LocalVmManager-cleanup-and-remove-dead-code
> - @kevinjwalls and @plummercj review - (1) restore PerfDataFile.userDirNamePattern, etc. (2) Fixed comments
> - 8275185: Remove dead code and clean up jvmstat LocalVmManager
Hi Ioi,
Sorry for being late here.
Just to complete this...
Thank you for your answers! I'm okay with them.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5923
More information about the serviceability-dev
mailing list