Skip to content

Conversation

@s-kanev
Copy link
Contributor

@s-kanev s-kanev commented Aug 29, 2025

No description provided.

AddressMapper is a performance bottleneck when processing perf data with large number of mmap events, because the current implementation scans the existing mappings to find a place for new mapping. This change uses a heuristic to try to add a new range at the end of the list when the size of the list passing certain threshold. Essentially, the time complexity will change from O(N^2) to O(N*log(N)) when having a large number of mmaps (N >= 10K).

This CL also adds the test to make sure that when having a large number of mmaps, the parsing can finish in a reasonable time.

PiperOrigin-RevId: 786751094
@s-kanev s-kanev requested a review from Louis-Ye August 29, 2025 20:11
Copy link

@Louis-Ye Louis-Ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Louis-Ye Louis-Ye merged commit 085c54e into master Aug 29, 2025
3 checks passed
@s-kanev s-kanev deleted the copybara_staging branch August 29, 2025 20:31
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.

2 participants