New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enh] add -profile="gc" switch #4621
Conversation
Corresponding issue: |
The failure is another heisenbug, nothing to do with this PR. |
If you go on this page and click the 'deprecate' link it will re-run it. |
Where is that link? I can't find it. |
Yes, the "Deleted: 1" means that it has already been done (happens automatically when the branch is pushed to). Opening a more recent run should show the deprecate link. |
Makes sense. Thanks for the tip. |
noice |
Auto-merge toggled on |
[Enh] add -profile="gc" switch
@@ -1384,7 +1385,13 @@ elem *toElem(Expression *e, IRState *irs) | |||
else | |||
{ | |||
Symbol *csym = toSymbol(cd); | |||
ex = el_bin(OPcall,TYnptr,el_var(rtlsym[RTLSYM_NEWCLASS]),el_ptr(csym)); | |||
if (global.params.tracegc && ne->loc.filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When does a NewExpression
not have a location? It kind of defeats the point when some allocations aren't accounted for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes internally generated code doesn't have a location that would make any sense.
This is the start of a memory profiler, i.e. throw the switch and the compiler emits code to log all calls to allocate memory. This one only does it for calls to
new
a class. The following shows how it works: