Lines Matching +full:max +full:- +full:counts

1 //===-- xray-graph-diff.cpp: XRay Function Call Graph Renderer ------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
18 #include "xray-graph-diff.h"
19 #include "xray-graph.h"
20 #include "xray-registry.h"
22 #include "xray-color-helper.h"
30 static cl::SubCommand GraphDiff("graph-diff",
31 "Generate diff of function-call graphs");
40 GraphDiffKeepGoing("keep-going",
44 cl::desc("Alias for -keep-going"));
46 GraphDiffKeepGoing1("keep-going-1",
50 cl::desc("Alias for -keep-going-1"));
52 GraphDiffKeepGoing2("keep-going-2",
56 cl::desc("Alias for -keep-going-2"));
59 GraphDiffInstrMap("instr-map",
65 cl::desc("Alias for -instr-map"));
67 GraphDiffInstrMap1("instr-map-1",
73 cl::desc("Alias for -instr-map-1"));
75 GraphDiffInstrMap2("instr-map-2",
81 cl::desc("Alias for -instr-map-2"));
84 "deduce-sibling-calls",
89 cl::desc("Alias for -deduce-sibling-calls"));
91 "deduce-sibling-calls-1",
96 cl::desc("Alias for -deduce-sibling-calls-1"));
98 "deduce-sibling-calls-2",
103 cl::desc("Alias for -deduce-sibling-calls-2"));
106 "edge-label", cl::desc("Output graphs with edges labeled with this field"),
112 "function call counts"),
121 clEnumValN(GraphRenderer::StatType::MAX, "max",
126 cl::desc("Alias for -edge-label"));
129 "edge-color", cl::desc("Output graphs with edges colored by this field"),
135 "function call counts"),
144 clEnumValN(GraphRenderer::StatType::MAX, "max",
149 cl::desc("Alias for -edge-color"));
152 "vertex-label",
159 "function call counts"),
168 clEnumValN(GraphRenderer::StatType::MAX, "max",
173 cl::desc("Alias for -vertex-label"));
176 "vertex-color",
183 "function call counts"),
192 clEnumValN(GraphRenderer::StatType::MAX, "max",
197 cl::desc("Alias for -vertex-color"));
200 "vertex-label-trun", cl::desc("What length to truncate vertex labels to "),
204 cl::desc("Alias for -vertex-label-trun"));
207 GraphDiffOutput("output", cl::value_desc("Output file"), cl::init("-"),
208 cl::desc("output file; use '-' for stdout"),
211 cl::desc("Alias for -output"));
217 const auto &G = this->G[i].get(); in getGraphDiffRenderer()
231 GraphT::EdgeIdentifier ID{EdgeTailAttrOrErr->SymbolName, in getGraphDiffRenderer()
232 EdgeHeadAttrOrErr->SymbolName}; in getGraphDiffRenderer()
247 return RightAttr / LeftAttr - 1.0; in statRelDiff()
257 return H.getColorString(-2.0); // A number less than -1.0 in getColor()
262 const auto &LeftStat = EdgeAttr.CorrEdgePtr[0]->second.S; in getColor()
263 const auto &RightStat = EdgeAttr.CorrEdgePtr[1]->second.S; in getColor()
266 double CappedRelDiff = std::clamp(RelDiff, -1.0, 1.0); in getColor()
278 return H.getColorString(-2.0); // A number less than -1.0 in getColor()
283 const auto &LeftStat = VertexAttr.CorrVertexPtr[0]->second.S; in getColor()
284 const auto &RightStat = VertexAttr.CorrVertexPtr[1]->second.S; in getColor()
287 double CappedRelDiff = std::clamp(RelDiff, -1.0, 1.0); in getColor()
310 const auto &LeftStat = EdgeAttr.CorrEdgePtr[0]->second.S; in getLabel()
311 const auto &RightStat = EdgeAttr.CorrEdgePtr[1]->second.S; in getLabel()
331 const auto &LeftStat = VertexAttr.CorrVertexPtr[0]->second.S; in getLabel()
332 const auto &RightStat = VertexAttr.CorrVertexPtr[1]->second.S; in getLabel()
350 const auto &LeftStat = EdgeAttr.CorrEdgePtr[0]->second.S; in getLineWidth()
351 const auto &RightStat = EdgeAttr.CorrEdgePtr[1]->second.S; in getLineWidth()
380 OS << formatv(R"(F{0} -> F{1} [tooltip="{2} -> {3}" label="{4}" )" in exportGraphAsDOT()
413 static CommandRegistration Unused(&GraphDiff, []() -> Error { in __anon0eabb36e0102()