mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-12 02:04:36 +00:00
ff2f44bbd2
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
30 lines
533 B
C++
30 lines
533 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
|
|
namespace EightBit {
|
|
|
|
class Disassembler;
|
|
class Z80;
|
|
|
|
class Profiler {
|
|
public:
|
|
Profiler(Z80& cpu, Disassembler& disassembler);
|
|
~Profiler();
|
|
|
|
void addInstruction(uint8_t instruction);
|
|
void addAddress(uint16_t address);
|
|
|
|
void dump() const;
|
|
|
|
private:
|
|
std::array<uint64_t, 0x100> m_instructions;
|
|
std::array<uint64_t, 0x10000> m_addresses;
|
|
Z80& m_cpu;
|
|
Disassembler& m_disassembler;
|
|
|
|
void dumpInstructionProfiles() const;
|
|
void dumpAddressProfiles() const;
|
|
};
|
|
} |