Thread overview
[Issue 20960] -profile=gc does not track class objects allocated with new
Jun 20
Tim
June 20
https://issues.dlang.org/show_bug.cgi?id=20960

Tim <tim.dlang@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tim.dlang@t-online.de

--- Comment #1 from Tim <tim.dlang@t-online.de> ---
Try using dmd -lowmem. Without this flag dmd will not use the GC.

--
June 29
https://issues.dlang.org/show_bug.cgi?id=20960

--- Comment #2 from Andrei Alexandrescu <andrei@erdani.com> ---
Built dmd with -profile=gc -lowmem, no avail. Individual allocations of class objects are not present in the log.

--
June 29
https://issues.dlang.org/show_bug.cgi?id=20960

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86                         |All
                 OS|Mac OS X                    |All

--
June 29
https://issues.dlang.org/show_bug.cgi?id=20960

Stanislav Blinov <stanislav.blinov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stanislav.blinov@gmail.com

--- Comment #3 from Stanislav Blinov <stanislav.blinov@gmail.com> ---
(In reply to Andrei Alexandrescu from comment #2)
> Built dmd with -profile=gc -lowmem, no avail. Individual allocations of class objects are not present in the log.

Build with -profile=gc. *Run* with -lowmem :)

Excerpt from a log:

         524032            2047 dmd.mtype.TypeIdentifier
dmd.parse.Parser!(ASTCodegen).Parser.parseBasicType dmd/parse.d:3725
         479872            1304 dmd.dscope.Scope dmd.dscope.Scope.alloc
dmd/dscope.d:154
         377808             463 dmd.func.FuncDeclaration
dmd.parse.Parser!(ASTCodegen).Parser.parseDeclarations dmd/parse.d:4778
         162528            3386 dmd.expression.IdentifierExp
dmd.parse.Parser!(ASTCodegen).Parser.parsePrimaryExp dmd/parse.d:7679
         138752             271 dmd.dtemplate.TemplateInstance
dmd.parse.Parser!(ASTCodegen).Parser.parsePrimaryExp dmd/parse.d:7675
         124384             338 dmd.declaration.VarDeclaration
dmd.parse.Parser!(ASTCodegen).Parser.parseDeclarations dmd/parse.d:4830
         118528             463 dmd.mtype.TypeFunction
dmd.parse.Parser!(ASTCodegen).Parser.parseDeclarator dmd/parse.d:4172
         107456             292 dmd.declaration.VarDeclaration
dmd.parse.Parser!(ASTCodegen).Parser.parseAutoDeclarations dmd/parse.d:1265
         102816             126 dmd.func.UnitTestDeclaration
dmd.parse.Parser!(ASTCodegen).Parser.parseDeclDefs dmd/parse.d:663
          97152            1012 dmd.tokens.Token dmd.lexer.Lexer.allocateToken
dmd/lexer.d:299

--
June 29
https://issues.dlang.org/show_bug.cgi?id=20960

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Andrei Alexandrescu <andrei@erdani.com> ---
(In reply to Stanislav Blinov from comment #3)
> (In reply to Andrei Alexandrescu from comment #2)
> > Built dmd with -profile=gc -lowmem, no avail. Individual allocations of class objects are not present in the log.
> 
> Build with -profile=gc. *Run* with -lowmem :)

Awesome, thanks! I finally got it going. I will then close this.

--