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

convert SCAN_AND_FORWARD, SCAN_AND_ADJUST_POINTERS, SCAN_AND_COMPACT macros to methods

XMLWordPrintable

    • gc
    • b42
    • generic
    • generic

        There is no obvious reason why these are macros; especially the latter two. Here are the uses:

        $ ack SCAN_AND_FORWARD src/
        src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
        2099: SCAN_AND_FORWARD(cp,end,block_is_obj,block_size);

        src/share/vm/memory/space.cpp
        441: SCAN_AND_FORWARD(cp, end, block_is_obj, block_size);
        446: SCAN_AND_FORWARD(cp, top, block_is_always_obj, obj_size);

        src/share/vm/memory/space.hpp
        471:#define SCAN_AND_FORWARD(cp,scan_limit,block_is_obj,block_size) { \


        $ ack SCAN_AND_ADJUST_POINTERS src/
        src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
        2115: SCAN_AND_ADJUST_POINTERS(adjust_obj_size);

        src/share/vm/memory/space.cpp
        490: SCAN_AND_ADJUST_POINTERS(adjust_obj_size);

        src/share/vm/memory/space.hpp
        592:#define SCAN_AND_ADJUST_POINTERS(adjust_obj_size) { \


        $ ack SCAN_AND_COMPACT src/
        src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
        2120: SCAN_AND_COMPACT(obj_size);

        src/share/vm/memory/space.cpp
        494: SCAN_AND_COMPACT(obj_size);

        src/share/vm/memory/space.hpp
        658:#define SCAN_AND_COMPACT(obj_size) { \


        Making them (inline) methods would make it easier to read, change and debug this code.

              mlarsson Marcus Larsson (Inactive)
              twisti Christian Thalinger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: