Repository navigation
Fix setting of DacpHeapSegmentData::highAllocMark on DAC side. - #69670
Conversation
|
Tagging subscribers to this area: @tommcdon Issue DetailsFix setting of DacpHeapSegmentData::highAllocMark on DAC side. Keep some logic for backward compat in dacprivate.h, the copy here and the one in the Diagnostics repo, so that a new SOS can work correctly with an older DAC. The PR in the diagnostics repo is this: dotnet/diagnostics#3062
|
|
|
||
| heapSegment->highAllocMark = heapSegment->allocated; | ||
|
|
||
| if (heapSegment->next == NULL) |
There was a problem hiding this comment.
In the NoGCRegion case, I chained some additional regions after the allocating region, so it is possible for this check to miss the allocating region.
I think all these can be simplified to just check if heapSegment == ephemeral_heap_segment, that check should also work for regions.
There was a problem hiding this comment.
I think you are right on both counts - thanks for pointing it out!
| // if this is the start segment, set highAllocMark too. | ||
| if (SUCCEEDED(hr)) | ||
| // if this is the start segment, and the Dac hasn't set highAllocMark, set it here. | ||
| if (SUCCEEDED(hr) && this->highAllocMark == 0) |
There was a problem hiding this comment.
We probably want to update the copy on the diagnostics repo as well.
There was a problem hiding this comment.
Yes, I'll do that.
Fix setting of DacpHeapSegmentData::highAllocMark on DAC side. Keep some logic for backward compat in dacprivate.h, the copy here and the one in the Diagnostics repo, so that a new SOS can work correctly with an older DAC.
The PR in the diagnostics repo is this: dotnet/diagnostics#3062