Skip to content

Commit

Permalink
8334315: Shenandoah: reduce GC logging noise
Browse files Browse the repository at this point in the history
Reviewed-by: wkemper, ysr, shade
  • Loading branch information
kdnilsen authored and shipilev committed Jul 26, 2024
1 parent 4bcb8f0 commit f35af71
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ static const char* partition_name(ShenandoahFreeSetPartitionId t) {

#ifndef PRODUCT
void ShenandoahRegionPartitions::dump_bitmap() const {
log_info(gc)("Mutator range [" SSIZE_FORMAT ", " SSIZE_FORMAT "], Collector range [" SSIZE_FORMAT ", " SSIZE_FORMAT "]",
_leftmosts[int(ShenandoahFreeSetPartitionId::Mutator)],
_rightmosts[int(ShenandoahFreeSetPartitionId::Mutator)],
_leftmosts[int(ShenandoahFreeSetPartitionId::Collector)],
_rightmosts[int(ShenandoahFreeSetPartitionId::Collector)]);
log_info(gc)("Empty Mutator range [" SSIZE_FORMAT ", " SSIZE_FORMAT
"], Empty Collector range [" SSIZE_FORMAT ", " SSIZE_FORMAT "]",
_leftmosts_empty[int(ShenandoahFreeSetPartitionId::Mutator)],
_rightmosts_empty[int(ShenandoahFreeSetPartitionId::Mutator)],
_leftmosts_empty[int(ShenandoahFreeSetPartitionId::Collector)],
_rightmosts_empty[int(ShenandoahFreeSetPartitionId::Collector)]);

log_info(gc)("%6s: %18s %18s %18s", "index", "Mutator Bits", "Collector Bits", "NotFree Bits");
log_debug(gc)("Mutator range [" SSIZE_FORMAT ", " SSIZE_FORMAT "], Collector range [" SSIZE_FORMAT ", " SSIZE_FORMAT "]",
_leftmosts[int(ShenandoahFreeSetPartitionId::Mutator)],
_rightmosts[int(ShenandoahFreeSetPartitionId::Mutator)],
_leftmosts[int(ShenandoahFreeSetPartitionId::Collector)],
_rightmosts[int(ShenandoahFreeSetPartitionId::Collector)]);
log_debug(gc)("Empty Mutator range [" SSIZE_FORMAT ", " SSIZE_FORMAT
"], Empty Collector range [" SSIZE_FORMAT ", " SSIZE_FORMAT "]",
_leftmosts_empty[int(ShenandoahFreeSetPartitionId::Mutator)],
_rightmosts_empty[int(ShenandoahFreeSetPartitionId::Mutator)],
_leftmosts_empty[int(ShenandoahFreeSetPartitionId::Collector)],
_rightmosts_empty[int(ShenandoahFreeSetPartitionId::Collector)]);

log_debug(gc)("%6s: %18s %18s %18s", "index", "Mutator Bits", "Collector Bits", "NotFree Bits");
dump_bitmap_range(0, _max-1);
}

Expand All @@ -83,8 +83,8 @@ void ShenandoahRegionPartitions::dump_bitmap_row(idx_t region_idx) const {
uintx collector_bits = _membership[int(ShenandoahFreeSetPartitionId::Collector)].bits_at(aligned_idx);
uintx free_bits = mutator_bits | collector_bits;
uintx notfree_bits = ~free_bits;
log_info(gc)(SSIZE_FORMAT_W(6) ": " SIZE_FORMAT_X_0 " 0x" SIZE_FORMAT_X_0 " 0x" SIZE_FORMAT_X_0,
aligned_idx, mutator_bits, collector_bits, notfree_bits);
log_debug(gc)(SSIZE_FORMAT_W(6) ": " SIZE_FORMAT_X_0 " 0x" SIZE_FORMAT_X_0 " 0x" SIZE_FORMAT_X_0,
aligned_idx, mutator_bits, collector_bits, notfree_bits);
}
#endif

Expand Down Expand Up @@ -1060,8 +1060,8 @@ void ShenandoahFreeSet::move_regions_from_collector_to_mutator(size_t max_xfer_r
}

size_t collector_xfer = collector_empty_xfer + collector_not_empty_xfer;
log_info(gc)("At start of update refs, moving " SIZE_FORMAT "%s to Mutator free partition from Collector Reserve",
byte_size_in_proper_unit(collector_xfer), proper_unit_for_byte_size(collector_xfer));
log_info(gc, ergo)("At start of update refs, moving " SIZE_FORMAT "%s to Mutator free partition from Collector Reserve",
byte_size_in_proper_unit(collector_xfer), proper_unit_for_byte_size(collector_xfer));
}

void ShenandoahFreeSet::prepare_to_rebuild(size_t &cset_regions) {
Expand Down

3 comments on commit f35af71

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@earthling-amzn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport shenandoah-jdk21u

@openjdk
Copy link

@openjdk openjdk bot commented on f35af71 Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@earthling-amzn Could not automatically backport f35af717 to openjdk/shenandoah-jdk21u due to conflicts in the following files:

  • src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/shenandoah-jdk21u. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/shenandoah-jdk21u.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-earthling-amzn-f35af717-master

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git f35af7171213c09107b99104a73022853bff91b0

# Backport the commit
$ git cherry-pick --no-commit f35af7171213c09107b99104a73022853bff91b0
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport f35af7171213c09107b99104a73022853bff91b0'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/shenandoah-jdk21u with the title Backport f35af7171213c09107b99104a73022853bff91b0.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit f35af717 from the openjdk/jdk repository.

The commit being backported was authored by Kelvin Nilsen on 26 Jul 2024 and was reviewed by William Kemper, Y. Srinivas Ramakrishna and Aleksey Shipilev.

Thanks!

Please sign in to comment.