For readers unfamiliar with the XRay code base, explain our little-endian views more clearly. For code clarity either get rid of obvious comments or explain their intentions, fix typos, correct coding style according to LLVM's standards and manually CSE long expressions to point out it is the same expression.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/XRay/Trace.cpp | ||
---|---|---|
10–11 ↗ | (On Diff #102995) | This technically isn't strictly true. While there is an implementation of the naive and FDR mode logging, those may not be written by the implementation in compiler-rt. Making it sound like there's an actual dependency (as opposed to a coincidental dependency) may be misleading. For instance, it's possible to write logs in this format without using the compiler-rt implementation. Working on documenting the log details/format as opposed to referring to the compiler-rt implementation would be a strictly better approach. I'd rather change this comment to say the explicit versions of the log we're supporting and not mentioning anything in compiler-rt. |
explain the complicated mess of a situation between LLVM and compiler-rt even
more clearly, to avoid any reader being confused
lib/XRay/Trace.cpp | ||
---|---|---|
10–11 ↗ | (On Diff #102995) | May not be. But currently (and for the forseeable future) will be. Currently, a person will see two separate and *very* different implementations, and not know if they're supposed to be related or not just because the data format appears to coincide. The point of this is obviously not documenting the format. It is supposed to tell the reader where an example of the counterpart can be found. I've updated it so it reflects the fact this doesn't have to be a hard dependency. When/if there is a formal spec to the format, I'll be happy to reword this. (IIUC this isn't a priority for anyone yet, because there are only these two instances so far.) |
lib/XRay/Trace.cpp | ||
---|---|---|
10–11 ↗ | (On Diff #102995) | Or we can just remove this comment, and not need to refer to compiler-rt nor any other implementations at this point. |
lib/XRay/Trace.cpp | ||
---|---|---|
10–11 ↗ | (On Diff #102995) | ...and leave this confusing forever. |
lib/XRay/Trace.cpp | ||
---|---|---|
10–11 ↗ | (On Diff #102995) | No, not "forever". If we're going to make this clearer, it shouldn't involve referring to the details of an implementation. The proper disambiguation to this would be, that we say what version of the log we're supporting, and a pointer to the documentation of the log format. The feedback I gave you was: "Working on documenting the log details/format as opposed to referring to the compiler-rt implementation would be a strictly better approach. I'd rather change this comment to say the explicit versions of the log we're supporting and not mentioning anything in compiler-rt." Nowhere did I imply that this should be intentionally confusing forever. |