mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 18:00:46 +02:00
In most cases we aren't using JIT symbols but still creating the perf map file. Early check if we should generate the file or not, this way we stop polluting the /tmp folder.
27 lines
710 B
C++
27 lines
710 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <cstdio>
|
|
#include <memory>
|
|
#include <string_view>
|
|
|
|
namespace FEXCore {
|
|
class JITSymbols final {
|
|
public:
|
|
JITSymbols();
|
|
~JITSymbols();
|
|
|
|
void InitFile();
|
|
void Register(const void *HostAddr, uint64_t GuestAddr, uint32_t CodeSize);
|
|
void Register(const void *HostAddr, uint32_t CodeSize, std::string_view Name);
|
|
void Register(const void *HostAddr, uint32_t CodeSize, std::string_view Name, uintptr_t Offset);
|
|
void RegisterNamedRegion(const void *HostAddr, uint32_t CodeSize, std::string_view Name);
|
|
void RegisterJITSpace(const void *HostAddr, uint32_t CodeSize);
|
|
|
|
private:
|
|
using FILEPtr = std::unique_ptr<FILE, decltype(&std::fclose)>;
|
|
|
|
FILEPtr fp;
|
|
};
|
|
}
|