[XRay] cache symbolized function names for a repeatedly queried function ID
authorMartin Pelikan <martin.pelikan@gmail.com>
Thu, 1 Mar 2018 01:59:24 +0000 (01:59 +0000)
committerMartin Pelikan <martin.pelikan@gmail.com>
Thu, 1 Mar 2018 01:59:24 +0000 (01:59 +0000)
commit86ed8e58306dbb6f7a52508f2641f12877e2e01b
tree868153858783ca60d7a07ee68f65d6d1bca53e2d
parent811343cfd8bb8dfbd4756bed3f3ecda2cf407fad
[XRay] cache symbolized function names for a repeatedly queried function ID

Summary:
Processing 2 GB XRay traces with "llvm-xray convert -symbolize" needs to
go over each trace record and symbolize the function name refered to by
its ID.  Currently this happens by asking the LLVM symbolizer code every
single time.  A simple cache can save around 30 minutes of processing of
that trace.

llvm-xray's resident memory usage increased negligibly with this cache.

Reviewers: dberris

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D43896

llvm-svn: 326407
llvm/tools/llvm-xray/func-id-helper.cc
llvm/tools/llvm-xray/func-id-helper.h