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

use copy.hpp portability framework for specialized copy/fill operations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • hotspot
    • None
    • gc

      The HotSpot code base uses memset and memcpy in places where the C standard allows it to do so safely. But these functions are not safe for concurrent use, which means there is a long-term bug tail that arises from using them on concurrently visible data structures.

      For this reason, HotSpot has a utility, copy.hpp, which defines more predictable versions of memset and memcpy. This utility also has a portability framework which allows CPU-specific implementations as needed, for best performance.

      Maintaining this subtle kind of code requires a centralized point for managing such library functions, which in HotSpot is copy.hpp.

      For these reasons, the function memset_with_concurrent_readers_sparc needs to be moved out of its own little niche and into copy.hpp.

      Any similar specialized methods need similar centralization. I don't know of any other cases besides memset_with_concurrent_readers_sparc.

            Unassigned Unassigned
            jrose John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: