diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-11-21 00:33:17 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-11-21 00:33:17 +0000 |
commit | ed677fa0892ab5730a1bb7d67e46bdb7e8d54e20 (patch) | |
tree | 2260eea254f6c3b153f8f041a93748f18bc741b9 /tools | |
parent | bb5acf9b6f7315e96108b323bca0c0a491297612 (diff) |
xray-record-yaml.h: Remove unused file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-xray/xray-record-yaml.h | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/tools/llvm-xray/xray-record-yaml.h b/tools/llvm-xray/xray-record-yaml.h deleted file mode 100644 index d807f8c0ff0..00000000000 --- a/tools/llvm-xray/xray-record-yaml.h +++ /dev/null @@ -1,102 +0,0 @@ -//===- xray-record-yaml.h - XRay Record YAML Support Definitions ----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Types and traits specialisations for YAML I/O of XRay log entries. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_TOOLS_LLVM_XRAY_XRAY_RECORD_YAML_H -#define LLVM_TOOLS_LLVM_XRAY_XRAY_RECORD_YAML_H - -#include <type_traits> - -#include "xray-record.h" -#include "llvm/Support/YAMLTraits.h" - -namespace llvm { -namespace xray { - -struct YAMLXRayFileHeader { - uint16_t Version; - uint16_t Type; - bool ConstantTSC; - bool NonstopTSC; - uint64_t CycleFrequency; -}; - -struct YAMLXRayRecord { - uint16_t RecordType; - uint8_t CPU; - RecordTypes Type; - int32_t FuncId; - std::string Function; - uint64_t TSC; - uint32_t TId; -}; - -struct YAMLXRayTrace { - YAMLXRayFileHeader Header; - std::vector<YAMLXRayRecord> Records; -}; - -using XRayRecordStorage = - std::aligned_storage<sizeof(XRayRecord), alignof(XRayRecord)>::type; - -} // namespace xray - -namespace yaml { - -// YAML Traits -// ----------- -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); - } -}; - -template <> struct MappingTraits<xray::YAMLXRayFileHeader> { - static void mapping(IO &IO, xray::YAMLXRayFileHeader &Header) { - IO.mapRequired("version", Header.Version); - IO.mapRequired("type", Header.Type); - IO.mapRequired("constant-tsc", Header.ConstantTSC); - IO.mapRequired("nonstop-tsc", Header.NonstopTSC); - IO.mapRequired("cycle-frequency", Header.CycleFrequency); - } -}; - -template <> struct MappingTraits<xray::YAMLXRayRecord> { - static void mapping(IO &IO, xray::YAMLXRayRecord &Record) { - // FIXME: Make this type actually be descriptive - IO.mapRequired("type", Record.RecordType); - IO.mapRequired("func-id", Record.FuncId); - IO.mapOptional("function", Record.Function); - IO.mapRequired("cpu", Record.CPU); - IO.mapRequired("thread", Record.TId); - IO.mapRequired("kind", Record.Type); - IO.mapRequired("tsc", Record.TSC); - } - - static constexpr bool flow = true; -}; - -template <> struct MappingTraits<xray::YAMLXRayTrace> { - static void mapping(IO &IO, xray::YAMLXRayTrace &Trace) { - // A trace file contains two parts, the header and the list of all the - // trace records. - IO.mapRequired("header", Trace.Header); - IO.mapRequired("records", Trace.Records); - } -}; - -} // namespace yaml -} // namespace llvm - -LLVM_YAML_IS_SEQUENCE_VECTOR(xray::YAMLXRayRecord) - -#endif // LLVM_TOOLS_LLVM_XRAY_XRAY_RECORD_YAML_H |