[PATCH] D24376: [XRay] Implement `llvm-xray convert` -- trace file conversion

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 10:13:24 PST 2016


dblaikie added a comment.

(I was thinking more going the other direction: removing the dead code, rather than adding a use of it)

What's the purpose of the binary/raw output format? (I think it was mentioned that the binary output format would be for testing - so we could write yaml, then generate raw files - then feed those into other tools for testing? But if the yaml input format is supported everywhere, what's the purpose of that? We'll want to have a couple of binary tests, but I imagine they would test checked in binary -> yaml output (if they test yaml -> binary -> yaml, then I'm not sure they achieve much because it's just roundtripping so we have as much code under test (binary -> yaml) as we do in the test harness (yaml -> binary), effectively)

That's my mental model at least.

(this commit seems to add several .bin test files - but I don't see where those are used?)



================
Comment at: tools/llvm-xray/xray-converter.cc:175-176
+  handleAllErrors(std::move(Err), [&](const ErrorInfoBase &E) {
+    if (!ConvertInstrMap.empty())
+      E.log(errs());
+  });
----------------
This seems like an odd construct - should Extractor not error-out in the case where ConvertInstrMap is empty?


https://reviews.llvm.org/D24376





More information about the llvm-commits mailing list