Lines Matching +full:max +full:- +full:counts
1 //===-- xray-graph.cpp: XRay Function Call Graph Renderer -----------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
14 #include "xray-graph.h"
15 #include "xray-registry.h"
25 // Setup llvm-xray graph subcommand and its options.
26 static cl::SubCommand GraphC("graph", "Generate function-call graph");
32 GraphKeepGoing("keep-going", cl::desc("Keep going on errors encountered"),
35 cl::desc("Alias for -keep-going"));
38 GraphOutput("output", cl::value_desc("Output file"), cl::init("-"),
39 cl::desc("output file; use '-' for stdout"), cl::sub(GraphC));
41 cl::desc("Alias for -output"));
50 cl::desc("alias for -instr_map"));
53 "deduce-sibling-calls",
58 cl::desc("Alias for -deduce-sibling-calls"));
61 GraphEdgeLabel("edge-label",
68 "count", "function call counts"),
77 clEnumValN(GraphRenderer::StatType::MAX, "max",
82 cl::desc("Alias for -edge-label"));
85 "vertex-label",
92 "function call counts"),
101 clEnumValN(GraphRenderer::StatType::MAX, "max",
106 cl::desc("Alias for -edge-label"));
109 "color-edges",
116 "function call counts"),
125 clEnumValN(GraphRenderer::StatType::MAX, "max",
130 cl::desc("Alias for -color-edges"));
133 "color-vertices",
140 "function call counts"),
149 clEnumValN(GraphRenderer::StatType::MAX, "max",
154 cl::desc("Alias for -edge-label"));
156 template <class T> T diff(T L, T R) { return std::max(L, R) - std::min(L, R); } in diff()
163 if (S.Max < L) in updateStat()
164 S.Max = L; in updateStat()
206 // The graph generated has an immaginary root for functions called by no-one at
293 M.Count = std::max(M.Count, S.Count); in updateMaxStats()
294 M.Min = std::max(M.Min, S.Min); in updateMaxStats()
295 M.Median = std::max(M.Median, S.Median); in updateMaxStats()
296 M.Pct90 = std::max(M.Pct90, S.Pct90); in updateMaxStats()
297 M.Pct99 = std::max(M.Pct99, S.Pct99); in updateMaxStats()
298 M.Max = std::max(M.Max, S.Max); in updateMaxStats()
299 M.Sum = std::max(M.Sum, S.Sum); in updateMaxStats()
358 &TimeStat::Max, &TimeStat::Sum}; in getString()
367 DoubleStatPtrs[static_cast<int>(T) - in getString()
380 &TimeStat::Max, &TimeStat::Sum}; in getDouble()
390 (*this).*DoubleStatPtrs[static_cast<int>(T) - in getDouble()
412 OS << "F" << E.first.first << " -> " in exportGraphAsDOT()
475 errs() << "#" << Level-- << "\t" in getGraphRenderer()
500 // Here we register and implement the llvm-xray graph subcommand.
508 static CommandRegistration Unused(&GraphC, []() -> Error { in __anon4662d1480302()