[PATCH] D27503: [XRay] Custom event logging intrinsic

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 14:15:10 PST 2017


dberris added a reviewer: echristo.
dberris added a comment.

> Can you give an example of use case and lowering?

The high-level idea is to translate something like this in C++:

  [[clang::xray_always_instrument]] void foo() {
    static constexpr char kPhase[] = "Foo phase."
    __xray_customevent(kPhase, strlen(kPhase));
  }

Into the lowered form in llvm IR calling `llvm.experimental.customevent(...)`. The intent is to emit the sled, such that we can at runtime embed the correct call to a relative offset, to the trampoline that will invoke the custom event handler

Does that help?


https://reviews.llvm.org/D27503





More information about the llvm-commits mailing list