Skip to content
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

Fix issue 14892: std.array.array support for -profile=gc. #8361

Merged
merged 1 commit into from Jan 19, 2022

Conversation

quickfur
Copy link
Member

@quickfur quickfur commented Jan 18, 2022

Partial fix for -profile=gc to detect allocations from std.array.array.

This fix could be improved by propagating file/line/function info from user code down to arrayAllocImpl. But due to a limitation in IFTI, there's no clean way to do this without intrusive changes that have runtime costs when not compiling with -profile=gc. So leaving that for a future PR. We could at least get this fix in first to address the primary complaint in 14892 (allocations from std.array.array are not tracked). A more helpful file/line/function indication in the output is a further enhancement.

Depends on: dlang/dmd#13545, dlang/druntime#3681

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @quickfur!

Bugzilla references

Auto-close Bugzilla Severity Description
14892 enhancement -profile=gc doesn't account for GC API allocations

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8361"

@quickfur quickfur changed the title WIP: Fix issue 14892: std.array.array support for -profile=gc. Fix issue 14892: std.array.array support for -profile=gc. Jan 18, 2022
@RazvanN7 RazvanN7 merged commit 30de0aa into dlang:master Jan 19, 2022
@quickfur quickfur deleted the tracegc branch January 19, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement WIP Work In Progress - not ready for review or pulling
Projects
None yet
3 participants