[PATCH] D36819: [XRay][tools] Support new kinds of instrumentation map entries
Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 18 11:04:16 PDT 2017
kpw accepted this revision.
kpw added a comment.
This revision is now accepted and ready to land.
I've missed the opportunity to do something similar in the past, but it would be nice to have a txt file in the X86/Inputs directory that explains how the binary data was generated and how it's layed out.
Maybe you could even put this into the extract-all-sledtypes.txt comments.
================
Comment at: lib/XRay/InstrumentationMap.cpp:104-108
static constexpr SledEntry::FunctionKinds Kinds[] = {
SledEntry::FunctionKinds::ENTRY, SledEntry::FunctionKinds::EXIT,
SledEntry::FunctionKinds::TAIL,
- };
+ SledEntry::FunctionKinds::LOG_ARGS_ENTER,
+ SledEntry::FunctionKinds::CUSTOM_EVENT};
----------------
It makes me sad that I couldn't find a good way to do this without duplicating the enum definitions.
Why can't the stdlib define something like:
template<underlying_t_value, enum_class_t>
struct is_enumerated {
static const bool value = <whether there is a value in the enum class defined for underlying_t_value>;
};
Even exploring TMP necromancy didn't make it much better :(
https://reviews.llvm.org/D36819
More information about the llvm-commits
mailing list