Skip to content

fix(perfmap): support shared libraries (append to file)#6163

Merged
marxin merged 4 commits intomainfrom
fix-perfmap-with-modules
Feb 5, 2026
Merged

fix(perfmap): support shared libraries (append to file)#6163
marxin merged 4 commits intomainfrom
fix-perfmap-with-modules

Conversation

@marxin
Copy link
Copy Markdown
Contributor

@marxin marxin commented Feb 4, 2026

Noticed that when using multiple shared libraries, the /tmp/perf-{pid}.map file was being overwritten. Also, we don’t need to replicate addresses for unnamed symbols, and there’s no need to flush on every loop iteration.

@marxin marxin requested review from theduke and zebreus February 4, 2026 13:49
@marxin marxin requested a review from syrusakbary as a code owner February 4, 2026 13:49
Copilot AI review requested due to automatic review settings February 4, 2026 13:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates perfmap generation to better support scenarios where multiple shared libraries/modules are loaded into the same process, avoiding overwriting /tmp/perf-{pid}.map and reducing unnecessary work.

Changes:

  • Open /tmp/perf-{pid}.map in append mode (create if missing) instead of truncating on each call.
  • Only emit perfmap entries for functions that have an explicit name (skip unnamed).
  • Remove per-iteration flushing while writing perfmap entries.

@marxin marxin force-pushed the fix-perfmap-with-modules branch from 3852c2f to e8168b7 Compare February 5, 2026 06:55
@marxin marxin enabled auto-merge (squash) February 5, 2026 06:55
@marxin marxin merged commit e5b74d9 into main Feb 5, 2026
102 checks passed
@marxin marxin deleted the fix-perfmap-with-modules branch February 5, 2026 07:35
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.

3 participants