[pypy-commit] stmgc card-marking: Remove stmcb_should_use_cards().
arigo
noreply at buildbot.pypy.org
Mon Jun 30 12:07:34 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: card-marking
Changeset: r1260:74180517533a
Date: 2014-06-30 12:07 +0200
http://bitbucket.org/pypy/stmgc/changeset/74180517533a/
Log: Remove stmcb_should_use_cards().
diff --git a/c7/demo/demo2.c b/c7/demo/demo2.c
--- a/c7/demo/demo2.c
+++ b/c7/demo/demo2.c
@@ -43,10 +43,6 @@
n = (struct node_s*)obj;
visit((object_t **)&n->next);
}
-long stmcb_should_use_cards(struct object_s *obj)
-{
- return 0;
-}
void stmcb_get_card_base_itemsize(
struct object_s *obj, uintptr_t *base_offset, ssize_t *item_size)
{
diff --git a/c7/stm/core.c b/c7/stm/core.c
--- a/c7/stm/core.c
+++ b/c7/stm/core.c
@@ -232,10 +232,7 @@
REAL_ADDRESS(STM_SEGMENT->segment_base, obj);
size_t size = stmcb_size_rounded_up(realobj);
- if (size < _STM_MIN_CARD_OBJ_SIZE)
- return false;
-
- return !!stmcb_should_use_cards(realobj);
+ return (size >= _STM_MIN_CARD_OBJ_SIZE);
}
void _stm_write_slowpath_card(object_t *obj, uintptr_t index)
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -245,17 +245,13 @@
*/
extern ssize_t stmcb_size_rounded_up(struct object_s *);
extern void stmcb_trace(struct object_s *, void (object_t **));
-/* called to determine if we should use cards for this object.
- (makes most sense for big arrays with references) */
-extern long stmcb_should_use_cards(struct object_s *);
/* a special trace-callback that is only called for the marked
ranges of indices (using stm_write_card(o, index)) */
extern void stmcb_trace_cards(struct object_s *, void (object_t **),
uintptr_t start, uintptr_t stop);
-/* this function will be called on objects that support cards
- (stmcb_should_use_cards() returned True). It returns the
- base_offset (in bytes) inside the object from where the
- indices start, and item_size (in bytes) for the size of
+/* this function will be called on objects that support cards.
+ It returns the base_offset (in bytes) inside the object from
+ where the indices start, and item_size (in bytes) for the size of
one item */
extern void stmcb_get_card_base_itemsize(
struct object_s *, uintptr_t *base_offset, ssize_t *item_size);
diff --git a/c7/test/support.py b/c7/test/support.py
--- a/c7/test/support.py
+++ b/c7/test/support.py
@@ -328,14 +328,6 @@
*item_size = sizeof(object_t *);
}
-long stmcb_should_use_cards(struct object_s *obj)
-{
- struct myobj_s *myobj = (struct myobj_s*)obj;
- if (myobj->type_id < 421420)
- return 0; /*no refs*/
- return 1;
-}
-
void stm_push_marker(stm_thread_local_t *tl, uintptr_t onum, object_t *ob)
{
STM_PUSH_MARKER(*tl, onum, ob);
More information about the pypy-commit
mailing list