diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
| commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
| tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /include/llvm/XRay | |
| parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) | |
Notes
Diffstat (limited to 'include/llvm/XRay')
| -rw-r--r-- | include/llvm/XRay/InstrumentationMap.h | 6 | ||||
| -rw-r--r-- | include/llvm/XRay/XRayRecord.h | 6 | ||||
| -rw-r--r-- | include/llvm/XRay/YAMLXRayRecord.h | 4 |
3 files changed, 14 insertions, 2 deletions
diff --git a/include/llvm/XRay/InstrumentationMap.h b/include/llvm/XRay/InstrumentationMap.h index 0342da0a2f0fa..42bfca36a20bc 100644 --- a/include/llvm/XRay/InstrumentationMap.h +++ b/include/llvm/XRay/InstrumentationMap.h @@ -38,7 +38,7 @@ Expected<InstrumentationMap> loadInstrumentationMap(StringRef Filename); struct SledEntry { /// Each entry here represents the kinds of supported instrumentation map /// entries. - enum class FunctionKinds { ENTRY, EXIT, TAIL }; + enum class FunctionKinds { ENTRY, EXIT, TAIL, LOG_ARGS_ENTER, CUSTOM_EVENT }; /// The address of the sled. uint64_t Address; @@ -106,6 +106,10 @@ template <> struct ScalarEnumerationTraits<xray::SledEntry::FunctionKinds> { IO.enumCase(Kind, "function-enter", xray::SledEntry::FunctionKinds::ENTRY); IO.enumCase(Kind, "function-exit", xray::SledEntry::FunctionKinds::EXIT); IO.enumCase(Kind, "tail-exit", xray::SledEntry::FunctionKinds::TAIL); + IO.enumCase(Kind, "log-args-enter", + xray::SledEntry::FunctionKinds::LOG_ARGS_ENTER); + IO.enumCase(Kind, "custom-event", + xray::SledEntry::FunctionKinds::CUSTOM_EVENT); } }; diff --git a/include/llvm/XRay/XRayRecord.h b/include/llvm/XRay/XRayRecord.h index 68c91a40fed1e..5c5e9f436f4a5 100644 --- a/include/llvm/XRay/XRayRecord.h +++ b/include/llvm/XRay/XRayRecord.h @@ -16,6 +16,7 @@ #define LLVM_XRAY_XRAY_RECORD_H #include <cstdint> +#include <vector> namespace llvm { namespace xray { @@ -53,7 +54,7 @@ struct XRayFileHeader { /// This may or may not correspond to actual record types in the raw trace (as /// the loader implementation may synthesize this information in the process of /// of loading). -enum class RecordTypes { ENTER, EXIT }; +enum class RecordTypes { ENTER, EXIT, TAIL_EXIT, ENTER_ARG }; struct XRayRecord { /// The type of record. @@ -73,6 +74,9 @@ struct XRayRecord { /// The thread ID for the currently running thread. uint32_t TId; + + /// The function call arguments. + std::vector<uint64_t> CallArgs; }; } // namespace xray diff --git a/include/llvm/XRay/YAMLXRayRecord.h b/include/llvm/XRay/YAMLXRayRecord.h index 7e1a4112818ed..b436aefb1e8fd 100644 --- a/include/llvm/XRay/YAMLXRayRecord.h +++ b/include/llvm/XRay/YAMLXRayRecord.h @@ -37,6 +37,7 @@ struct YAMLXRayRecord { std::string Function; uint64_t TSC; uint32_t TId; + std::vector<uint64_t> CallArgs; }; struct YAMLXRayTrace { @@ -54,6 +55,8 @@ template <> struct ScalarEnumerationTraits<xray::RecordTypes> { static void enumeration(IO &IO, xray::RecordTypes &Type) { IO.enumCase(Type, "function-enter", xray::RecordTypes::ENTER); IO.enumCase(Type, "function-exit", xray::RecordTypes::EXIT); + IO.enumCase(Type, "function-tail-exit", xray::RecordTypes::TAIL_EXIT); + IO.enumCase(Type, "function-enter-arg", xray::RecordTypes::ENTER_ARG); } }; @@ -73,6 +76,7 @@ template <> struct MappingTraits<xray::YAMLXRayRecord> { IO.mapRequired("type", Record.RecordType); IO.mapRequired("func-id", Record.FuncId); IO.mapOptional("function", Record.Function); + IO.mapOptional("args", Record.CallArgs); IO.mapRequired("cpu", Record.CPU); IO.mapRequired("thread", Record.TId); IO.mapRequired("kind", Record.Type); |
