diff --git a/llvm/tools/llvm-xray/xray-account.cpp b/llvm/tools/llvm-xray/xray-account.cpp --- a/llvm/tools/llvm-xray/xray-account.cpp +++ b/llvm/tools/llvm-xray/xray-account.cpp @@ -34,23 +34,20 @@ AccountKeepGoing("keep-going", cl::desc("Keep going on errors encountered"), cl::sub(Account), cl::init(false)); static cl::alias AccountKeepGoing2("k", cl::aliasopt(AccountKeepGoing), - cl::desc("Alias for -keep_going"), - cl::sub(Account)); + cl::desc("Alias for -keep_going")); static cl::opt AccountDeduceSiblingCalls( "deduce-sibling-calls", cl::desc("Deduce sibling calls when unrolling function call stacks"), cl::sub(Account), cl::init(false)); static cl::alias AccountDeduceSiblingCalls2("d", cl::aliasopt(AccountDeduceSiblingCalls), - cl::desc("Alias for -deduce_sibling_calls"), - cl::sub(Account)); + cl::desc("Alias for -deduce_sibling_calls")); static cl::opt AccountOutput("output", cl::value_desc("output file"), cl::init("-"), cl::desc("output file; use '-' for stdout"), cl::sub(Account)); static cl::alias AccountOutput2("o", cl::aliasopt(AccountOutput), - cl::desc("Alias for -output"), - cl::sub(Account)); + cl::desc("Alias for -output")); enum class AccountOutputFormats { TEXT, CSV }; static cl::opt AccountOutputFormat("format", cl::desc("output format"), @@ -60,8 +57,7 @@ "report stats in csv")), cl::sub(Account)); static cl::alias AccountOutputFormat2("f", cl::desc("Alias of -format"), - cl::aliasopt(AccountOutputFormat), - cl::sub(Account)); + cl::aliasopt(AccountOutputFormat)); enum class SortField { FUNCID, @@ -88,8 +84,7 @@ clEnumValN(SortField::SUM, "sum", "sum of call durations"), clEnumValN(SortField::FUNC, "func", "function names"))); static cl::alias AccountSortOutput2("s", cl::aliasopt(AccountSortOutput), - cl::desc("Alias for -sort"), - cl::sub(Account)); + cl::desc("Alias for -sort")); enum class SortDirection { ASCENDING, @@ -101,14 +96,13 @@ clEnumValN(SortDirection::DESCENDING, "dsc", "descending")), cl::sub(Account)); static cl::alias AccountSortOrder2("r", cl::aliasopt(AccountSortOrder), - cl::desc("Alias for -sortorder"), - cl::sub(Account)); + cl::desc("Alias for -sortorder")); static cl::opt AccountTop("top", cl::desc("only show the top N results"), cl::value_desc("N"), cl::sub(Account), cl::init(-1)); static cl::alias AccountTop2("p", cl::desc("Alias for -top"), - cl::aliasopt(AccountTop), cl::sub(Account)); + cl::aliasopt(AccountTop)); static cl::opt AccountInstrMap("instr_map", @@ -117,8 +111,7 @@ cl::value_desc("binary with xray_instr_map"), cl::sub(Account), cl::init("")); static cl::alias AccountInstrMap2("m", cl::aliasopt(AccountInstrMap), - cl::desc("Alias for -instr_map"), - cl::sub(Account)); + cl::desc("Alias for -instr_map")); namespace { diff --git a/llvm/tools/llvm-xray/xray-converter.cpp b/llvm/tools/llvm-xray/xray-converter.cpp --- a/llvm/tools/llvm-xray/xray-converter.cpp +++ b/llvm/tools/llvm-xray/xray-converter.cpp @@ -43,23 +43,20 @@ "May be visualized with the Catapult trace viewer.")), cl::sub(Convert)); static cl::alias ConvertOutputFormat2("f", cl::aliasopt(ConvertOutputFormat), - cl::desc("Alias for -output-format"), - cl::sub(Convert)); + cl::desc("Alias for -output-format")); static cl::opt ConvertOutput("output", cl::value_desc("output file"), cl::init("-"), cl::desc("output file; use '-' for stdout"), cl::sub(Convert)); static cl::alias ConvertOutput2("o", cl::aliasopt(ConvertOutput), - cl::desc("Alias for -output"), - cl::sub(Convert)); + cl::desc("Alias for -output")); static cl::opt ConvertSymbolize("symbolize", cl::desc("symbolize function ids from the input log"), cl::init(false), cl::sub(Convert)); static cl::alias ConvertSymbolize2("y", cl::aliasopt(ConvertSymbolize), - cl::desc("Alias for -symbolize"), - cl::sub(Convert)); + cl::desc("Alias for -symbolize")); static cl::opt ConvertInstrMap("instr_map", @@ -68,15 +65,13 @@ cl::value_desc("binary with xray_instr_map"), cl::sub(Convert), cl::init("")); static cl::alias ConvertInstrMap2("m", cl::aliasopt(ConvertInstrMap), - cl::desc("Alias for -instr_map"), - cl::sub(Convert)); + cl::desc("Alias for -instr_map")); static cl::opt ConvertSortInput( "sort", cl::desc("determines whether to sort input log records by timestamp"), cl::sub(Convert), cl::init(true)); static cl::alias ConvertSortInput2("s", cl::aliasopt(ConvertSortInput), - cl::desc("Alias for -sort"), - cl::sub(Convert)); + cl::desc("Alias for -sort")); using llvm::yaml::Output; diff --git a/llvm/tools/llvm-xray/xray-extract.cpp b/llvm/tools/llvm-xray/xray-extract.cpp --- a/llvm/tools/llvm-xray/xray-extract.cpp +++ b/llvm/tools/llvm-xray/xray-extract.cpp @@ -38,15 +38,13 @@ cl::desc("output file; use '-' for stdout"), cl::sub(Extract)); static cl::alias ExtractOutput2("o", cl::aliasopt(ExtractOutput), - cl::desc("Alias for -output"), - cl::sub(Extract)); + cl::desc("Alias for -output")); static cl::opt ExtractSymbolize("symbolize", cl::value_desc("symbolize"), cl::init(false), cl::desc("symbolize functions"), cl::sub(Extract)); static cl::alias ExtractSymbolize2("s", cl::aliasopt(ExtractSymbolize), - cl::desc("alias for -symbolize"), - cl::sub(Extract)); + cl::desc("alias for -symbolize")); namespace { diff --git a/llvm/tools/llvm-xray/xray-graph-diff.cpp b/llvm/tools/llvm-xray/xray-graph-diff.cpp --- a/llvm/tools/llvm-xray/xray-graph-diff.cpp +++ b/llvm/tools/llvm-xray/xray-graph-diff.cpp @@ -41,22 +41,19 @@ cl::desc("Keep going on errors encountered"), cl::sub(GraphDiff), cl::init(false)); static cl::alias GraphDiffKeepGoingA("k", cl::aliasopt(GraphDiffKeepGoing), - cl::desc("Alias for -keep-going"), - cl::sub(GraphDiff)); + cl::desc("Alias for -keep-going")); static cl::opt GraphDiffKeepGoing1("keep-going-1", cl::desc("Keep going on errors encountered in trace 1"), cl::sub(GraphDiff), cl::init(false)); static cl::alias GraphDiffKeepGoing1A("k1", cl::aliasopt(GraphDiffKeepGoing1), - cl::desc("Alias for -keep-going-1"), - cl::sub(GraphDiff)); + cl::desc("Alias for -keep-going-1")); static cl::opt GraphDiffKeepGoing2("keep-going-2", cl::desc("Keep going on errors encountered in trace 2"), cl::sub(GraphDiff), cl::init(false)); static cl::alias GraphDiffKeepGoing2A("k2", cl::aliasopt(GraphDiffKeepGoing2), - cl::desc("Alias for -keep-going-2"), - cl::sub(GraphDiff)); + cl::desc("Alias for -keep-going-2")); static cl::opt GraphDiffInstrMap("instr-map", @@ -65,8 +62,7 @@ cl::value_desc("binary with xray_instr_map or yaml"), cl::sub(GraphDiff), cl::init("")); static cl::alias GraphDiffInstrMapA("m", cl::aliasopt(GraphDiffInstrMap), - cl::desc("Alias for -instr-map"), - cl::sub(GraphDiff)); + cl::desc("Alias for -instr-map")); static cl::opt GraphDiffInstrMap1("instr-map-1", cl::desc("binary with the instrumentation map, or " @@ -74,8 +70,7 @@ cl::value_desc("binary with xray_instr_map or yaml"), cl::sub(GraphDiff), cl::init("")); static cl::alias GraphDiffInstrMap1A("m1", cl::aliasopt(GraphDiffInstrMap1), - cl::desc("Alias for -instr-map-1"), - cl::sub(GraphDiff)); + cl::desc("Alias for -instr-map-1")); static cl::opt GraphDiffInstrMap2("instr-map-2", cl::desc("binary with the instrumentation map, or " @@ -83,8 +78,7 @@ cl::value_desc("binary with xray_instr_map or yaml"), cl::sub(GraphDiff), cl::init("")); static cl::alias GraphDiffInstrMap2A("m2", cl::aliasopt(GraphDiffInstrMap2), - cl::desc("Alias for -instr-map-2"), - cl::sub(GraphDiff)); + cl::desc("Alias for -instr-map-2")); static cl::opt GraphDiffDeduceSiblingCalls( "deduce-sibling-calls", @@ -92,22 +86,21 @@ cl::sub(GraphDiff), cl::init(false)); static cl::alias GraphDiffDeduceSiblingCallsA("d", cl::aliasopt(GraphDiffDeduceSiblingCalls), - cl::desc("Alias for -deduce-sibling-calls"), - cl::sub(GraphDiff)); + cl::desc("Alias for -deduce-sibling-calls")); static cl::opt GraphDiffDeduceSiblingCalls1( "deduce-sibling-calls-1", cl::desc("Deduce sibling calls when unrolling function call stacks"), cl::sub(GraphDiff), cl::init(false)); static cl::alias GraphDiffDeduceSiblingCalls1A( "d1", cl::aliasopt(GraphDiffDeduceSiblingCalls1), - cl::desc("Alias for -deduce-sibling-calls-1"), cl::sub(GraphDiff)); + cl::desc("Alias for -deduce-sibling-calls-1")); static cl::opt GraphDiffDeduceSiblingCalls2( "deduce-sibling-calls-2", cl::desc("Deduce sibling calls when unrolling function call stacks"), cl::sub(GraphDiff), cl::init(false)); static cl::alias GraphDiffDeduceSiblingCalls2A( "d2", cl::aliasopt(GraphDiffDeduceSiblingCalls2), - cl::desc("Alias for -deduce-sibling-calls-2"), cl::sub(GraphDiff)); + cl::desc("Alias for -deduce-sibling-calls-2")); static cl::opt GraphDiffEdgeLabel( "edge-label", cl::desc("Output graphs with edges labeled with this field"), @@ -130,8 +123,7 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphDiffEdgeLabelA("e", cl::aliasopt(GraphDiffEdgeLabel), - cl::desc("Alias for -edge-label"), - cl::sub(GraphDiff)); + cl::desc("Alias for -edge-label")); static cl::opt GraphDiffEdgeColor( "edge-color", cl::desc("Output graphs with edges colored by this field"), @@ -154,8 +146,7 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphDiffEdgeColorA("c", cl::aliasopt(GraphDiffEdgeColor), - cl::desc("Alias for -edge-color"), - cl::sub(GraphDiff)); + cl::desc("Alias for -edge-color")); static cl::opt GraphDiffVertexLabel( "vertex-label", @@ -179,8 +170,7 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphDiffVertexLabelA("v", cl::aliasopt(GraphDiffVertexLabel), - cl::desc("Alias for -vertex-label"), - cl::sub(GraphDiff)); + cl::desc("Alias for -vertex-label")); static cl::opt GraphDiffVertexColor( "vertex-color", @@ -204,24 +194,21 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphDiffVertexColorA("b", cl::aliasopt(GraphDiffVertexColor), - cl::desc("Alias for -vertex-color"), - cl::sub(GraphDiff)); + cl::desc("Alias for -vertex-color")); static cl::opt GraphDiffVertexLabelTrunc( "vertex-label-trun", cl::desc("What length to truncate vertex labels to "), cl::sub(GraphDiff), cl::init(40)); static cl::alias GraphDiffVertexLabelTrunc1("t", cl::aliasopt(GraphDiffVertexLabelTrunc), - cl::desc("Alias for -vertex-label-trun"), - cl::sub(GraphDiff)); + cl::desc("Alias for -vertex-label-trun")); static cl::opt GraphDiffOutput("output", cl::value_desc("Output file"), cl::init("-"), cl::desc("output file; use '-' for stdout"), cl::sub(GraphDiff)); static cl::alias GraphDiffOutputA("o", cl::aliasopt(GraphDiffOutput), - cl::desc("Alias for -output"), - cl::sub(GraphDiff)); + cl::desc("Alias for -output")); Expected GraphDiffRenderer::Factory::getGraphDiffRenderer() { GraphDiffRenderer R; diff --git a/llvm/tools/llvm-xray/xray-graph.cpp b/llvm/tools/llvm-xray/xray-graph.cpp --- a/llvm/tools/llvm-xray/xray-graph.cpp +++ b/llvm/tools/llvm-xray/xray-graph.cpp @@ -30,14 +30,13 @@ GraphKeepGoing("keep-going", cl::desc("Keep going on errors encountered"), cl::sub(GraphC), cl::init(false)); static cl::alias GraphKeepGoing2("k", cl::aliasopt(GraphKeepGoing), - cl::desc("Alias for -keep-going"), - cl::sub(GraphC)); + cl::desc("Alias for -keep-going")); static cl::opt GraphOutput("output", cl::value_desc("Output file"), cl::init("-"), cl::desc("output file; use '-' for stdout"), cl::sub(GraphC)); static cl::alias GraphOutput2("o", cl::aliasopt(GraphOutput), - cl::desc("Alias for -output"), cl::sub(GraphC)); + cl::desc("Alias for -output")); static cl::opt GraphInstrMap("instr_map", @@ -46,8 +45,7 @@ cl::value_desc("binary with xray_instr_map"), cl::sub(GraphC), cl::init("")); static cl::alias GraphInstrMap2("m", cl::aliasopt(GraphInstrMap), - cl::desc("alias for -instr_map"), - cl::sub(GraphC)); + cl::desc("alias for -instr_map")); static cl::opt GraphDeduceSiblingCalls( "deduce-sibling-calls", @@ -55,8 +53,7 @@ cl::sub(GraphC), cl::init(false)); static cl::alias GraphDeduceSiblingCalls2("d", cl::aliasopt(GraphDeduceSiblingCalls), - cl::desc("Alias for -deduce-sibling-calls"), - cl::sub(GraphC)); + cl::desc("Alias for -deduce-sibling-calls")); static cl::opt GraphEdgeLabel("edge-label", @@ -80,8 +77,7 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphEdgeLabel2("e", cl::aliasopt(GraphEdgeLabel), - cl::desc("Alias for -edge-label"), - cl::sub(GraphC)); + cl::desc("Alias for -edge-label")); static cl::opt GraphVertexLabel( "vertex-label", @@ -105,8 +101,7 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphVertexLabel2("v", cl::aliasopt(GraphVertexLabel), - cl::desc("Alias for -edge-label"), - cl::sub(GraphC)); + cl::desc("Alias for -edge-label")); static cl::opt GraphEdgeColorType( "color-edges", @@ -130,8 +125,7 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphEdgeColorType2("c", cl::aliasopt(GraphEdgeColorType), - cl::desc("Alias for -color-edges"), - cl::sub(GraphC)); + cl::desc("Alias for -color-edges")); static cl::opt GraphVertexColorType( "color-vertices", @@ -155,8 +149,7 @@ clEnumValN(GraphRenderer::StatType::SUM, "sum", "sum of call durations"))); static cl::alias GraphVertexColorType2("b", cl::aliasopt(GraphVertexColorType), - cl::desc("Alias for -edge-label"), - cl::sub(GraphC)); + cl::desc("Alias for -edge-label")); template T diff(T L, T R) { return std::max(L, R) - std::min(L, R); } diff --git a/llvm/tools/llvm-xray/xray-stacks.cpp b/llvm/tools/llvm-xray/xray-stacks.cpp --- a/llvm/tools/llvm-xray/xray-stacks.cpp +++ b/llvm/tools/llvm-xray/xray-stacks.cpp @@ -42,8 +42,7 @@ StackKeepGoing("keep-going", cl::desc("Keep going on errors encountered"), cl::sub(Stack), cl::init(false)); static cl::alias StackKeepGoing2("k", cl::aliasopt(StackKeepGoing), - cl::desc("Alias for -keep-going"), - cl::sub(Stack)); + cl::desc("Alias for -keep-going")); // TODO: Does there need to be an option to deduce tail or sibling calls? @@ -53,8 +52,7 @@ "Currently supports elf file instrumentation maps."), cl::sub(Stack), cl::init("")); static cl::alias StacksInstrMap2("m", cl::aliasopt(StacksInstrMap), - cl::desc("Alias for -instr_map"), - cl::sub(Stack)); + cl::desc("Alias for -instr_map")); static cl::opt SeparateThreadStacks("per-thread-stacks", @@ -72,8 +70,7 @@ "By default separates stacks per-thread."), cl::sub(Stack), cl::init(false)); static cl::alias DumpAllStacksShort("all", cl::aliasopt(DumpAllStacks), - cl::desc("Alias for -all-stacks"), - cl::sub(Stack)); + cl::desc("Alias for -all-stacks")); // TODO(kpw): Add other interesting formats. Perhaps chrome trace viewer format // possibly with aggregations or just a linear trace of timings.