[memprof] Filter out callstack frames which cannot be symbolized.
authorSnehasish Kumar <snehasishk@google.com>
Thu, 3 Mar 2022 01:28:09 +0000 (17:28 -0800)
committerSnehasish Kumar <snehasishk@google.com>
Fri, 4 Mar 2022 19:10:08 +0000 (11:10 -0800)
commit11314f405903482c5a09e29922db80305e7c20d4
tree11817fd4df72b3ee1251d3f2345e46f2a7f8d803
parent76ec69a911c696feb9d315fa8335406556718e89
[memprof] Filter out callstack frames which cannot be symbolized.

This patch filters out callstack frames which can't be symbolized or if
the frames belong to the runtime. Symbolization may not be possible if
debug information is unavailable or if the addresses are from a shared
library. For now we only support optimization of the main binary which
is statically linked to the compiler runtime.

Differential Revision: https://reviews.llvm.org/D120860
llvm/include/llvm/ProfileData/RawMemProfReader.h
llvm/lib/ProfileData/RawMemProfReader.cpp
llvm/test/tools/llvm-profdata/memprof-basic.test
llvm/test/tools/llvm-profdata/memprof-multi.test
llvm/unittests/ProfileData/MemProfTest.cpp