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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 21 11:58:04 UTC 2019


          Issue ID: 19601
           Summary: Running -profile=gc when no gc is logged leaves old
                    misleading file contents
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: john.burton at jbmail.com

Rather minor issue but might be easy to fix if it's agreed it's a bug and worth
the effort.

Using the following option on dmd :-


When the resulting executable file is run it logs GC operations to the file
profilegc.log However if no GC operations occurs during the run, then any
previous contents of that file is left unchanged which is misleading as the
file does not accurately reflect the result of the profiling (which should be
an empty file)

This caused me a small amount of confusion when I was trying to eliminate the
gc operations from some inner loop code and was trying to understand the
results once I'd managed to eliminate all the GC operations.

I would expect that it you've requested a gc profile and there is nothing for
the log that an empty file is produces or some indication that there is no GC
(or even the file is removed).


More information about the Digitalmars-d-bugs mailing list