On 12/07/15 17:45, Tom de Vries wrote:
Hi,
this patch series implements the forbidding of multi-step garbage
collection liveness dependencies between caches.
The first four patches downgrade 3 caches to non-cache, since they
introduce multi-step dependencies. This allows us to decouple:
- establishing a policy for multi-step dependencies in caches, and
- fixing issues that allow us to use these 3 as caches again.
1. Downgrade debug_args_for_decl to non-cache
2. Add struct tree_decl_map_hasher
3. Downgrade debug_expr_for_decl to non-cache
4. Downgrade value_expr_for_decl to non-cache
5. Don't mark live recursively in gt_cleare_cache
Bootstrapped and reg-tested on x86_64, with ENABLE_CHECKING.
I'll post the patches in response to this email.
This patch downgrades debug_expr_for_decl to non-cache.
OK for trunk?
Thanks,
- Tom
[PATCH 3/5] Downgrade debug_expr_for_decl to non-cache
Without this patch, but with patch "Don't mark live recursively in
gt_cleare_cache" when compiling libgcov-driver.c -m32 we run into:
...
0x133f37e void gt_cleare_cache<tree_decl_map_cache_hasher>(hash_table<tree_decl_map_cache_hasher, xcallocator>*)
/home/vries/gcc_versions/devel/src/gcc/hash-table.h:1114
0x133bfdb gt_clear_caches_gt_tree_h()
./gt-tree.h:475
0x6c8d0f gt_clear_caches()
./gtype-c.h:151
0xa8ef1e ggc_mark_roots()
/home/vries/gcc_versions/devel/src/gcc/ggc-common.c:103
0x7f7bfe ggc_collect()
/home/vries/gcc_versions/devel/src/gcc/ggc-page.c:2183
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
...
The offending cache entry is:
....
(gdb) call debug_generic_expr ( (*iter).base.from )
cur_ent$0
(gdb) call debug_generic_expr ( (*iter).to )
cur_ent[0]
...
2015-07-10 Tom de Vries <t...@codesourcery.com>
PR libgomp/66714
* tree.c (debug_expr_for_decl): Use tree_decl_map_hasher
instead of tree_decl_map_cache_hasher. Don't use cache GTY attribute.
(init_ttree): Allocate debug_expr_for_decl using new type.
---
gcc/tree.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gcc/tree.c b/gcc/tree.c
index 5e27e48..6038fff 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -245,8 +245,13 @@ static GTY ((cache)) hash_table<cl_option_hasher> *cl_option_hash_table;
/* General tree->tree mapping structure for use in hash tables. */
+/* TODO: Figure out whether we can declare debug_expr_for_decl as:
static GTY ((cache))
hash_table<tree_decl_map_cache_hasher> *debug_expr_for_decl;
+*/
+
+static GTY (())
+ hash_table<tree_decl_map_hasher> *debug_expr_for_decl;
static GTY ((cache))
hash_table<tree_decl_map_cache_hasher> *value_expr_for_decl;
@@ -659,7 +664,7 @@ init_ttree (void)
= hash_table<type_cache_hasher>::create_ggc (TYPE_HASH_INITIAL_SIZE);
debug_expr_for_decl
- = hash_table<tree_decl_map_cache_hasher>::create_ggc (512);
+ = hash_table<tree_decl_map_hasher>::create_ggc (512);
value_expr_for_decl
= hash_table<tree_decl_map_cache_hasher>::create_ggc (512);
--
1.9.1