OopStorage bulk release logs entries multiple times

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 16
    • Affects Version/s: 16
    • Component/s: hotspot
    • None
    • gc
    • b18

      When oopstorage+ref trace logging is enabled the bulk (2-arg) form of OopStorage::release will log each released entry at 2-3 times instead of the desired once. This can be fixed by removing one of the log statements:

      diff --git a/src/hotspot/share/gc/shared/oopStorage.cpp b/src/hotspot/share/gc/shared/oopStorage.cpp
      index 416afce7034..d701c3e8cba 100644
      --- a/src/hotspot/share/gc/shared/oopStorage.cpp
      +++ b/src/hotspot/share/gc/shared/oopStorage.cpp
      @@ -707,7 +707,6 @@ void OopStorage::release(const oop* const* ptrs, size_t size) {
           check_release_entry(ptrs[i]);
           Block* block = find_block_or_null(ptrs[i]);
           assert(block != NULL, "%s: invalid release " PTR_FORMAT, name(), p2i(ptrs[i]));
      - log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptrs[i]));
           size_t count = 0;
           uintx releasing = 0;
           for ( ; i < size; ++i) {

      (Thanks to Doug Simon for noticing this.)

            Assignee:
            Kim Barrett
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: