llvm/llvm/tools/llvm-xray/xray-fdr-dump.cpp

//===- xray-fdr-dump.cpp: XRay FDR Trace Dump Tool ------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Implements the FDR trace dumping tool, using the libraries for handling FDR
// mode traces specifically.
//
//===----------------------------------------------------------------------===//
#include "xray-registry.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/XRay/BlockIndexer.h"
#include "llvm/XRay/BlockPrinter.h"
#include "llvm/XRay/BlockVerifier.h"
#include "llvm/XRay/FDRRecordConsumer.h"
#include "llvm/XRay/FDRRecordProducer.h"
#include "llvm/XRay/FDRRecords.h"
#include "llvm/XRay/FileHeaderReader.h"
#include "llvm/XRay/RecordPrinter.h"

usingnamespacellvm;
usingnamespacexray;

static cl::SubCommand Dump("fdr-dump", "FDR Trace Dump");
static cl::opt<std::string> DumpInput(cl::Positional,
                                      cl::desc("<xray fdr mode log>"),
                                      cl::Required, cl::sub(Dump));
static cl::opt<bool> DumpVerify("verify",
                                cl::desc("verify structure of the log"),
                                cl::init(false), cl::sub(Dump));

static CommandRegistration Unused(&Dump, []() -> Error {});