[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
Tue Jan 18 15:37:05 UTC 2022


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

--- Comment #4 from hsteoh at quickfur.ath.cx ---
Relevant code: druntime/src/rt/profilegc.d

The simplest fix I can think of is for the compiler to emit a call to some
druntime function that sets a flag indicating we need to create this file (so
that this doesn't trigger when *not* compiling with -profile=gc), then change
the if-condition in profilegc.~this to check this flag instead of
counts.length.

--


More information about the Digitalmars-d-bugs mailing list