Skip to content

Commit

Permalink
Serialize finalizer and obj-id tables processing
Browse files Browse the repository at this point in the history
The finalizer table needs to read observed object IDs, and must be
processed before the obj_to_id_table is processed.

Fixes: #101
  • Loading branch information
wks committed Sep 14, 2024
1 parent 89f6b52 commit 0ad226f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions mmtk/src/weak_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ impl WeakProcessor {
worker.scheduler().work_buckets[WorkBucketStage::VMRefClosure].bulk_add(vec![
Box::new(UpdateGenericIvTbl) as _,
// Box::new(UpdateFrozenStringsTable) as _,
Box::new(UpdateFinalizerTable) as _,
Box::new(UpdateObjIdTables) as _,
Box::new(UpdateFinalizerAndObjIdTable) as _,
// Box::new(UpdateGlobalSymbolsTable) as _,
Box::new(UpdateOverloadedCmeTable) as _,
Box::new(UpdateCiTable) as _,
Expand Down Expand Up @@ -271,12 +270,11 @@ define_global_table_processor!(UpdateFrozenStringsTable, {
(crate::upcalls().update_frozen_strings_table)()
});

define_global_table_processor!(UpdateFinalizerTable, {
(crate::upcalls().update_finalizer_table)()
});

define_global_table_processor!(UpdateObjIdTables, {
(crate::upcalls().update_obj_id_tables)()
define_global_table_processor!(UpdateFinalizerAndObjIdTable, {
// `update_finalizer_table` depends on the `obj_to_id_table`,
// therefore must be processed first.
(crate::upcalls().update_finalizer_table)();
(crate::upcalls().update_obj_id_tables)();
});

define_global_table_processor!(UpdateGlobalSymbolsTable, {
Expand Down

0 comments on commit 0ad226f

Please sign in to comment.