8236902: Shenandoah: Missing string dedup roots in all root scanner
Reviewed-by: rkennke
This commit is contained in:
parent
efc96d1c07
commit
b81bfcbff1
src/hotspot/share/gc/shenandoah
test/hotspot/jtreg/gc/shenandoah/jvmti
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2019, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2015, 2020, Red Hat, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
@ -226,6 +226,7 @@ private:
|
|||||||
ShenandoahThreadRoots _thread_roots;
|
ShenandoahThreadRoots _thread_roots;
|
||||||
ShenandoahCodeCacheRoots<ITR> _code_roots;
|
ShenandoahCodeCacheRoots<ITR> _code_roots;
|
||||||
ShenandoahVMRoots<false /*concurrent*/ > _vm_roots;
|
ShenandoahVMRoots<false /*concurrent*/ > _vm_roots;
|
||||||
|
ShenandoahStringDedupRoots _dedup_roots;
|
||||||
ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
|
ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
|
||||||
_cld_roots;
|
_cld_roots;
|
||||||
public:
|
public:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2019, 2020, Red Hat, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
@ -250,6 +250,9 @@ void ShenandoahRootScanner<ITR>::roots_do(uint worker_id, OopClosure* oops, CLDC
|
|||||||
if (code != NULL && !ShenandoahConcurrentScanCodeRoots) {
|
if (code != NULL && !ShenandoahConcurrentScanCodeRoots) {
|
||||||
_code_roots.code_blobs_do(code, worker_id);
|
_code_roots.code_blobs_do(code, worker_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AlwaysTrueClosure always_true;
|
||||||
|
_dedup_roots.oops_do(&always_true, oops, worker_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ITR>
|
template <typename ITR>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2018, 2020, Red Hat, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
@ -193,9 +193,6 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
_rp->roots_do(worker_id, &roots_cl, &cld_cl, &code_cl);
|
_rp->roots_do(worker_id, &roots_cl, &cld_cl, &code_cl);
|
||||||
}
|
}
|
||||||
|
|
||||||
AlwaysTrueClosure is_alive;
|
|
||||||
_dedup_roots.oops_do(&is_alive, &roots_cl, worker_id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2019, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2017, 2020, Red Hat, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
@ -40,6 +40,15 @@
|
|||||||
* @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:-UseCompressedOops TestHeapDump
|
* @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:-UseCompressedOops TestHeapDump
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test TestHeapDump
|
||||||
|
* @summary Tests JVMTI heap dumps
|
||||||
|
* @key gc
|
||||||
|
* @requires vm.gc.Shenandoah & !vm.graal.enabled
|
||||||
|
* @compile TestHeapDump.java
|
||||||
|
* @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:+UseStringDeduplication TestHeapDump
|
||||||
|
*/
|
||||||
|
|
||||||
import java.lang.ref.Reference;
|
import java.lang.ref.Reference;
|
||||||
|
|
||||||
public class TestHeapDump {
|
public class TestHeapDump {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user