blob: f830c7fa316c48c64f4e528532f483849e97a039 [file] [log] [blame]
Dean Michael Berrisf8f909f2017-01-10 02:38:11 +00001//===- xray-converter.h - XRay Trace Conversion ---------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// Defines the TraceConverter class for turning binary traces into
11// human-readable text and vice versa.
12//
13//===----------------------------------------------------------------------===//
14#ifndef LLVM_TOOLS_LLVM_XRAY_XRAY_CONVERTER_H
15#define LLVM_TOOLS_LLVM_XRAY_XRAY_CONVERTER_H
16
17#include "func-id-helper.h"
18#include "xray-log-reader.h"
19#include "xray-record.h"
20
21namespace llvm {
22namespace xray {
23
24class TraceConverter {
25 FuncIdConversionHelper &FuncIdHelper;
26 bool Symbolize;
27
28public:
29 TraceConverter(FuncIdConversionHelper &FuncIdHelper, bool Symbolize = false)
30 : FuncIdHelper(FuncIdHelper), Symbolize(Symbolize) {}
31
32 void exportAsYAML(const LogReader &Records, raw_ostream &OS);
33 void exportAsRAWv1(const LogReader &Records, raw_ostream &OS);
34};
35
36} // namespace xray
37} // namespace llvm
38
39#endif // LLVM_TOOLS_LLVM_XRAY_XRAY_CONVERTER_H