RFR: 7195: GC confguration with GC Flags
Brice Dutheil
github.com+803621+bric3 at openjdk.java.net
Fri Apr 2 16:41:34 UTC 2021
On Mon, 29 Mar 2021 18:54:35 GMT, Marcus Hirt <hirt at openjdk.org> wrote:
>> This pull request proposes to display related garbage collector flags.
>>
>> **Motivation**
>>
>> When turning the GC flag knobs, it is useful to be able to quickly see
>> the GC configuration, however the _GC configuration_ page only show 3
>> events, if one wants to have a look at flags he has to either check
>> the command line or inspect the _JVM internal_ page to find relevant
>> GC flags. Therefore having these flags right there is useful to get
>> a quick picture of the current configuration.
>>
>> **Current limitations**
>>
>> 1. At this time the selected flags depends on the GC algorithm which is
>> derived from the name of the old collector name. This is simple,
>> however it prevents to identify EpsilonGC because whose old
>> collector name is `SerialOld`, which is the same as SerialGC.
>>
>> 2. There are some global flags in `gc/shared/gc_globals.hpp` that
>> I didn't include as I didn't use most of them. I'm not sure these
>> flags are seen much in the wild.
>>
>>
>> **Remarks**
>>
>> As mentionned above the use of the OldCollector name may not be the
>> best choice, I would like to refactor this part to use the `Use*GC`
>> flags instead. I am a bit unsure at this time how to use the
>> existing API.
>
> application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/GCConfigurationPage.java line 281:
>
>> 279: // TODO Cannot discover EpsilonGC via the old collector name, because Epsilon reports the same as SerialGC
>> 280: // case "Epsilon":
>> 281: // // from https://github.com/openjdk/jdk11u/blob/6c31ac2acdc2b2efa63fe92de8368ab964d847e9/src/hotspot/share/gc/epsilon/epsilon_globals.hpp
>
> Dead code. Want to try some other means of discovery?
Yes, I'd like to, as I am not satisfied with the current approach.
@thegreystone Finally I got some time to rework the discovery.
I'd like your input however :
1. I created a class `GCFlagFilters` however I wonder if it makes sens to move it to `org.openjdk.jmc.flightrecorder` module in the `org.openjdk.jmc.flightrecorder.jdk` ?
2. I am not sure how to write tests. I have been playing with `org.openjdk.jmc.flightrecorder.uitest` module, but it's a bit slow to use, and I was only able to run them via maven command line.
-------------
PR: https://git.openjdk.java.net/jmc/pull/230
More information about the jmc-dev
mailing list