RFR: 7195: GC confguration with GC Flags

Marcus Hirt hirt at openjdk.java.net
Fri Apr 2 16:41:32 UTC 2021


On Thu, 18 Mar 2021 16:30:12 GMT, Brice Dutheil <github.com+803621+bric3 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.

Don't forget to update the copyright header years. If you need to add a year to make a year range, simply add a comma and the new year, e.g. like so:

 Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.

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?

-------------

PR: https://git.openjdk.java.net/jmc/pull/230


More information about the jmc-dev mailing list