RFR: Add an option to stream region sampling data to a file
Roman Kennke
rkennke at openjdk.java.net
Thu Oct 7 16:17:38 UTC 2021
On Thu, 7 Oct 2021 15:34:08 GMT, William Kemper <wkemper at openjdk.org> wrote:
> This change adds two command line options to enable and configure a feature that has Shenandoah stream region sampling data to disk. These changes are complemented by changes in the [Shenandoah Visualizer](https://github.com/openjdk/shenandoah-visualizer) project to load and replay the logged region sampling data.
Looks ok, I only have some minor nits.
src/hotspot/share/gc/shenandoah/shenandoahHeapRegionCounters.cpp line 92:
> 90: jlong last = _last_sample_millis;
> 91: if (current - last > ShenandoahRegionSamplingRate &&
> 92: Atomic::cmpxchg(&_last_sample_millis, last, current) == last) {
Neither the previous nor the new version seems to align correctly.
src/hotspot/share/gc/shenandoah/shenandoahHeapRegionCounters.hpp line 104:
> 102:
> 103: #endif // SHARE_GC_SHENANDOAH_SHENANDOAHHEAPREGIONCOUNTERS_HPP
> 104:
Bunch of unrelated new newlines.
src/hotspot/share/gc/shenandoah/shenandoahLogFileOutput.cpp line 3:
> 1: /*
> 2: * Copyright (c) 2021, Amazon.com, Inc. All rights reserved.
> 3: * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
Is this a copy of or derived from an existing source file? If not, only putting the 2021 header should be enough.
src/hotspot/share/gc/shenandoah/shenandoahLogFileOutput.hpp line 2:
> 1: /*
> 2: * Copyright (c) 2013, 2021, Red Hat, Inc. All rights reserved.
Is this a new file? Then the 2021-Amazon header should be enough. If it's derived from an existing file, then the header is ok as it is.
-------------
Marked as reviewed by rkennke (Lead).
PR: https://git.openjdk.java.net/shenandoah/pull/82
More information about the shenandoah-dev
mailing list