xray-graph.cpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. //===-- xray-graph.cpp: XRay Function Call Graph Renderer -----------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // Generate a DOT file to represent the function call graph encountered in
  10. // the trace.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #include "xray-graph.h"
  14. #include "xray-registry.h"
  15. #include "llvm/Support/ErrorHandling.h"
  16. #include "llvm/XRay/InstrumentationMap.h"
  17. #include "llvm/XRay/Trace.h"
  18. using namespace llvm;
  19. using namespace llvm::xray;
  20. // Setup llvm-xray graph subcommand and its options.
  21. static cl::SubCommand GraphC("graph", "Generate function-call graph");
  22. static cl::opt<std::string> GraphInput(cl::Positional,
  23. cl::desc("<xray log file>"),
  24. cl::Required, cl::sub(GraphC));
  25. static cl::opt<bool>
  26. GraphKeepGoing("keep-going", cl::desc("Keep going on errors encountered"),
  27. cl::sub(GraphC), cl::init(false));
  28. static cl::alias GraphKeepGoing2("k", cl::aliasopt(GraphKeepGoing),
  29. cl::desc("Alias for -keep-going"));
  30. static cl::opt<std::string>
  31. GraphOutput("output", cl::value_desc("Output file"), cl::init("-"),
  32. cl::desc("output file; use '-' for stdout"), cl::sub(GraphC));
  33. static cl::alias GraphOutput2("o", cl::aliasopt(GraphOutput),
  34. cl::desc("Alias for -output"));
  35. static cl::opt<std::string>
  36. GraphInstrMap("instr_map",
  37. cl::desc("binary with the instrumrntation map, or "
  38. "a separate instrumentation map"),
  39. cl::value_desc("binary with xray_instr_map"), cl::sub(GraphC),
  40. cl::init(""));
  41. static cl::alias GraphInstrMap2("m", cl::aliasopt(GraphInstrMap),
  42. cl::desc("alias for -instr_map"));
  43. static cl::opt<bool> GraphDeduceSiblingCalls(
  44. "deduce-sibling-calls",
  45. cl::desc("Deduce sibling calls when unrolling function call stacks"),
  46. cl::sub(GraphC), cl::init(false));
  47. static cl::alias
  48. GraphDeduceSiblingCalls2("d", cl::aliasopt(GraphDeduceSiblingCalls),
  49. cl::desc("Alias for -deduce-sibling-calls"));
  50. static cl::opt<GraphRenderer::StatType>
  51. GraphEdgeLabel("edge-label",
  52. cl::desc("Output graphs with edges labeled with this field"),
  53. cl::value_desc("field"), cl::sub(GraphC),
  54. cl::init(GraphRenderer::StatType::NONE),
  55. cl::values(clEnumValN(GraphRenderer::StatType::NONE, "none",
  56. "Do not label Edges"),
  57. clEnumValN(GraphRenderer::StatType::COUNT,
  58. "count", "function call counts"),
  59. clEnumValN(GraphRenderer::StatType::MIN, "min",
  60. "minimum function durations"),
  61. clEnumValN(GraphRenderer::StatType::MED, "med",
  62. "median function durations"),
  63. clEnumValN(GraphRenderer::StatType::PCT90, "90p",
  64. "90th percentile durations"),
  65. clEnumValN(GraphRenderer::StatType::PCT99, "99p",
  66. "99th percentile durations"),
  67. clEnumValN(GraphRenderer::StatType::MAX, "max",
  68. "maximum function durations"),
  69. clEnumValN(GraphRenderer::StatType::SUM, "sum",
  70. "sum of call durations")));
  71. static cl::alias GraphEdgeLabel2("e", cl::aliasopt(GraphEdgeLabel),
  72. cl::desc("Alias for -edge-label"));
  73. static cl::opt<GraphRenderer::StatType> GraphVertexLabel(
  74. "vertex-label",
  75. cl::desc("Output graphs with vertices labeled with this field"),
  76. cl::value_desc("field"), cl::sub(GraphC),
  77. cl::init(GraphRenderer::StatType::NONE),
  78. cl::values(clEnumValN(GraphRenderer::StatType::NONE, "none",
  79. "Do not label Vertices"),
  80. clEnumValN(GraphRenderer::StatType::COUNT, "count",
  81. "function call counts"),
  82. clEnumValN(GraphRenderer::StatType::MIN, "min",
  83. "minimum function durations"),
  84. clEnumValN(GraphRenderer::StatType::MED, "med",
  85. "median function durations"),
  86. clEnumValN(GraphRenderer::StatType::PCT90, "90p",
  87. "90th percentile durations"),
  88. clEnumValN(GraphRenderer::StatType::PCT99, "99p",
  89. "99th percentile durations"),
  90. clEnumValN(GraphRenderer::StatType::MAX, "max",
  91. "maximum function durations"),
  92. clEnumValN(GraphRenderer::StatType::SUM, "sum",
  93. "sum of call durations")));
  94. static cl::alias GraphVertexLabel2("v", cl::aliasopt(GraphVertexLabel),
  95. cl::desc("Alias for -edge-label"));
  96. static cl::opt<GraphRenderer::StatType> GraphEdgeColorType(
  97. "color-edges",
  98. cl::desc("Output graphs with edge colors determined by this field"),
  99. cl::value_desc("field"), cl::sub(GraphC),
  100. cl::init(GraphRenderer::StatType::NONE),
  101. cl::values(clEnumValN(GraphRenderer::StatType::NONE, "none",
  102. "Do not color Edges"),
  103. clEnumValN(GraphRenderer::StatType::COUNT, "count",
  104. "function call counts"),
  105. clEnumValN(GraphRenderer::StatType::MIN, "min",
  106. "minimum function durations"),
  107. clEnumValN(GraphRenderer::StatType::MED, "med",
  108. "median function durations"),
  109. clEnumValN(GraphRenderer::StatType::PCT90, "90p",
  110. "90th percentile durations"),
  111. clEnumValN(GraphRenderer::StatType::PCT99, "99p",
  112. "99th percentile durations"),
  113. clEnumValN(GraphRenderer::StatType::MAX, "max",
  114. "maximum function durations"),
  115. clEnumValN(GraphRenderer::StatType::SUM, "sum",
  116. "sum of call durations")));
  117. static cl::alias GraphEdgeColorType2("c", cl::aliasopt(GraphEdgeColorType),
  118. cl::desc("Alias for -color-edges"));
  119. static cl::opt<GraphRenderer::StatType> GraphVertexColorType(
  120. "color-vertices",
  121. cl::desc("Output graphs with vertex colors determined by this field"),
  122. cl::value_desc("field"), cl::sub(GraphC),
  123. cl::init(GraphRenderer::StatType::NONE),
  124. cl::values(clEnumValN(GraphRenderer::StatType::NONE, "none",
  125. "Do not color vertices"),
  126. clEnumValN(GraphRenderer::StatType::COUNT, "count",
  127. "function call counts"),
  128. clEnumValN(GraphRenderer::StatType::MIN, "min",
  129. "minimum function durations"),
  130. clEnumValN(GraphRenderer::StatType::MED, "med",
  131. "median function durations"),
  132. clEnumValN(GraphRenderer::StatType::PCT90, "90p",
  133. "90th percentile durations"),
  134. clEnumValN(GraphRenderer::StatType::PCT99, "99p",
  135. "99th percentile durations"),
  136. clEnumValN(GraphRenderer::StatType::MAX, "max",
  137. "maximum function durations"),
  138. clEnumValN(GraphRenderer::StatType::SUM, "sum",
  139. "sum of call durations")));
  140. static cl::alias GraphVertexColorType2("b", cl::aliasopt(GraphVertexColorType),
  141. cl::desc("Alias for -edge-label"));
  142. template <class T> T diff(T L, T R) { return std::max(L, R) - std::min(L, R); }
  143. // Updates the statistics for a GraphRenderer::TimeStat
  144. static void updateStat(GraphRenderer::TimeStat &S, int64_t L) {
  145. S.Count++;
  146. if (S.Min > L || S.Min == 0)
  147. S.Min = L;
  148. if (S.Max < L)
  149. S.Max = L;
  150. S.Sum += L;
  151. }
  152. // Labels in a DOT graph must be legal XML strings so it's necessary to escape
  153. // certain characters.
  154. static std::string escapeString(StringRef Label) {
  155. std::string Str;
  156. Str.reserve(Label.size());
  157. for (const auto C : Label) {
  158. switch (C) {
  159. case '&':
  160. Str.append("&amp;");
  161. break;
  162. case '<':
  163. Str.append("&lt;");
  164. break;
  165. case '>':
  166. Str.append("&gt;");
  167. break;
  168. default:
  169. Str.push_back(C);
  170. break;
  171. }
  172. }
  173. return Str;
  174. }
  175. // Evaluates an XRay record and performs accounting on it.
  176. //
  177. // If the record is an ENTER record it pushes the FuncID and TSC onto a
  178. // structure representing the call stack for that function.
  179. // If the record is an EXIT record it checks computes computes the ammount of
  180. // time the function took to complete and then stores that information in an
  181. // edge of the graph. If there is no matching ENTER record the function tries
  182. // to recover by assuming that there were EXIT records which were missed, for
  183. // example caused by tail call elimination and if the option is enabled then
  184. // then tries to recover from this.
  185. //
  186. // This funciton will also error if the records are out of order, as the trace
  187. // is expected to be sorted.
  188. //
  189. // The graph generated has an immaginary root for functions called by no-one at
  190. // FuncId 0.
  191. //
  192. // FIXME: Refactor this and account subcommand to reduce code duplication.
  193. Error GraphRenderer::accountRecord(const XRayRecord &Record) {
  194. using std::make_error_code;
  195. using std::errc;
  196. if (CurrentMaxTSC == 0)
  197. CurrentMaxTSC = Record.TSC;
  198. if (Record.TSC < CurrentMaxTSC)
  199. return make_error<StringError>("Records not in order",
  200. make_error_code(errc::invalid_argument));
  201. auto &ThreadStack = PerThreadFunctionStack[Record.TId];
  202. switch (Record.Type) {
  203. case RecordTypes::ENTER:
  204. case RecordTypes::ENTER_ARG: {
  205. if (Record.FuncId != 0 && G.count(Record.FuncId) == 0)
  206. G[Record.FuncId].SymbolName = FuncIdHelper.SymbolOrNumber(Record.FuncId);
  207. ThreadStack.push_back({Record.FuncId, Record.TSC});
  208. break;
  209. }
  210. case RecordTypes::EXIT:
  211. case RecordTypes::TAIL_EXIT: {
  212. // FIXME: Refactor this and the account subcommand to reduce code
  213. // duplication
  214. if (ThreadStack.size() == 0 || ThreadStack.back().FuncId != Record.FuncId) {
  215. if (!DeduceSiblingCalls)
  216. return make_error<StringError>("No matching ENTRY record",
  217. make_error_code(errc::invalid_argument));
  218. auto Parent = std::find_if(
  219. ThreadStack.rbegin(), ThreadStack.rend(),
  220. [&](const FunctionAttr &A) { return A.FuncId == Record.FuncId; });
  221. if (Parent == ThreadStack.rend())
  222. return make_error<StringError>(
  223. "No matching Entry record in stack",
  224. make_error_code(errc::invalid_argument)); // There is no matching
  225. // Function for this exit.
  226. while (ThreadStack.back().FuncId != Record.FuncId) {
  227. TimestampT D = diff(ThreadStack.back().TSC, Record.TSC);
  228. VertexIdentifier TopFuncId = ThreadStack.back().FuncId;
  229. ThreadStack.pop_back();
  230. assert(ThreadStack.size() != 0);
  231. EdgeIdentifier EI(ThreadStack.back().FuncId, TopFuncId);
  232. auto &EA = G[EI];
  233. EA.Timings.push_back(D);
  234. updateStat(EA.S, D);
  235. updateStat(G[TopFuncId].S, D);
  236. }
  237. }
  238. uint64_t D = diff(ThreadStack.back().TSC, Record.TSC);
  239. ThreadStack.pop_back();
  240. VertexIdentifier VI = ThreadStack.empty() ? 0 : ThreadStack.back().FuncId;
  241. EdgeIdentifier EI(VI, Record.FuncId);
  242. auto &EA = G[EI];
  243. EA.Timings.push_back(D);
  244. updateStat(EA.S, D);
  245. updateStat(G[Record.FuncId].S, D);
  246. break;
  247. }
  248. case RecordTypes::CUSTOM_EVENT:
  249. case RecordTypes::TYPED_EVENT:
  250. // TODO: Support custom and typed events in the graph processing?
  251. break;
  252. }
  253. return Error::success();
  254. }
  255. template <typename U>
  256. void GraphRenderer::getStats(U begin, U end, GraphRenderer::TimeStat &S) {
  257. if (begin == end) return;
  258. std::ptrdiff_t MedianOff = S.Count / 2;
  259. std::nth_element(begin, begin + MedianOff, end);
  260. S.Median = *(begin + MedianOff);
  261. std::ptrdiff_t Pct90Off = (S.Count * 9) / 10;
  262. std::nth_element(begin, begin + Pct90Off, end);
  263. S.Pct90 = *(begin + Pct90Off);
  264. std::ptrdiff_t Pct99Off = (S.Count * 99) / 100;
  265. std::nth_element(begin, begin + Pct99Off, end);
  266. S.Pct99 = *(begin + Pct99Off);
  267. }
  268. void GraphRenderer::updateMaxStats(const GraphRenderer::TimeStat &S,
  269. GraphRenderer::TimeStat &M) {
  270. M.Count = std::max(M.Count, S.Count);
  271. M.Min = std::max(M.Min, S.Min);
  272. M.Median = std::max(M.Median, S.Median);
  273. M.Pct90 = std::max(M.Pct90, S.Pct90);
  274. M.Pct99 = std::max(M.Pct99, S.Pct99);
  275. M.Max = std::max(M.Max, S.Max);
  276. M.Sum = std::max(M.Sum, S.Sum);
  277. }
  278. void GraphRenderer::calculateEdgeStatistics() {
  279. assert(!G.edges().empty());
  280. for (auto &E : G.edges()) {
  281. auto &A = E.second;
  282. assert(!A.Timings.empty());
  283. getStats(A.Timings.begin(), A.Timings.end(), A.S);
  284. updateMaxStats(A.S, G.GraphEdgeMax);
  285. }
  286. }
  287. void GraphRenderer::calculateVertexStatistics() {
  288. std::vector<uint64_t> TempTimings;
  289. for (auto &V : G.vertices()) {
  290. if (V.first != 0) {
  291. for (auto &E : G.inEdges(V.first)) {
  292. auto &A = E.second;
  293. llvm::append_range(TempTimings, A.Timings);
  294. }
  295. getStats(TempTimings.begin(), TempTimings.end(), G[V.first].S);
  296. updateMaxStats(G[V.first].S, G.GraphVertexMax);
  297. TempTimings.clear();
  298. }
  299. }
  300. }
  301. // A Helper function for normalizeStatistics which normalises a single
  302. // TimeStat element.
  303. static void normalizeTimeStat(GraphRenderer::TimeStat &S,
  304. double CycleFrequency) {
  305. int64_t OldCount = S.Count;
  306. S = S / CycleFrequency;
  307. S.Count = OldCount;
  308. }
  309. // Normalises the statistics in the graph for a given TSC frequency.
  310. void GraphRenderer::normalizeStatistics(double CycleFrequency) {
  311. for (auto &E : G.edges()) {
  312. auto &S = E.second.S;
  313. normalizeTimeStat(S, CycleFrequency);
  314. }
  315. for (auto &V : G.vertices()) {
  316. auto &S = V.second.S;
  317. normalizeTimeStat(S, CycleFrequency);
  318. }
  319. normalizeTimeStat(G.GraphEdgeMax, CycleFrequency);
  320. normalizeTimeStat(G.GraphVertexMax, CycleFrequency);
  321. }
  322. // Returns a string containing the value of statistic field T
  323. std::string
  324. GraphRenderer::TimeStat::getString(GraphRenderer::StatType T) const {
  325. std::string St;
  326. raw_string_ostream S{St};
  327. double TimeStat::*DoubleStatPtrs[] = {&TimeStat::Min, &TimeStat::Median,
  328. &TimeStat::Pct90, &TimeStat::Pct99,
  329. &TimeStat::Max, &TimeStat::Sum};
  330. switch (T) {
  331. case GraphRenderer::StatType::NONE:
  332. break;
  333. case GraphRenderer::StatType::COUNT:
  334. S << Count;
  335. break;
  336. default:
  337. S << (*this).*
  338. DoubleStatPtrs[static_cast<int>(T) -
  339. static_cast<int>(GraphRenderer::StatType::MIN)];
  340. break;
  341. }
  342. return S.str();
  343. }
  344. // Returns the quotient between the property T of this and another TimeStat as
  345. // a double
  346. double GraphRenderer::TimeStat::getDouble(StatType T) const {
  347. double retval = 0;
  348. double TimeStat::*DoubleStatPtrs[] = {&TimeStat::Min, &TimeStat::Median,
  349. &TimeStat::Pct90, &TimeStat::Pct99,
  350. &TimeStat::Max, &TimeStat::Sum};
  351. switch (T) {
  352. case GraphRenderer::StatType::NONE:
  353. retval = 0.0;
  354. break;
  355. case GraphRenderer::StatType::COUNT:
  356. retval = static_cast<double>(Count);
  357. break;
  358. default:
  359. retval =
  360. (*this).*DoubleStatPtrs[static_cast<int>(T) -
  361. static_cast<int>(GraphRenderer::StatType::MIN)];
  362. break;
  363. }
  364. return retval;
  365. }
  366. // Outputs a DOT format version of the Graph embedded in the GraphRenderer
  367. // object on OS. It does this in the expected way by itterating
  368. // through all edges then vertices and then outputting them and their
  369. // annotations.
  370. //
  371. // FIXME: output more information, better presented.
  372. void GraphRenderer::exportGraphAsDOT(raw_ostream &OS, StatType ET, StatType EC,
  373. StatType VT, StatType VC) {
  374. OS << "digraph xray {\n";
  375. if (VT != StatType::NONE)
  376. OS << "node [shape=record];\n";
  377. for (const auto &E : G.edges()) {
  378. const auto &S = E.second.S;
  379. OS << "F" << E.first.first << " -> "
  380. << "F" << E.first.second << " [label=\"" << S.getString(ET) << "\"";
  381. if (EC != StatType::NONE)
  382. OS << " color=\""
  383. << CHelper.getColorString(
  384. std::sqrt(S.getDouble(EC) / G.GraphEdgeMax.getDouble(EC)))
  385. << "\"";
  386. OS << "];\n";
  387. }
  388. for (const auto &V : G.vertices()) {
  389. const auto &VA = V.second;
  390. if (V.first == 0)
  391. continue;
  392. OS << "F" << V.first << " [label=\"" << (VT != StatType::NONE ? "{" : "")
  393. << escapeString(VA.SymbolName.size() > 40
  394. ? VA.SymbolName.substr(0, 40) + "..."
  395. : VA.SymbolName);
  396. if (VT != StatType::NONE)
  397. OS << "|" << VA.S.getString(VT) << "}\"";
  398. else
  399. OS << "\"";
  400. if (VC != StatType::NONE)
  401. OS << " color=\""
  402. << CHelper.getColorString(
  403. std::sqrt(VA.S.getDouble(VC) / G.GraphVertexMax.getDouble(VC)))
  404. << "\"";
  405. OS << "];\n";
  406. }
  407. OS << "}\n";
  408. }
  409. Expected<GraphRenderer> GraphRenderer::Factory::getGraphRenderer() {
  410. InstrumentationMap Map;
  411. if (!GraphInstrMap.empty()) {
  412. auto InstrumentationMapOrError = loadInstrumentationMap(GraphInstrMap);
  413. if (!InstrumentationMapOrError)
  414. return joinErrors(
  415. make_error<StringError>(
  416. Twine("Cannot open instrumentation map '") + GraphInstrMap + "'",
  417. std::make_error_code(std::errc::invalid_argument)),
  418. InstrumentationMapOrError.takeError());
  419. Map = std::move(*InstrumentationMapOrError);
  420. }
  421. const auto &FunctionAddresses = Map.getFunctionAddresses();
  422. symbolize::LLVMSymbolizer Symbolizer;
  423. const auto &Header = Trace.getFileHeader();
  424. llvm::xray::FuncIdConversionHelper FuncIdHelper(InstrMap, Symbolizer,
  425. FunctionAddresses);
  426. xray::GraphRenderer GR(FuncIdHelper, DeduceSiblingCalls);
  427. for (const auto &Record : Trace) {
  428. auto E = GR.accountRecord(Record);
  429. if (!E)
  430. continue;
  431. for (const auto &ThreadStack : GR.getPerThreadFunctionStack()) {
  432. errs() << "Thread ID: " << ThreadStack.first << "\n";
  433. auto Level = ThreadStack.second.size();
  434. for (const auto &Entry : llvm::reverse(ThreadStack.second))
  435. errs() << "#" << Level-- << "\t"
  436. << FuncIdHelper.SymbolOrNumber(Entry.FuncId) << '\n';
  437. }
  438. if (!GraphKeepGoing)
  439. return joinErrors(make_error<StringError>(
  440. "Error encountered generating the call graph.",
  441. std::make_error_code(std::errc::invalid_argument)),
  442. std::move(E));
  443. handleAllErrors(std::move(E),
  444. [&](const ErrorInfoBase &E) { E.log(errs()); });
  445. }
  446. GR.G.GraphEdgeMax = {};
  447. GR.G.GraphVertexMax = {};
  448. GR.calculateEdgeStatistics();
  449. GR.calculateVertexStatistics();
  450. if (Header.CycleFrequency)
  451. GR.normalizeStatistics(Header.CycleFrequency);
  452. return GR;
  453. }
  454. // Here we register and implement the llvm-xray graph subcommand.
  455. // The bulk of this code reads in the options, opens the required files, uses
  456. // those files to create a context for analysing the xray trace, then there is a
  457. // short loop which actually analyses the trace, generates the graph and then
  458. // outputs it as a DOT.
  459. //
  460. // FIXME: include additional filtering and annalysis passes to provide more
  461. // specific useful information.
  462. static CommandRegistration Unused(&GraphC, []() -> Error {
  463. GraphRenderer::Factory F;
  464. F.KeepGoing = GraphKeepGoing;
  465. F.DeduceSiblingCalls = GraphDeduceSiblingCalls;
  466. F.InstrMap = GraphInstrMap;
  467. auto TraceOrErr = loadTraceFile(GraphInput, true);
  468. if (!TraceOrErr)
  469. return make_error<StringError>(
  470. Twine("Failed loading input file '") + GraphInput + "'",
  471. make_error_code(llvm::errc::invalid_argument));
  472. F.Trace = std::move(*TraceOrErr);
  473. auto GROrError = F.getGraphRenderer();
  474. if (!GROrError)
  475. return GROrError.takeError();
  476. auto &GR = *GROrError;
  477. std::error_code EC;
  478. raw_fd_ostream OS(GraphOutput, EC, sys::fs::OpenFlags::OF_TextWithCRLF);
  479. if (EC)
  480. return make_error<StringError>(
  481. Twine("Cannot open file '") + GraphOutput + "' for writing.", EC);
  482. GR.exportGraphAsDOT(OS, GraphEdgeLabel, GraphEdgeColorType, GraphVertexLabel,
  483. GraphVertexColorType);
  484. return Error::success();
  485. });