On Phobos GC hunt
Dmitry Olshansky via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 8 00:52:36 PDT 2014
On Tuesday, 7 October 2014 at 21:59:08 UTC, Peter Alexander wrote:
> On Tuesday, 7 October 2014 at 20:13:32 UTC, Jacob Carlborg
> wrote:
>> I didn't look at any source code to see what "new" is actually
>> allocating, for example.
>
> I did some random sampling, and it's 90% exceptions, with the
> occasional array allocation.
>
That's interesting. I suspected around 50%. Well that's even
better since if we do ref-counted exceptions we solve 90% of
problem ;)
> I noticed that a lot of the ~ and ~= complaints are in code
> that only ever runs at compile time (generating strings for
> mixin). I wonder if there's any way we can silence these false
> positives.
I'm going to use blacklist for these as compiler can't in general
know if it is going to be used exclusively at CTFE or not.
Okay, I think I should go a bit futher with the second version
of the tool.
Things on todo list:
- make tool general enough to work for any GitHub based project
(and hackable for other hostings)
- use Brian's D parser to accurately find artifacts
- detect "throw new SomeStuff" pattern and automatically
populate potential fix line
- list all source links in one coulmn for the same function
(this needs proper parser)
- use blacklist of <module-name>:<artifact name> to filter out
CTFE
- use current data from wiki for "potential fix" column if
present
Holy grail is:
- plot DOT call-graph of GC-users, with leafs being the ones
reported by -vgc. So I start with this list then add functions
them, then functions that use these functions and so on.
More information about the Digitalmars-d
mailing list