LLVM 23.0.0git
ETMTraceDecoder.h
Go to the documentation of this file.
1//===-- ETMTraceDecoder.h - ETM Trace Decoder -------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_PROFILEDATA_ETMTRACEDECODER_H
10#define LLVM_PROFILEDATA_ETMTRACEDECODER_H
11
12#include "llvm/ADT/ArrayRef.h"
13#include "llvm/ADT/StringRef.h"
14#include "llvm/Support/Error.h"
15
16#include <cstdint>
17#include <memory>
18
19namespace llvm {
20
21class Triple;
22namespace object {
23class Binary;
24}
25
27public:
28 virtual ~ETMDecoder() = default;
29
30 class Callback {
31 public:
32 virtual ~Callback() = default;
33 virtual void processInstructionRange(uint64_t Start, uint64_t End) = 0;
34 };
35
37 create(const object::Binary &Binary, const Triple &TargetTriple,
38 uint8_t TraceID = 0x10);
39
41 Callback &TraceCallback) = 0;
42};
43
44} // namespace llvm
45
46#endif // LLVM_PROFILEDATA_ETMTRACEDECODER_H
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
virtual ~Callback()=default
virtual void processInstructionRange(uint64_t Start, uint64_t End)=0
static Expected< std::unique_ptr< ETMDecoder > > create(const object::Binary &Binary, const Triple &TargetTriple, uint8_t TraceID=0x10)
virtual Error processTrace(ArrayRef< uint8_t > TraceData, Callback &TraceCallback)=0
virtual ~ETMDecoder()=default
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
Tagged union holding either a T or a Error.
Definition Error.h:485
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
This is an optimization pass for GlobalISel generic memory operations.