Skip to content

Commit 37e4376

Browse files
authored
Fix derived root pointers (#115)
1 parent 72f9990 commit 37e4376

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

mmtk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ lazy_static = "1.1"
2020
# - change branch
2121
# - change repo name
2222
# But other changes including adding/removing whitespaces in commented lines may break the CI.
23-
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "aec43e51c9dc737bd533f4db5106857b4ac19407" }
23+
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "08cecbc080cc853383fa96f54436b8ca8026b130" }
2424
# Uncomment the following to build locally
2525
# mmtk = { path = "../repos/mmtk-core" }
2626

mmtk/src/scanning.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub(crate) extern "C" fn create_process_edges_work<W: ProcessEdgesWork<VM = Open
2222
memory_manager::add_work_packet(
2323
&SINGLETON,
2424
WorkBucketStage::Closure,
25-
W::new(buf, false, &SINGLETON),
25+
W::new(buf, true, &SINGLETON),
2626
);
2727
}
2828
let (ptr, _, capacity) = Vec::with_capacity(W::CAPACITY).into_raw_parts();

openjdk/mmtkUpcalls.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ static size_t mmtk_start_the_world_count = 0;
4545
static void mmtk_stop_all_mutators(void *tls, void (*create_stack_scan_work)(void* mutator)) {
4646
MMTkHeap::_create_stack_scan_work = create_stack_scan_work;
4747

48+
ClassLoaderDataGraph::clear_claimed_marks();
49+
CodeCache::gc_prologue();
50+
#if COMPILER2_OR_JVMCI
51+
DerivedPointerTable::clear();
52+
#endif
53+
4854
log_debug(gc)("Requesting the VM to suspend all mutators...");
4955
MMTkHeap::heap()->companion_thread()->request(MMTkVMCompanionThread::_threads_suspended, true);
5056
log_debug(gc)("Mutators stopped. Now enumerate threads for scanning...");
@@ -59,6 +65,13 @@ static void mmtk_stop_all_mutators(void *tls, void (*create_stack_scan_work)(voi
5965
}
6066

6167
static void mmtk_resume_mutators(void *tls) {
68+
ClassLoaderDataGraph::purge();
69+
CodeCache::gc_epilogue();
70+
JvmtiExport::gc_epilogue();
71+
#if COMPILER2_OR_JVMCI
72+
DerivedPointerTable::update_pointers();
73+
#endif
74+
6275
MMTkHeap::_create_stack_scan_work = NULL;
6376

6477
log_debug(gc)("Requesting the VM to resume all mutators...");

0 commit comments

Comments
 (0)