Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-25 Thread Richard Biener
On Mon, Mar 25, 2019 at 1:25 PM Richard Biener wrote: > > On Fri, Mar 22, 2019 at 10:22 AM Otto, Thomas wrote: > > > > > > And I still think this function and the static variable which never > > > > changes > > > > once set does not require any GC. Just setting the cached_wd variable to > > > >

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-25 Thread Richard Biener
On Fri, Mar 22, 2019 at 10:22 AM Otto, Thomas wrote: > > > > And I still think this function and the static variable which never > > > changes > > > once set does not require any GC. Just setting the cached_wd variable to > > > the unchanged pointer from get_src_pwd() or allocating one in the fun

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-22 Thread Otto, Thomas
> > And I still think this function and the static variable which never changes > > once set does not require any GC. Just setting the cached_wd variable to > > the unchanged pointer from get_src_pwd() or allocating one in the function > > itself is enough. This solves the problem and relieves th

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-21 Thread Richard Biener
On Thu, Mar 21, 2019 at 1:38 PM Otto, Thomas wrote: > > > > > > > > "ggc_collect() discarding/reusing remap_debug_filename() output, > > > > > > > thus producing invalid objects" > > > > > > > > > > > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () > > > > > > result survives.

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-21 Thread Otto, Thomas
> > > > > > "ggc_collect() discarding/reusing remap_debug_filename() output, > > > > > > thus producing invalid objects" > > > > > > > > > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () > > > > > result survives. I vaguely remember GC being happy with heap > > > > > strings (d

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-21 Thread Richard Biener
On Wed, Mar 20, 2019 at 7:36 PM Otto, Thomas wrote: > > > > > > "ggc_collect() discarding/reusing remap_debug_filename() output, > > > > > thus producing invalid objects" > > > > > > > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () > > > > result survives. I vaguely remember

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-20 Thread Otto, Thomas
> > > > "ggc_collect() discarding/reusing remap_debug_filename() output, > > > > thus producing invalid objects" > > > > > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () > > > result survives. I vaguely remember GC being happy with heap > > > strings (due to identifiers?), but

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-20 Thread Richard Biener
On Wed, Mar 20, 2019 at 2:44 PM Otto, Thomas wrote > > > > "ggc_collect() discarding/reusing remap_debug_filename() output, thus > > > producing invalid objects" > > > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () result > > survives. I vaguely remember GC being happy with h

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-20 Thread Otto, Thomas
> > "ggc_collect() discarding/reusing remap_debug_filename() output, thus > > producing invalid objects" > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () result > survives. I vaguely remember GC being happy with heap strings (due to > identifiers?), but not sure. Otherwise t

Re: [PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-20 Thread Richard Biener
On Wed, Mar 20, 2019 at 10:36 AM Otto, Thomas wrote: > > See the corresponding thread on gcc-help: > > "ggc_collect() discarding/reusing remap_debug_filename() output, thus > producing invalid objects" Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () result survives. I vaguely

[PATCH] make ggc pick up comp_dir_string() cache value. (dwarf2out.c)

2019-03-20 Thread Otto, Thomas
See the corresponding thread on gcc-help: "ggc_collect() discarding/reusing remap_debug_filename() output, thus producing invalid objects" Regards Thomas make-ggc-pick-up-comp_dir_string-cache-value.patch Description: make-ggc-pick-up-comp_dir_string-cache-value.patch