diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-10-22 10:22:56 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-10-22 16:32:30 +0200 |
commit | d6a26e26505ec1f6810c6b749129a79ba0931742 (patch) | |
tree | 4fe513bbf1165bf89145f43f2bf33d0f853dbb32 /sal | |
parent | 42865108702f80a829513aef8f45965c508d0a74 (diff) |
cache negative addr2line hits
Otherwise we'd be trying to resolve unknown symbols repeatedly.
Change-Id: I1c1eb9f97a1f64436ad0858ceff75fa29343979a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124053
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/backtraceapi.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx index b372a500f7f0..3022be8dd829 100644 --- a/sal/osl/unx/backtraceapi.cxx +++ b/sal/osl/unx/backtraceapi.cxx @@ -161,7 +161,13 @@ void process_file_addr2line( const char* file, std::vector<FrameData>& frameData OString function = lines[linesPos]; OString source = lines[linesPos+1]; linesPos += 2; - if(!function.isEmpty() && !function.startsWith("??")) + if(function.isEmpty() || function.startsWith("??")) + { + // Cache that the address cannot be resolved. + std::lock_guard guard(frameCacheMutex); + frameCache.insert( { frame.addr, "" } ); + } + else { if( source.startsWith("??")) frame.info = function + " in " + file; |