Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lttng2.ust: use nm to resolve functions
Use nm to resolve functions names, source and line. Before this commit, the addr2line utility was often used to resolve symbols to function names, source code and line number when trace compass was able to identify the traced binary on the local machine. This was shown to be suboptimal when having to resolve a large number of symbols, because: - addr2line was called at least once per symbol; - the result of addr2line was stored in a cached data structure, and a slow cache trashing mechanism was executed once the cache was full. Due to the reasons above, trace compass was non-responsive, especially for Flame Chart or Function Stats views. Increasing cache size was improving performances, but still at the expenses of memory consumption. In addition, its cache size can be increased only when trace compass is started, which is not intuitive for the user. After this commit, the nm utility is used (executed once on the binary) to fill the debuginfo analysis SS. Then the debuginfo SS is queried before spawning an addr2line process. Due to the fact that nm is executed only once per binary, and that it can solve the great majority of symbols, multiple calls to addr2line are minimized and trace compass is much more responsive. Memory is also saved. [Added] use nm to resolve functions implicitly and keep results on disk. Change-Id: I9e562b0ac2d5fffc08390a0053df7ba2dbff307f Signed-off-by: Francesco Robino <francesco.robino@ericsson.com> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/195485 Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
- Loading branch information
1 parent
b90fbe6
commit 6463d29
Showing
5 changed files
with
247 additions
and
4 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