PCH patch installed in my mainline tree, testing now
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Thu Apr 17 03:59:00 GMT 2003
In article <2FA8F235-7034-11D7-B03E-0030657EA24A@apple.com>,
Geoffrey Keating<geoffk@apple.com> writes:
> Yes, if a variable isn't live over a PCH dump or a GGC collection, it
> doesn't need to be marked. For example, print_indent doesn't need
> marking since it's used only while outputting a DIE and we don't dump
> PCH files half-way through outputting a DIE.
> By comparison, label_num in gen_internal_sym does need to be marked. I
> couldn't find any others.
Thanks for further detailing the PCH/GC rules. OK, that all makes
perfect sense to me. That is what I'd inferred from watching your
patches to fix PCH bugs. ;-)
>> Is this correct marking:
>> static GTY((length ("fde_table_allocated"))) dw_fde_ref fde_table;
>> static unsigned fde_table_allocated;
>>
>> ?
>>
>> Contrast to this case where the referenced length was also explicitly
>> marked:
>>
>> static GTY((length ("decl_die_table_allocated"))) dw_die_ref
>> *decl_die_table;
>> static GTY(()) unsigned decl_die_table_allocated;
> No, this is almost always wrong; they both need to be marked.
I have found more cases in the compiler where the length is not marked...
Does the length only need to be marked if the subject is related to PCH
and not merely GC?
>> I hope you don't mind the questions. I understand boehm-gc fairly
>> well but this is the first "static marking GC", I've seen. Feel free
>> to cut-n-paste and answer in public so others can see.
> Thanks for your suggestions, I'll make a patch and post it for testing.
Or, I'm happy to do the work on tweaking the last patch you sent me
further since I think I see what to do now. Is it possible to infer
where the unmarked PCH-related item is based on a backtrace? Here is
a representative crash I'm seeing on large tests in libstedc++-v3:
[...more frames within splay_tree_splay_helper() removed...]
#17 0x083c9714 in splay_tree_lookup (sp=0x85311c0, key=30)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/libiberty/splay-tree.c:409
#18 0x08148b54 in get_alias_set_entry (alias_set=30)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/alias.c:220
#19 0x08149fcd in record_alias_subset (superset=71, subset=30)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/alias.c:662
#20 0x0814a1be in record_component_aliases (type=0x2abe2648)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/alias.c:719
#21 0x08149823 in get_alias_set (t=0x2abe2648)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/alias.c:600
#22 0x0814a1b5 in record_component_aliases (type=0x2abe6b0c)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/alias.c:719
#23 0x08149823 in get_alias_set (t=0x2abe6b0c)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/alias.c:600
#24 0x081932d8 in set_mem_attributes_minus_bitpos (ref=0x2e2e6edc,
t=0x2854506c, objectp=1, bitpos=0)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/emit-rtl.c:1883
#25 0x08193ed6 in set_mem_attributes (ref=0x2e2e6edc, t=0x2854506c, objectp=1)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/emit-rtl.c:2082
#26 0x08337139 in make_decl_rtl (decl=0x2854506c, asmspec=0x0)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/varasm.c:928
#27 0x081b4f78 in expand_expr (exp=0x2854506c, target=0x0, tmode=VOIDmode,
modifier=EXPAND_INITIALIZER)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/expr.c:7084
#28 0x081b5b87 in expand_expr (exp=0x285a97a8, target=0x0, tmode=VOIDmode,
modifier=EXPAND_INITIALIZER)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/expr.c:9168
#29 0x0833dd35 in output_constant (exp=0x285a97a8, size=4, align=32)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/varasm.c:3958
#30 0x0833e647 in output_constructor (exp=0x1e, size=64, align=256)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/varasm.c:4241
#31 0x0833deb1 in output_constant (exp=0x285a4c60, size=64, align=256)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/varasm.c:3983
#32 0x0831a208 in rest_of_decl_compilation (decl=0x28545000, asmspec=0x0,
top_level=1, at_end=1)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/toplev.c:2322
#33 0x080c3f00 in maybe_emit_vtables (ctype=0x2854a804)
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/cp/decl2.c:1710
#34 0x080c57e1 in finish_file ()
at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/cp/decl2.c:2614
#35 0x080e5101 in yyparse ()
Regards,
Loren
More information about the Gcc
mailing list