#include "llvm/XRay/Profile.h"
#include "llvm/Support/DataExtractor.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/XRay/Trace.h"
#include <deque>
#include <memory>
namespace llvm {
namespace xray {
Profile::Profile(const Profile &O) { … }
Profile &Profile::operator=(const Profile &O) { … }
namespace {
struct BlockHeader { … };
static Expected<BlockHeader> readBlockHeader(DataExtractor &Extractor,
uint64_t &Offset) { … }
static Expected<std::vector<Profile::FuncID>> readPath(DataExtractor &Extractor,
uint64_t &Offset) { … }
static Expected<Profile::Data> readData(DataExtractor &Extractor,
uint64_t &Offset) { … }
}
Error Profile::addBlock(Block &&B) { … }
Expected<std::vector<Profile::FuncID>> Profile::expandPath(PathID P) const { … }
Profile::PathID Profile::internPath(ArrayRef<FuncID> P) { … }
Profile mergeProfilesByThread(const Profile &L, const Profile &R) { … }
Profile mergeProfilesByStack(const Profile &L, const Profile &R) { … }
Expected<Profile> loadProfile(StringRef Filename) { … }
namespace {
struct StackEntry { … };
}
Expected<Profile> profileFromTrace(const Trace &T) { … }
}
}