[PATCH] D28225: Implemented color coding and Vertex labels in XRay Graph
Dean Michael Berris via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 15:54:14 PST 2017
dberris accepted this revision.
dberris added a comment.
This revision is now accepted and ready to land.
LGTM -- we can probably use some more user-facing documentation explaining a bit what this tool actually does (probably time to update docs/XRay.rst) but something to be done for later.
================
Comment at: tools/llvm-xray/xray-graph.cc:581
for (const auto &Record : Trace) {
- // Generate graph, FIXME: better error recovery.
- if (!GR.accountRecord(Record)) {
- return make_error<StringError>(
- Twine("Failed accounting function calls in file '") + GraphInput +
- "'.",
- make_error_code(llvm::errc::invalid_argument));
+ // Generate graph.
+ auto E = GR.accountRecord(Record);
----------------
In the future, comments like these really ought to expound more on what it's actually doing at a semantic level to help the reader of the code. A more informative comment as to "why" we're doing something might make more sense to the reader as that's not immediately obvious. Something like:
```
// Populate the graph with function call records that we
// encounter from the XRay trace. Any errors we encounter
// will be printed through standard error.
https://reviews.llvm.org/D28225
More information about the llvm-commits
mailing list