Fix issue 14892: std.array.array support for -profile=gc. #8361
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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