[Issue 19601] Running -profile=gc when no gc is logged leaves old misleading file contents

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 8 11:04:48 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19601

Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tiberiulepadatu14 at gmail.com

--- Comment #2 from Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> ---
(In reply to John Burton from comment #1)
> It looks like the reason is this line :-
> https://github.com/dlang/druntime/blob/
> 424640864c2aa001731467e96f637bd3e704e481/src/rt/profilegc.d#L137
> 
> where it only creates the file if there is anything to write to it.
> It's not as simple as just removing the test though to "fix" as we
> presumably only want to do this if the user has requested the profile was
> made.

So we should test if the user has requested that the profile is made and then,
if there is nothing to write in the file just create the file?

--


More information about the Digitalmars-d-bugs mailing list