1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[xray] Remove cl::sub from alias options

Currently running the xray tools generates a number of errors:

$ ./bin/llvm-xray
: for the   -k option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
: for the   -d option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
: for the   -o option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
: for the   -f option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
: for the   -s option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
: for the   -r option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
: for the   -p option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
: for the   -m option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
<snip>

Patch by Ryan Mansfield.

Differential Revision: https://reviews.llvm.org/D69386
This commit is contained in:
Shoaib Meenai 2020-01-09 22:02:57 -08:00
parent a2a8575704
commit 23da8b5fb5
6 changed files with 41 additions and 78 deletions

View File

@ -34,23 +34,20 @@ static cl::opt<bool>
AccountKeepGoing("keep-going", cl::desc("Keep going on errors encountered"), AccountKeepGoing("keep-going", cl::desc("Keep going on errors encountered"),
cl::sub(Account), cl::init(false)); cl::sub(Account), cl::init(false));
static cl::alias AccountKeepGoing2("k", cl::aliasopt(AccountKeepGoing), static cl::alias AccountKeepGoing2("k", cl::aliasopt(AccountKeepGoing),
cl::desc("Alias for -keep_going"), cl::desc("Alias for -keep_going"));
cl::sub(Account));
static cl::opt<bool> AccountDeduceSiblingCalls( static cl::opt<bool> AccountDeduceSiblingCalls(
"deduce-sibling-calls", "deduce-sibling-calls",
cl::desc("Deduce sibling calls when unrolling function call stacks"), cl::desc("Deduce sibling calls when unrolling function call stacks"),
cl::sub(Account), cl::init(false)); cl::sub(Account), cl::init(false));
static cl::alias static cl::alias
AccountDeduceSiblingCalls2("d", cl::aliasopt(AccountDeduceSiblingCalls), AccountDeduceSiblingCalls2("d", cl::aliasopt(AccountDeduceSiblingCalls),
cl::desc("Alias for -deduce_sibling_calls"), cl::desc("Alias for -deduce_sibling_calls"));
cl::sub(Account));
static cl::opt<std::string> static cl::opt<std::string>
AccountOutput("output", cl::value_desc("output file"), cl::init("-"), AccountOutput("output", cl::value_desc("output file"), cl::init("-"),
cl::desc("output file; use '-' for stdout"), cl::desc("output file; use '-' for stdout"),
cl::sub(Account)); cl::sub(Account));
static cl::alias AccountOutput2("o", cl::aliasopt(AccountOutput), static cl::alias AccountOutput2("o", cl::aliasopt(AccountOutput),
cl::desc("Alias for -output"), cl::desc("Alias for -output"));
cl::sub(Account));
enum class AccountOutputFormats { TEXT, CSV }; enum class AccountOutputFormats { TEXT, CSV };
static cl::opt<AccountOutputFormats> static cl::opt<AccountOutputFormats>
AccountOutputFormat("format", cl::desc("output format"), AccountOutputFormat("format", cl::desc("output format"),
@ -60,8 +57,7 @@ static cl::opt<AccountOutputFormats>
"report stats in csv")), "report stats in csv")),
cl::sub(Account)); cl::sub(Account));
static cl::alias AccountOutputFormat2("f", cl::desc("Alias of -format"), static cl::alias AccountOutputFormat2("f", cl::desc("Alias of -format"),
cl::aliasopt(AccountOutputFormat), cl::aliasopt(AccountOutputFormat));
cl::sub(Account));
enum class SortField { enum class SortField {
FUNCID, FUNCID,
@ -88,8 +84,7 @@ static cl::opt<SortField> AccountSortOutput(
clEnumValN(SortField::SUM, "sum", "sum of call durations"), clEnumValN(SortField::SUM, "sum", "sum of call durations"),
clEnumValN(SortField::FUNC, "func", "function names"))); clEnumValN(SortField::FUNC, "func", "function names")));
static cl::alias AccountSortOutput2("s", cl::aliasopt(AccountSortOutput), static cl::alias AccountSortOutput2("s", cl::aliasopt(AccountSortOutput),
cl::desc("Alias for -sort"), cl::desc("Alias for -sort"));
cl::sub(Account));
enum class SortDirection { enum class SortDirection {
ASCENDING, ASCENDING,
@ -101,14 +96,13 @@ static cl::opt<SortDirection> AccountSortOrder(
clEnumValN(SortDirection::DESCENDING, "dsc", "descending")), clEnumValN(SortDirection::DESCENDING, "dsc", "descending")),
cl::sub(Account)); cl::sub(Account));
static cl::alias AccountSortOrder2("r", cl::aliasopt(AccountSortOrder), static cl::alias AccountSortOrder2("r", cl::aliasopt(AccountSortOrder),
cl::desc("Alias for -sortorder"), cl::desc("Alias for -sortorder"));
cl::sub(Account));
static cl::opt<int> AccountTop("top", cl::desc("only show the top N results"), static cl::opt<int> AccountTop("top", cl::desc("only show the top N results"),
cl::value_desc("N"), cl::sub(Account), cl::value_desc("N"), cl::sub(Account),
cl::init(-1)); cl::init(-1));
static cl::alias AccountTop2("p", cl::desc("Alias for -top"), static cl::alias AccountTop2("p", cl::desc("Alias for -top"),
cl::aliasopt(AccountTop), cl::sub(Account)); cl::aliasopt(AccountTop));
static cl::opt<std::string> static cl::opt<std::string>
AccountInstrMap("instr_map", AccountInstrMap("instr_map",
@ -117,8 +111,7 @@ static cl::opt<std::string>
cl::value_desc("binary with xray_instr_map"), cl::value_desc("binary with xray_instr_map"),
cl::sub(Account), cl::init("")); cl::sub(Account), cl::init(""));
static cl::alias AccountInstrMap2("m", cl::aliasopt(AccountInstrMap), static cl::alias AccountInstrMap2("m", cl::aliasopt(AccountInstrMap),
cl::desc("Alias for -instr_map"), cl::desc("Alias for -instr_map"));
cl::sub(Account));
namespace { namespace {

View File

@ -43,23 +43,20 @@ static cl::opt<ConvertFormats> ConvertOutputFormat(
"May be visualized with the Catapult trace viewer.")), "May be visualized with the Catapult trace viewer.")),
cl::sub(Convert)); cl::sub(Convert));
static cl::alias ConvertOutputFormat2("f", cl::aliasopt(ConvertOutputFormat), static cl::alias ConvertOutputFormat2("f", cl::aliasopt(ConvertOutputFormat),
cl::desc("Alias for -output-format"), cl::desc("Alias for -output-format"));
cl::sub(Convert));
static cl::opt<std::string> static cl::opt<std::string>
ConvertOutput("output", cl::value_desc("output file"), cl::init("-"), ConvertOutput("output", cl::value_desc("output file"), cl::init("-"),
cl::desc("output file; use '-' for stdout"), cl::desc("output file; use '-' for stdout"),
cl::sub(Convert)); cl::sub(Convert));
static cl::alias ConvertOutput2("o", cl::aliasopt(ConvertOutput), static cl::alias ConvertOutput2("o", cl::aliasopt(ConvertOutput),
cl::desc("Alias for -output"), cl::desc("Alias for -output"));
cl::sub(Convert));
static cl::opt<bool> static cl::opt<bool>
ConvertSymbolize("symbolize", ConvertSymbolize("symbolize",
cl::desc("symbolize function ids from the input log"), cl::desc("symbolize function ids from the input log"),
cl::init(false), cl::sub(Convert)); cl::init(false), cl::sub(Convert));
static cl::alias ConvertSymbolize2("y", cl::aliasopt(ConvertSymbolize), static cl::alias ConvertSymbolize2("y", cl::aliasopt(ConvertSymbolize),
cl::desc("Alias for -symbolize"), cl::desc("Alias for -symbolize"));
cl::sub(Convert));
static cl::opt<std::string> static cl::opt<std::string>
ConvertInstrMap("instr_map", ConvertInstrMap("instr_map",
@ -68,15 +65,13 @@ static cl::opt<std::string>
cl::value_desc("binary with xray_instr_map"), cl::value_desc("binary with xray_instr_map"),
cl::sub(Convert), cl::init("")); cl::sub(Convert), cl::init(""));
static cl::alias ConvertInstrMap2("m", cl::aliasopt(ConvertInstrMap), static cl::alias ConvertInstrMap2("m", cl::aliasopt(ConvertInstrMap),
cl::desc("Alias for -instr_map"), cl::desc("Alias for -instr_map"));
cl::sub(Convert));
static cl::opt<bool> ConvertSortInput( static cl::opt<bool> ConvertSortInput(
"sort", "sort",
cl::desc("determines whether to sort input log records by timestamp"), cl::desc("determines whether to sort input log records by timestamp"),
cl::sub(Convert), cl::init(true)); cl::sub(Convert), cl::init(true));
static cl::alias ConvertSortInput2("s", cl::aliasopt(ConvertSortInput), static cl::alias ConvertSortInput2("s", cl::aliasopt(ConvertSortInput),
cl::desc("Alias for -sort"), cl::desc("Alias for -sort"));
cl::sub(Convert));
using llvm::yaml::Output; using llvm::yaml::Output;

View File

@ -38,15 +38,13 @@ static cl::opt<std::string>
cl::desc("output file; use '-' for stdout"), cl::desc("output file; use '-' for stdout"),
cl::sub(Extract)); cl::sub(Extract));
static cl::alias ExtractOutput2("o", cl::aliasopt(ExtractOutput), static cl::alias ExtractOutput2("o", cl::aliasopt(ExtractOutput),
cl::desc("Alias for -output"), cl::desc("Alias for -output"));
cl::sub(Extract));
static cl::opt<bool> ExtractSymbolize("symbolize", cl::value_desc("symbolize"), static cl::opt<bool> ExtractSymbolize("symbolize", cl::value_desc("symbolize"),
cl::init(false), cl::init(false),
cl::desc("symbolize functions"), cl::desc("symbolize functions"),
cl::sub(Extract)); cl::sub(Extract));
static cl::alias ExtractSymbolize2("s", cl::aliasopt(ExtractSymbolize), static cl::alias ExtractSymbolize2("s", cl::aliasopt(ExtractSymbolize),
cl::desc("alias for -symbolize"), cl::desc("alias for -symbolize"));
cl::sub(Extract));
namespace { namespace {

View File

@ -41,22 +41,19 @@ static cl::opt<bool>
cl::desc("Keep going on errors encountered"), cl::desc("Keep going on errors encountered"),
cl::sub(GraphDiff), cl::init(false)); cl::sub(GraphDiff), cl::init(false));
static cl::alias GraphDiffKeepGoingA("k", cl::aliasopt(GraphDiffKeepGoing), static cl::alias GraphDiffKeepGoingA("k", cl::aliasopt(GraphDiffKeepGoing),
cl::desc("Alias for -keep-going"), cl::desc("Alias for -keep-going"));
cl::sub(GraphDiff));
static cl::opt<bool> static cl::opt<bool>
GraphDiffKeepGoing1("keep-going-1", GraphDiffKeepGoing1("keep-going-1",
cl::desc("Keep going on errors encountered in trace 1"), cl::desc("Keep going on errors encountered in trace 1"),
cl::sub(GraphDiff), cl::init(false)); cl::sub(GraphDiff), cl::init(false));
static cl::alias GraphDiffKeepGoing1A("k1", cl::aliasopt(GraphDiffKeepGoing1), static cl::alias GraphDiffKeepGoing1A("k1", cl::aliasopt(GraphDiffKeepGoing1),
cl::desc("Alias for -keep-going-1"), cl::desc("Alias for -keep-going-1"));
cl::sub(GraphDiff));
static cl::opt<bool> static cl::opt<bool>
GraphDiffKeepGoing2("keep-going-2", GraphDiffKeepGoing2("keep-going-2",
cl::desc("Keep going on errors encountered in trace 2"), cl::desc("Keep going on errors encountered in trace 2"),
cl::sub(GraphDiff), cl::init(false)); cl::sub(GraphDiff), cl::init(false));
static cl::alias GraphDiffKeepGoing2A("k2", cl::aliasopt(GraphDiffKeepGoing2), static cl::alias GraphDiffKeepGoing2A("k2", cl::aliasopt(GraphDiffKeepGoing2),
cl::desc("Alias for -keep-going-2"), cl::desc("Alias for -keep-going-2"));
cl::sub(GraphDiff));
static cl::opt<std::string> static cl::opt<std::string>
GraphDiffInstrMap("instr-map", GraphDiffInstrMap("instr-map",
@ -65,8 +62,7 @@ static cl::opt<std::string>
cl::value_desc("binary with xray_instr_map or yaml"), cl::value_desc("binary with xray_instr_map or yaml"),
cl::sub(GraphDiff), cl::init("")); cl::sub(GraphDiff), cl::init(""));
static cl::alias GraphDiffInstrMapA("m", cl::aliasopt(GraphDiffInstrMap), static cl::alias GraphDiffInstrMapA("m", cl::aliasopt(GraphDiffInstrMap),
cl::desc("Alias for -instr-map"), cl::desc("Alias for -instr-map"));
cl::sub(GraphDiff));
static cl::opt<std::string> static cl::opt<std::string>
GraphDiffInstrMap1("instr-map-1", GraphDiffInstrMap1("instr-map-1",
cl::desc("binary with the instrumentation map, or " cl::desc("binary with the instrumentation map, or "
@ -74,8 +70,7 @@ static cl::opt<std::string>
cl::value_desc("binary with xray_instr_map or yaml"), cl::value_desc("binary with xray_instr_map or yaml"),
cl::sub(GraphDiff), cl::init("")); cl::sub(GraphDiff), cl::init(""));
static cl::alias GraphDiffInstrMap1A("m1", cl::aliasopt(GraphDiffInstrMap1), static cl::alias GraphDiffInstrMap1A("m1", cl::aliasopt(GraphDiffInstrMap1),
cl::desc("Alias for -instr-map-1"), cl::desc("Alias for -instr-map-1"));
cl::sub(GraphDiff));
static cl::opt<std::string> static cl::opt<std::string>
GraphDiffInstrMap2("instr-map-2", GraphDiffInstrMap2("instr-map-2",
cl::desc("binary with the instrumentation map, or " cl::desc("binary with the instrumentation map, or "
@ -83,8 +78,7 @@ static cl::opt<std::string>
cl::value_desc("binary with xray_instr_map or yaml"), cl::value_desc("binary with xray_instr_map or yaml"),
cl::sub(GraphDiff), cl::init("")); cl::sub(GraphDiff), cl::init(""));
static cl::alias GraphDiffInstrMap2A("m2", cl::aliasopt(GraphDiffInstrMap2), static cl::alias GraphDiffInstrMap2A("m2", cl::aliasopt(GraphDiffInstrMap2),
cl::desc("Alias for -instr-map-2"), cl::desc("Alias for -instr-map-2"));
cl::sub(GraphDiff));
static cl::opt<bool> GraphDiffDeduceSiblingCalls( static cl::opt<bool> GraphDiffDeduceSiblingCalls(
"deduce-sibling-calls", "deduce-sibling-calls",
@ -92,22 +86,21 @@ static cl::opt<bool> GraphDiffDeduceSiblingCalls(
cl::sub(GraphDiff), cl::init(false)); cl::sub(GraphDiff), cl::init(false));
static cl::alias static cl::alias
GraphDiffDeduceSiblingCallsA("d", cl::aliasopt(GraphDiffDeduceSiblingCalls), GraphDiffDeduceSiblingCallsA("d", cl::aliasopt(GraphDiffDeduceSiblingCalls),
cl::desc("Alias for -deduce-sibling-calls"), cl::desc("Alias for -deduce-sibling-calls"));
cl::sub(GraphDiff));
static cl::opt<bool> GraphDiffDeduceSiblingCalls1( static cl::opt<bool> GraphDiffDeduceSiblingCalls1(
"deduce-sibling-calls-1", "deduce-sibling-calls-1",
cl::desc("Deduce sibling calls when unrolling function call stacks"), cl::desc("Deduce sibling calls when unrolling function call stacks"),
cl::sub(GraphDiff), cl::init(false)); cl::sub(GraphDiff), cl::init(false));
static cl::alias GraphDiffDeduceSiblingCalls1A( static cl::alias GraphDiffDeduceSiblingCalls1A(
"d1", cl::aliasopt(GraphDiffDeduceSiblingCalls1), "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<bool> GraphDiffDeduceSiblingCalls2( static cl::opt<bool> GraphDiffDeduceSiblingCalls2(
"deduce-sibling-calls-2", "deduce-sibling-calls-2",
cl::desc("Deduce sibling calls when unrolling function call stacks"), cl::desc("Deduce sibling calls when unrolling function call stacks"),
cl::sub(GraphDiff), cl::init(false)); cl::sub(GraphDiff), cl::init(false));
static cl::alias GraphDiffDeduceSiblingCalls2A( static cl::alias GraphDiffDeduceSiblingCalls2A(
"d2", cl::aliasopt(GraphDiffDeduceSiblingCalls2), "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<GraphRenderer::StatType> GraphDiffEdgeLabel( static cl::opt<GraphRenderer::StatType> GraphDiffEdgeLabel(
"edge-label", cl::desc("Output graphs with edges labeled with this field"), "edge-label", cl::desc("Output graphs with edges labeled with this field"),
@ -130,8 +123,7 @@ static cl::opt<GraphRenderer::StatType> GraphDiffEdgeLabel(
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphDiffEdgeLabelA("e", cl::aliasopt(GraphDiffEdgeLabel), static cl::alias GraphDiffEdgeLabelA("e", cl::aliasopt(GraphDiffEdgeLabel),
cl::desc("Alias for -edge-label"), cl::desc("Alias for -edge-label"));
cl::sub(GraphDiff));
static cl::opt<GraphRenderer::StatType> GraphDiffEdgeColor( static cl::opt<GraphRenderer::StatType> GraphDiffEdgeColor(
"edge-color", cl::desc("Output graphs with edges colored by this field"), "edge-color", cl::desc("Output graphs with edges colored by this field"),
@ -154,8 +146,7 @@ static cl::opt<GraphRenderer::StatType> GraphDiffEdgeColor(
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphDiffEdgeColorA("c", cl::aliasopt(GraphDiffEdgeColor), static cl::alias GraphDiffEdgeColorA("c", cl::aliasopt(GraphDiffEdgeColor),
cl::desc("Alias for -edge-color"), cl::desc("Alias for -edge-color"));
cl::sub(GraphDiff));
static cl::opt<GraphRenderer::StatType> GraphDiffVertexLabel( static cl::opt<GraphRenderer::StatType> GraphDiffVertexLabel(
"vertex-label", "vertex-label",
@ -179,8 +170,7 @@ static cl::opt<GraphRenderer::StatType> GraphDiffVertexLabel(
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphDiffVertexLabelA("v", cl::aliasopt(GraphDiffVertexLabel), static cl::alias GraphDiffVertexLabelA("v", cl::aliasopt(GraphDiffVertexLabel),
cl::desc("Alias for -vertex-label"), cl::desc("Alias for -vertex-label"));
cl::sub(GraphDiff));
static cl::opt<GraphRenderer::StatType> GraphDiffVertexColor( static cl::opt<GraphRenderer::StatType> GraphDiffVertexColor(
"vertex-color", "vertex-color",
@ -204,24 +194,21 @@ static cl::opt<GraphRenderer::StatType> GraphDiffVertexColor(
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphDiffVertexColorA("b", cl::aliasopt(GraphDiffVertexColor), static cl::alias GraphDiffVertexColorA("b", cl::aliasopt(GraphDiffVertexColor),
cl::desc("Alias for -vertex-color"), cl::desc("Alias for -vertex-color"));
cl::sub(GraphDiff));
static cl::opt<int> GraphDiffVertexLabelTrunc( static cl::opt<int> GraphDiffVertexLabelTrunc(
"vertex-label-trun", cl::desc("What length to truncate vertex labels to "), "vertex-label-trun", cl::desc("What length to truncate vertex labels to "),
cl::sub(GraphDiff), cl::init(40)); cl::sub(GraphDiff), cl::init(40));
static cl::alias static cl::alias
GraphDiffVertexLabelTrunc1("t", cl::aliasopt(GraphDiffVertexLabelTrunc), GraphDiffVertexLabelTrunc1("t", cl::aliasopt(GraphDiffVertexLabelTrunc),
cl::desc("Alias for -vertex-label-trun"), cl::desc("Alias for -vertex-label-trun"));
cl::sub(GraphDiff));
static cl::opt<std::string> static cl::opt<std::string>
GraphDiffOutput("output", cl::value_desc("Output file"), cl::init("-"), GraphDiffOutput("output", cl::value_desc("Output file"), cl::init("-"),
cl::desc("output file; use '-' for stdout"), cl::desc("output file; use '-' for stdout"),
cl::sub(GraphDiff)); cl::sub(GraphDiff));
static cl::alias GraphDiffOutputA("o", cl::aliasopt(GraphDiffOutput), static cl::alias GraphDiffOutputA("o", cl::aliasopt(GraphDiffOutput),
cl::desc("Alias for -output"), cl::desc("Alias for -output"));
cl::sub(GraphDiff));
Expected<GraphDiffRenderer> GraphDiffRenderer::Factory::getGraphDiffRenderer() { Expected<GraphDiffRenderer> GraphDiffRenderer::Factory::getGraphDiffRenderer() {
GraphDiffRenderer R; GraphDiffRenderer R;

View File

@ -30,14 +30,13 @@ static cl::opt<bool>
GraphKeepGoing("keep-going", cl::desc("Keep going on errors encountered"), GraphKeepGoing("keep-going", cl::desc("Keep going on errors encountered"),
cl::sub(GraphC), cl::init(false)); cl::sub(GraphC), cl::init(false));
static cl::alias GraphKeepGoing2("k", cl::aliasopt(GraphKeepGoing), static cl::alias GraphKeepGoing2("k", cl::aliasopt(GraphKeepGoing),
cl::desc("Alias for -keep-going"), cl::desc("Alias for -keep-going"));
cl::sub(GraphC));
static cl::opt<std::string> static cl::opt<std::string>
GraphOutput("output", cl::value_desc("Output file"), cl::init("-"), GraphOutput("output", cl::value_desc("Output file"), cl::init("-"),
cl::desc("output file; use '-' for stdout"), cl::sub(GraphC)); cl::desc("output file; use '-' for stdout"), cl::sub(GraphC));
static cl::alias GraphOutput2("o", cl::aliasopt(GraphOutput), static cl::alias GraphOutput2("o", cl::aliasopt(GraphOutput),
cl::desc("Alias for -output"), cl::sub(GraphC)); cl::desc("Alias for -output"));
static cl::opt<std::string> static cl::opt<std::string>
GraphInstrMap("instr_map", GraphInstrMap("instr_map",
@ -46,8 +45,7 @@ static cl::opt<std::string>
cl::value_desc("binary with xray_instr_map"), cl::sub(GraphC), cl::value_desc("binary with xray_instr_map"), cl::sub(GraphC),
cl::init("")); cl::init(""));
static cl::alias GraphInstrMap2("m", cl::aliasopt(GraphInstrMap), static cl::alias GraphInstrMap2("m", cl::aliasopt(GraphInstrMap),
cl::desc("alias for -instr_map"), cl::desc("alias for -instr_map"));
cl::sub(GraphC));
static cl::opt<bool> GraphDeduceSiblingCalls( static cl::opt<bool> GraphDeduceSiblingCalls(
"deduce-sibling-calls", "deduce-sibling-calls",
@ -55,8 +53,7 @@ static cl::opt<bool> GraphDeduceSiblingCalls(
cl::sub(GraphC), cl::init(false)); cl::sub(GraphC), cl::init(false));
static cl::alias static cl::alias
GraphDeduceSiblingCalls2("d", cl::aliasopt(GraphDeduceSiblingCalls), GraphDeduceSiblingCalls2("d", cl::aliasopt(GraphDeduceSiblingCalls),
cl::desc("Alias for -deduce-sibling-calls"), cl::desc("Alias for -deduce-sibling-calls"));
cl::sub(GraphC));
static cl::opt<GraphRenderer::StatType> static cl::opt<GraphRenderer::StatType>
GraphEdgeLabel("edge-label", GraphEdgeLabel("edge-label",
@ -80,8 +77,7 @@ static cl::opt<GraphRenderer::StatType>
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphEdgeLabel2("e", cl::aliasopt(GraphEdgeLabel), static cl::alias GraphEdgeLabel2("e", cl::aliasopt(GraphEdgeLabel),
cl::desc("Alias for -edge-label"), cl::desc("Alias for -edge-label"));
cl::sub(GraphC));
static cl::opt<GraphRenderer::StatType> GraphVertexLabel( static cl::opt<GraphRenderer::StatType> GraphVertexLabel(
"vertex-label", "vertex-label",
@ -105,8 +101,7 @@ static cl::opt<GraphRenderer::StatType> GraphVertexLabel(
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphVertexLabel2("v", cl::aliasopt(GraphVertexLabel), static cl::alias GraphVertexLabel2("v", cl::aliasopt(GraphVertexLabel),
cl::desc("Alias for -edge-label"), cl::desc("Alias for -edge-label"));
cl::sub(GraphC));
static cl::opt<GraphRenderer::StatType> GraphEdgeColorType( static cl::opt<GraphRenderer::StatType> GraphEdgeColorType(
"color-edges", "color-edges",
@ -130,8 +125,7 @@ static cl::opt<GraphRenderer::StatType> GraphEdgeColorType(
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphEdgeColorType2("c", cl::aliasopt(GraphEdgeColorType), static cl::alias GraphEdgeColorType2("c", cl::aliasopt(GraphEdgeColorType),
cl::desc("Alias for -color-edges"), cl::desc("Alias for -color-edges"));
cl::sub(GraphC));
static cl::opt<GraphRenderer::StatType> GraphVertexColorType( static cl::opt<GraphRenderer::StatType> GraphVertexColorType(
"color-vertices", "color-vertices",
@ -155,8 +149,7 @@ static cl::opt<GraphRenderer::StatType> GraphVertexColorType(
clEnumValN(GraphRenderer::StatType::SUM, "sum", clEnumValN(GraphRenderer::StatType::SUM, "sum",
"sum of call durations"))); "sum of call durations")));
static cl::alias GraphVertexColorType2("b", cl::aliasopt(GraphVertexColorType), static cl::alias GraphVertexColorType2("b", cl::aliasopt(GraphVertexColorType),
cl::desc("Alias for -edge-label"), cl::desc("Alias for -edge-label"));
cl::sub(GraphC));
template <class T> T diff(T L, T R) { return std::max(L, R) - std::min(L, R); } template <class T> T diff(T L, T R) { return std::max(L, R) - std::min(L, R); }

View File

@ -42,8 +42,7 @@ static cl::opt<bool>
StackKeepGoing("keep-going", cl::desc("Keep going on errors encountered"), StackKeepGoing("keep-going", cl::desc("Keep going on errors encountered"),
cl::sub(Stack), cl::init(false)); cl::sub(Stack), cl::init(false));
static cl::alias StackKeepGoing2("k", cl::aliasopt(StackKeepGoing), static cl::alias StackKeepGoing2("k", cl::aliasopt(StackKeepGoing),
cl::desc("Alias for -keep-going"), cl::desc("Alias for -keep-going"));
cl::sub(Stack));
// TODO: Does there need to be an option to deduce tail or sibling calls? // TODO: Does there need to be an option to deduce tail or sibling calls?
@ -53,8 +52,7 @@ static cl::opt<std::string> StacksInstrMap(
"Currently supports elf file instrumentation maps."), "Currently supports elf file instrumentation maps."),
cl::sub(Stack), cl::init("")); cl::sub(Stack), cl::init(""));
static cl::alias StacksInstrMap2("m", cl::aliasopt(StacksInstrMap), static cl::alias StacksInstrMap2("m", cl::aliasopt(StacksInstrMap),
cl::desc("Alias for -instr_map"), cl::desc("Alias for -instr_map"));
cl::sub(Stack));
static cl::opt<bool> static cl::opt<bool>
SeparateThreadStacks("per-thread-stacks", SeparateThreadStacks("per-thread-stacks",
@ -72,8 +70,7 @@ static cl::opt<bool>
"By default separates stacks per-thread."), "By default separates stacks per-thread."),
cl::sub(Stack), cl::init(false)); cl::sub(Stack), cl::init(false));
static cl::alias DumpAllStacksShort("all", cl::aliasopt(DumpAllStacks), static cl::alias DumpAllStacksShort("all", cl::aliasopt(DumpAllStacks),
cl::desc("Alias for -all-stacks"), cl::desc("Alias for -all-stacks"));
cl::sub(Stack));
// TODO(kpw): Add other interesting formats. Perhaps chrome trace viewer format // TODO(kpw): Add other interesting formats. Perhaps chrome trace viewer format
// possibly with aggregations or just a linear trace of timings. // possibly with aggregations or just a linear trace of timings.