forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak and use LocalUpdatableMaps for libunwindstack unwinder
We had a memory leak in our usage of libunwindstack unwinder. While reparsing maps we never clear() the |maps_| vector. Which should have been cleared given Maps::Parse() only adds new elements to the vector. Switching to LocalUpdatableMaps should fix the memory leak and it should be more efficient than clearing the |maps_| vector, since it will not invalidate the existing decompresssed unwind info. Cons of using LocalUpdatableMaps: - Uses locks which is not required for our use case in Chromium since we just unwind on StackSamplingProfiler thread only. - No rate limiting on re parsing maps. -- I plan to add an UMA Histogram to keep track of count of reparses in a session. Bug: 1418485, b/269239545 Change-Id: Iaac5d1a6fca0f1215c9286f214d39bdcb2273383 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4295821 Reviewed-by: Mike Wittman <wittman@chromium.org> Reviewed-by: Tushar Agarwal <agarwaltushar@google.com> Commit-Queue: Kartar Singh <kartarsingh@google.com> Reviewed-by: Tommy Nyquist <nyquist@chromium.org> Cr-Commit-Position: refs/heads/main@{#1112113}
- Loading branch information
Kartar Singh
authored and
Chromium LUCI CQ
committed
Mar 2, 2023
1 parent
42817f2
commit ae8dd65
Showing
9 changed files
with
106 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters