[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

Dean Michael Berris via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 16 21:48:35 PDT 2018


dberris requested changes to this revision.
dberris added a comment.
This revision now requires changes to proceed.

Thanks, Keith -- we're going to need to add this to the list of instrumentation points we can enable/disable through flags.



================
Comment at: lib/CodeGen/CGBuiltin.cpp:3376-3377
+
+    if (!CGM.getCodeGenOpts().XRayInstrumentationBundle.has(
+            XRayInstrKind::Custom))
+      return RValue::getIgnored();
----------------
Please define a new `XRayInstrKind::` for `Typed` instead of re-using `Custom`. This allows us to provide finer-grained control on the enabling/disabling of specific flags.

See `clang/include/clang/Basic/XRayInstr.h` on adding new values to `XRayInstrKind` and `clang/lib/Basic/XRayInstr.cpp` in supporting the new value when parsing from `-fxray-instrumentation-bundle=`. Also, you may need to update XRayArgs.{h,cpp} to teach it to understand how to parse the 'typed' flag value.


Repository:
  rC Clang

https://reviews.llvm.org/D45716





More information about the cfe-commits mailing list