[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: RFR: 8275185: Remove dead code and clean up jvmstat LocalVmManager
From: Kevin Walls <kevinw () openjdk ! java ! net>
Date: 2021-10-26 7:51:12
Message-ID: Jg5NrmH0wafhT4xhYfQbK7o0dHx_vA7O506CTcWBIwA=.14232742-59b0-47d3-ba29-a6076bd3d2d3 () github ! com
[Download RAW message or body]
On Wed, 13 Oct 2021 04:17:25 GMT, Ioi Lam <iklam@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).
Nice cleanup - although was it not better for PerfDataFile.java to "own" the \
definitions of what a perfdata filename looks like? That might be what Chris was \
hinting at. There isn't really that _much_ flipping between two files. 8-)
-------------
PR: https://git.openjdk.java.net/jdk/pull/5923
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic