Export GC Usage Statistics on Request for Profiling

Jack Stouffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 15 09:21:15 PDT 2016


On Friday, 15 July 2016 at 16:14:39 UTC, tcak wrote:
> It is great to see memory usage on Xcode while running an iOS 
> app.
>
> What I thought is that:
>
> 1. GC knows available heap memory locations and their length.
> 2. GC can detect what parts of heap is in use.
> 3. A program can create a file to write (stdout, stderr, etc.)
>
>
> So, when desired (e.g. use of a compiler flag), on runtime, GC 
> could write statistical information to a file descriptor every 
> time it runs. So, anyone could write a program to read that 
> information to turn it into a graphical chart for profiling 
> information.
>
> Does GC have any support to collect this type of information 
> currently?

Do you know about --profile=gc?


More information about the Digitalmars-d mailing list