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

NMT should allow to repaint memory with different tags

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • hotspot

      Ran into this while working on JDK-8330174.

      NMT cannot handle ReservedSpace::partition(). I prefer that API over first_part/last_part because it leads to clearer code and expresses what I need to do.

      To make matters worse, with os::map_memory we require a valid tag. There is no way to specify "just use whatever tag the memory is already tagged with". Or, alternatively, "I know I remap existing mappings (or parts thereof) and that is okay". No, mapping with os::reserve_memory and then remapping part of that with os::map_memory makes NMT assert if os::map_memory uses a different tag.

      A "repaint" API would be most useful, simple, and versatile - the ability to re-tag existing memory ranges in NMT with different tags without having to jump through these ridiculous loopholes to appease NMT for something that is perfectly valid to do on the OS side of things.

      (I hope things get better once we migrated to VMATree)

            Unassigned Unassigned
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: