[PATCH] D108019: [NFC][llvm-xray] add a llvm-xray convert option `symbolize-no-demangle`
Enna1 via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 13 00:28:26 PDT 2021
Enna1 created this revision.
Enna1 added reviewers: dberris, MaskRay, smeenai.
Enna1 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When option `--symbolize` is true, llvm-xray convert will demangle function name on default.
This patch adds a llvm-xray convert option `symbolize-no-demangle` to determine whether to demangle function name when symbolize function ids from the input log
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108019
Files:
llvm/tools/llvm-xray/xray-converter.cpp
Index: llvm/tools/llvm-xray/xray-converter.cpp
===================================================================
--- llvm/tools/llvm-xray/xray-converter.cpp
+++ llvm/tools/llvm-xray/xray-converter.cpp
@@ -57,6 +57,11 @@
cl::init(false), cl::sub(Convert));
static cl::alias ConvertSymbolize2("y", cl::aliasopt(ConvertSymbolize),
cl::desc("Alias for -symbolize"));
+static cl::opt<bool>
+ ConvertSymbolizeDemangle("symbolize-demangle",
+ cl::desc("determines whether to demangle function name "
+ "when symbolize function ids from the input log"),
+ cl::init(true), cl::sub(Convert));
static cl::opt<std::string>
ConvertInstrMap("instr_map",
@@ -373,7 +378,9 @@
}
const auto &FunctionAddresses = Map.getFunctionAddresses();
- symbolize::LLVMSymbolizer Symbolizer;
+ symbolize::LLVMSymbolizer::Options SymbolizerOpts;
+ SymbolizerOpts.Demangle = ConvertSymbolizeDemangle;
+ symbolize::LLVMSymbolizer Symbolizer(SymbolizerOpts);
llvm::xray::FuncIdConversionHelper FuncIdHelper(ConvertInstrMap, Symbolizer,
FunctionAddresses);
llvm::xray::TraceConverter TC(FuncIdHelper, ConvertSymbolize);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108019.366200.patch
Type: text/x-patch
Size: 1295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210813/187297f8/attachment.bin>
More information about the llvm-commits
mailing list