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

adjust state_unloading_cycle compuation order in nmethod::is_unloading

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P5
    • 17
    • 17
    • hotspot
    • b22
    • generic
    • generic

    Description

      Move state_unloading_cycle computation after state_is_unloading checking in nmethod::is_unloading(). Avoiding useless state_unloading_cycle computation when state_is_unloading is true.

        uint8_t state = RawAccess<MO_RELAXED>::load(&_is_unloading_state);
        bool state_is_unloading = IsUnloadingState::is_unloading(state);
        uint8_t state_unloading_cycle = IsUnloadingState::unloading_cycle(state); // compute early, useless if stat_is_unloading is true.
        if (state_is_unloading) {
          return true;
        }
        uint8_t current_cycle = CodeCache::unloading_cycle();
        if (state_unloading_cycle == current_cycle) {
          return false;
        }

      Attachments

        Issue Links

          Activity

            People

              hshi Hui Shi
              hshi Hui Shi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: