[PATCH] D32840: [XRay] convert FDR arg1 log entries

Martin Pelikán via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 23:14:26 PDT 2017


pelikan marked an inline comment as done.
pelikan added inline comments.


================
Comment at: include/llvm/XRay/YAMLXRayRecord.h:89
+template <> struct SequenceTraits<std::vector<uint64_t>> {
+  static constexpr bool flow = true;
+  static size_t size(IO &IO, std::vector<uint64_t> &V) { return V.size(); }
----------------
dberris wrote:
> pelikan wrote:
> > dberris wrote:
> > > What is this meant to do? Is it meant to force text wrapping? If so, please don't do that (it messes with the tests and the settings that can be defined on the YAML stream instead).
> > It's meant to *remove* text wrapping.  Since we only really support one argument in the list, we want it to look like "[ 1 ]", not like "[\n\t1,\n]\n" or whatever it thinks is in order.  This way each log entry will only occupy one line, as they should (both for readability and parsability).
> Isn't text wrapping controlled on the stream too? Or is this different?
> 
> I guess the question is whether this is actually required, or whether this is something controllable through the serialisation instead of being hard-coded on the type.
This isn't *stream* wrapping, this is just wrapping for the (one element) list of arguments.  Trust me, I had to re-read the entire YAML code base just to find this flag, which fortunately does precisely what we want. :-)


https://reviews.llvm.org/D32840





More information about the llvm-commits mailing list