hotspot/src/share/vm/gc/shared/gcId.cpp
changeset 33229 51173444fdd5
parent 33152 6ad7fe735042
child 35061 be6025ebffea
equal deleted inserted replaced
33228:9a491d1be90f 33229:51173444fdd5
    58 GCIdMark::~GCIdMark() {
    58 GCIdMark::~GCIdMark() {
    59   currentNamedthread()->set_gc_id(GCId::undefined());
    59   currentNamedthread()->set_gc_id(GCId::undefined());
    60 }
    60 }
    61 
    61 
    62 GCIdMarkAndRestore::GCIdMarkAndRestore() : _gc_id(GCId::create()) {
    62 GCIdMarkAndRestore::GCIdMarkAndRestore() : _gc_id(GCId::create()) {
    63   _previous_gc_id = GCId::current(); // will assert that the GC Id is not undefined
    63   _previous_gc_id = GCId::current_raw();
    64   currentNamedthread()->set_gc_id(_gc_id);
    64   currentNamedthread()->set_gc_id(_gc_id);
    65 }
    65 }
    66 
    66 
    67 GCIdMarkAndRestore::GCIdMarkAndRestore(uint gc_id) : _gc_id(gc_id) {
    67 GCIdMarkAndRestore::GCIdMarkAndRestore(uint gc_id) : _gc_id(gc_id) {
    68   _previous_gc_id = GCId::current(); // will assert that the GC Id is not undefinied
    68   _previous_gc_id = GCId::current_raw();
    69   currentNamedthread()->set_gc_id(_gc_id);
    69   currentNamedthread()->set_gc_id(_gc_id);
    70 }
    70 }
    71 
    71 
    72 GCIdMarkAndRestore::~GCIdMarkAndRestore() {
    72 GCIdMarkAndRestore::~GCIdMarkAndRestore() {
    73   currentNamedthread()->set_gc_id(_previous_gc_id);
    73   currentNamedthread()->set_gc_id(_previous_gc_id);