8138717: TestGCEventMixedWithG1ConcurrentMark.java fails

Reviewed-by: jwilhelm, david
This commit is contained in:
Bengt Rutisson 2015-10-08 12:44:12 +02:00
parent 0ec56658ea
commit dbdf722879
4 changed files with 22 additions and 1 deletions

View file

@ -59,3 +59,11 @@ GCIdMark::~GCIdMark() {
currentNamedthread()->set_gc_id(GCId::undefined());
}
GCIdMarkAndRestore::GCIdMarkAndRestore() : _gc_id(GCId::create()) {
_previous_gc_id = GCId::current(); // will assert that the GC Id is not undefinied
currentNamedthread()->set_gc_id(_gc_id);
}
GCIdMarkAndRestore::~GCIdMarkAndRestore() {
currentNamedthread()->set_gc_id(_previous_gc_id);
}