EightBit/LR35902/inc/Profiler.h
Adrian.Conlon 93bac42547 Bring LR35902 a little more in line with the Z80 implementation.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-06-09 11:42:32 +01:00

30 lines
478 B
C++

#pragma once
#include <array>
#include <cstdint>
#include "Disassembler.h"
namespace EightBit {
class LR35902;
class Profiler {
public:
Profiler(LR35902& cpu);
void add(uint16_t address, uint8_t instruction);
void dump() const;
private:
std::array<uint64_t, 0x100> m_instructions;
std::array<uint64_t, 0x10000> m_addresses;
LR35902& m_cpu;
Disassembler m_disassembler;
void dumpInstructionProfiles() const;
void dumpAddressProfiles() const;
};
}