Speed up simpleperf address matching
Currently, it takes 120 seconds for 2,000 Hz sampling, and it takes more than 5 minutes for 10,000 Hz sampling. This is slow because of the use of double loops. This can be avoided by using a hashmap (dict) and a single loop with a more lenient pattern matching. (ntfschr@'s idea) With this change, the address matching part takes < 1 second. Also, this adds some more logging to understand what is going on, and adds a test case around the address that was not recognized. Test: run_simpleperf_test covers this Test: output result looks correct. Bug: 1048428 Change-Id: I795c83133baeb07f8b78342d94e6d3b227eebd61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063811 Commit-Queue: Changwan Ryu <changwan@chromium.org> Reviewed-by:Nate Fischer <ntfschr@chromium.org> Reviewed-by:
Oksana Zhuravlova <oksamyt@chromium.org> Cr-Commit-Position: refs/heads/master@{#743196}
Showing
Please register or sign in to comment