Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253014

OopStorage bulk release logs entries multiple times

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b18

      Description

      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.)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: