hotspot/src/share/vm/gc/g1/heapRegionType.hpp
changeset 33105 294e48b4f704
parent 32623 390a27af5657
child 36098 e056a98ac7ca
equal deleted inserted replaced
33104:a7c0f60a1294 33105:294e48b4f704
    26 #define SHARE_VM_GC_G1_HEAPREGIONTYPE_HPP
    26 #define SHARE_VM_GC_G1_HEAPREGIONTYPE_HPP
    27 
    27 
    28 #include "memory/allocation.hpp"
    28 #include "memory/allocation.hpp"
    29 
    29 
    30 #define hrt_assert_is_valid(tag) \
    30 #define hrt_assert_is_valid(tag) \
    31   assert(is_valid((tag)), err_msg("invalid HR type: %u", (uint) (tag)))
    31   assert(is_valid((tag)), "invalid HR type: %u", (uint) (tag))
    32 
    32 
    33 class HeapRegionType VALUE_OBJ_CLASS_SPEC {
    33 class HeapRegionType VALUE_OBJ_CLASS_SPEC {
    34 private:
    34 private:
    35   // We encode the value of the heap region type so the generation can be
    35   // We encode the value of the heap region type so the generation can be
    36   // determined quickly. The tag is split into two parts:
    36   // determined quickly. The tag is split into two parts:
    95   // transition.
    95   // transition.
    96   void set_from(Tag tag, Tag before) {
    96   void set_from(Tag tag, Tag before) {
    97     hrt_assert_is_valid(tag);
    97     hrt_assert_is_valid(tag);
    98     hrt_assert_is_valid(before);
    98     hrt_assert_is_valid(before);
    99     hrt_assert_is_valid(_tag);
    99     hrt_assert_is_valid(_tag);
   100     assert(_tag == before,
   100     assert(_tag == before, "HR tag: %u, expected: %u new tag; %u", _tag, before, tag);
   101            err_msg("HR tag: %u, expected: %u new tag; %u", _tag, before, tag));
       
   102     _tag = tag;
   101     _tag = tag;
   103   }
   102   }
   104 
   103 
   105 public:
   104 public:
   106   // Queries
   105   // Queries