Skip to content

Add defaulted-off option to gate madvise'ing sampled allocations. - #545

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_968641102
Draft

Add defaulted-off option to gate madvise'ing sampled allocations.#545
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_968641102

Conversation

@copybara-service

Copy link
Copy Markdown

Add defaulted-off option to gate madvise'ing sampled allocations.

Due to allocation reuse, we may trend towards the entire allocation being
resident over time, even if it is not used. Consider:

  • Allocate 256KB. Write to it in its entirety. Free it.
  • Allocate 256KB again. Write to the first 128KB.

Our residency telemetry will show the second allocation as fully resident, and
many of those bytes (the upper half) as inactive. Our resident and zero
telemetry is better equipped if it can answer accurately about the live
allocation being profiled rather than the history of the address space.

Due to allocation reuse, we may trend towards the entire allocation being
resident over time, even if it is not used.  Consider:
* Allocate 256KB.  Write to it in its entirety.  Free it.
* Allocate 256KB again.  Write to the first 128KB.

Our residency telemetry will show the second allocation as fully resident, and
many of those bytes (the upper half) as inactive.  Our resident and zero
telemetry is better equipped if it can answer accurately about the live
allocation being profiled rather than the history of the address space.

PiperOrigin-RevId: 968641102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant