RFR: 8275185: Remove dead code and clean up jvmstat LocalVmManager [v2]
Ioi Lam
iklam at openjdk.java.net
Thu Nov 4 02:15:55 UTC 2021
On Tue, 19 Oct 2021 22:02:58 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> 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
>
> src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/protocol/local/LocalVmManager.java line 75:
>
>> 73: // 1.4.1 (or earlier?): the files are stored directly under {tmpdir}/ with
>> 74: // the following pattern.
>> 75: Pattern oldtmpFilePattern = Pattern.compile("^hsperfdata_[0-9]+(_[1-2]+)?$");
>
> So this pattern optionally has `_` followed by a sequence of 1's and 2's at the end? Seems odd.
I restored this line to use PerfDataFile.tmpFileNamePattern, as before my changes. Yes, that's an odd way of naming a file.
> src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/protocol/local/LocalVmManager.java line 105:
>
>> 103:
>> 104:
>> 105: // 1.4.2 and later: Look for the files {tmpdir}/hsperfdata_{any_user_name}/[0-0]+
>
> should be `[0-9]+`
Fixed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5923
More information about the serviceability-dev
mailing list