On Tue, 29 Sep 2020 19:43:45 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> While doing some refactoring I wanted to move >> HeapRegionManager::_num_committed and realized that I needed to update >> the SA. After some looking around it turns out that it is unused and I can >> remove the numCommittedField from the >> HeapRegionManager class in the SA. Local build and test looks good and >> running tier1 and some svc-testing to ensure I >> haven't missed anything. > > src/hotspot/share/gc/g1/vmStructs_g1.hpp line 56: > >> 54: >> \ >> 55: nonstatic_field(HeapRegionManager, _regions, >> G1HeapRegionTable) \ >> 56: nonstatic_field(HeapRegionManager, _num_committed, uint) >> \ > > If this field is remaining in hotspot, it should also remain in vmStructs. > Although SA does not need to explicitly know > about this field to function properly, SA can be used to dump hotspot > objects, and can only dump objects whose types > are in vmStructs, and for those types can only display the fields that are > also in vmStructs. The field will remain for now, but the plan is to refactor it into a new class. The new class is not needed by the SA and I would really like to avoid having to add unused and untested code to the SA. To simplify this coming change I want to remove this from the SA straight away. Even without this coming change I would vote for removing this type of unused code from the SA. I don't think being able to dump the value is worth enough compared to the maintenance cost of keeping it in. ------------- PR: https://git.openjdk.java.net/jdk/pull/408