[pypy-commit] stmgc c8-card-marking: make it compile
Raemi
noreply at buildbot.pypy.org
Thu Feb 26 21:46:46 CET 2015
Author: Remi Meier <remi.meier at gmail.com>
Branch: c8-card-marking
Changeset: r1669:9ccc9bf2dc2d
Date: 2015-02-26 14:51 +0100
http://bitbucket.org/pypy/stmgc/changeset/9ccc9bf2dc2d/
Log: make it compile
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -576,6 +576,11 @@
}
+void _stm_write_slowpath_card(object_t *obj, uintptr_t index)
+{
+ stm_write(obj);
+}
+
void _stm_write_slowpath(object_t *obj)
{
assert(_seems_to_be_running_transaction());
diff --git a/c8/stm/core.h b/c8/stm/core.h
--- a/c8/stm/core.h
+++ b/c8/stm/core.h
@@ -38,8 +38,10 @@
GCFLAG_WRITE_BARRIER = _STM_GCFLAG_WRITE_BARRIER,
GCFLAG_HAS_SHADOW = 0x02,
GCFLAG_WB_EXECUTED = 0x04,
- GCFLAG_VISITED = 0x08,
- GCFLAG_FINALIZATION_ORDERING = 0x10,
+ GCFLAG_HAS_CARDS = 0x08,
+ GCFLAG_CARDS_SET = _STM_GCFLAG_CARDS_SET,
+ GCFLAG_VISITED = 0x20,
+ GCFLAG_FINALIZATION_ORDERING = 0x40,
};
@@ -72,6 +74,7 @@
struct list_s *modified_old_objects;
struct list_s *objects_pointing_to_nursery;
+ struct list_s *old_objects_with_cards_set;
struct tree_s *young_outside_nursery;
struct tree_s *nursery_objects_shadows;
diff --git a/c8/stm/misc.c b/c8/stm/misc.c
--- a/c8/stm/misc.c
+++ b/c8/stm/misc.c
@@ -42,6 +42,11 @@
return (obj->stm_flags & _STM_GCFLAG_WRITE_BARRIER) == 0;
}
+bool _stm_was_written_card(object_t *obj)
+{
+ return obj->stm_flags & _STM_GCFLAG_CARDS_SET;
+}
+
long _stm_count_cl_entries()
{
struct stm_commit_log_entry_s *cl = &commit_log_root;
@@ -80,6 +85,13 @@
return list_count(STM_PSEGMENT->objects_pointing_to_nursery);
}
+long _stm_count_old_objects_with_cards_set(void)
+{
+ if (STM_PSEGMENT->old_objects_with_cards_set == NULL)
+ return -1;
+ return list_count(STM_PSEGMENT->old_objects_with_cards_set);
+}
+
object_t *_stm_enum_modified_old_objects(long index)
{
return (object_t *)list_item(
@@ -92,6 +104,13 @@
STM_PSEGMENT->objects_pointing_to_nursery, index);
}
+object_t *_stm_enum_old_objects_with_cards_set(long index)
+{
+ return (object_t *)list_item(
+ STM_PSEGMENT->old_objects_with_cards_set, index);
+}
+
+
static struct stm_commit_log_entry_s *_last_cl_entry;
static long _last_cl_entry_index;
void _stm_start_enum_last_cl_entry()
diff --git a/c8/stm/setup.c b/c8/stm/setup.c
--- a/c8/stm/setup.c
+++ b/c8/stm/setup.c
@@ -104,6 +104,7 @@
pr->young_weakrefs = list_create();
pr->old_weakrefs = list_create();
pr->objects_pointing_to_nursery = list_create();
+ pr->old_objects_with_cards_set = list_create();
pr->young_outside_nursery = tree_create();
pr->nursery_objects_shadows = tree_create();
pr->callbacks_on_commit_and_abort[0] = tree_create();
@@ -147,6 +148,7 @@
struct stm_priv_segment_info_s *pr = get_priv_segment(i);
assert(list_is_empty(pr->objects_pointing_to_nursery));
list_free(pr->objects_pointing_to_nursery);
+ list_free(pr->old_objects_with_cards_set);
list_free(pr->modified_old_objects);
assert(list_is_empty(pr->new_objects));
list_free(pr->new_objects);
diff --git a/c8/stmgc.h b/c8/stmgc.h
--- a/c8/stmgc.h
+++ b/c8/stmgc.h
@@ -73,7 +73,7 @@
} stm_thread_local_t;
#define _STM_GCFLAG_WRITE_BARRIER 0x01
-#define _STM_GCFLAG_CARDS_SET 0x08
+#define _STM_GCFLAG_CARDS_SET 0x10
#define _STM_FAST_ALLOC (66*1024)
#define _STM_NSE_SIGNAL_ABORT 1
#define _STM_NSE_SIGNAL_MAX 2
More information about the pypy-commit
mailing list