27 |
27 |
28 #include "code/compressedStream.hpp" |
28 #include "code/compressedStream.hpp" |
29 #include "code/vmreg.hpp" |
29 #include "code/vmreg.hpp" |
30 #include "memory/allocation.hpp" |
30 #include "memory/allocation.hpp" |
31 #include "oops/oopsHierarchy.hpp" |
31 #include "oops/oopsHierarchy.hpp" |
32 #include "utilities/growableArray.hpp" |
|
33 |
32 |
34 // Interface for generating the frame map for compiled code. A frame map |
33 // Interface for generating the frame map for compiled code. A frame map |
35 // describes for a specific pc whether each register and frame stack slot is: |
34 // describes for a specific pc whether each register and frame stack slot is: |
36 // Oop - A GC root for current frame |
35 // Oop - A GC root for current frame |
37 // Dead - Dead; can be Zapped for debugging |
36 // Dead - Dead; can be Zapped for debugging |
431 // pointers are updated based on their base pointers new value and an offset. |
429 // pointers are updated based on their base pointers new value and an offset. |
432 #if COMPILER2_OR_JVMCI |
430 #if COMPILER2_OR_JVMCI |
433 class DerivedPointerTable : public AllStatic { |
431 class DerivedPointerTable : public AllStatic { |
434 friend class VMStructs; |
432 friend class VMStructs; |
435 private: |
433 private: |
436 static GrowableArray<DerivedPointerEntry*>* _list; |
434 class Entry; |
437 static bool _active; // do not record pointers for verify pass etc. |
435 static bool _active; // do not record pointers for verify pass etc. |
|
436 |
438 public: |
437 public: |
439 static void clear(); // Called before scavenge/GC |
438 static void clear(); // Called before scavenge/GC |
440 static void add(oop *derived, oop *base); // Called during scavenge/GC |
439 static void add(oop *derived, oop *base); // Called during scavenge/GC |
441 static void update_pointers(); // Called after scavenge/GC |
440 static void update_pointers(); // Called after scavenge/GC |
442 static bool is_empty() { return _list == NULL || _list->is_empty(); } |
441 static bool is_empty(); |
443 static bool is_active() { return _active; } |
442 static bool is_active() { return _active; } |
444 static void set_active(bool value) { _active = value; } |
443 static void set_active(bool value) { _active = value; } |
445 }; |
444 }; |
446 |
445 |
447 // A utility class to temporarily "deactivate" the DerivedPointerTable. |
446 // A utility class to temporarily "deactivate" the DerivedPointerTable. |