EightBit/Z80/inc/Profiler.h
Adrian.Conlon 67fa2a7afe Incorporate disassembly into address profile output.
Signed-off-by: Adrian.Conlon <adrian.conlon@arup.com>
2017-06-19 17:37:41 +01:00

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;
Disassembler& m_disassembler;
Z80& m_cpu;
void dumpInstructionProfiles() const;
void dumpAddressProfiles() const;
};
}