30#include <unicorn/unicorn.h>
50typedef enum : uint8_t {
110void prof_add(uint32_t pc,
double dt);
ELF32 image services for the board emulator (load / symbols / vectors).
prof_mode_t emu_prof_mode(void)
The latched profiler mode.
void emu_prof_set_stop_pc(uint32_t pc)
Set the RA8_EMU_STOP_PC early-stop address (0 disables).
prof_mode_t
Profiler mode parsed from RA8_EMU_PROFILE.
@ k_prof_insn
=full/=insn: exact per-instruction + calls.
@ k_prof_wall
=1: cheap chunk-start wall-time sampler.
@ k_prof_off
Disabled (no env, zero cost).
void prof_add(uint32_t pc, double dt)
Attribute wall seconds to the function owning pc (wall mode).
bool emu_prof_stop_hit(void)
Whether the RA8_EMU_STOP_PC address was reached.
void emu_prof_install(uc_engine *uc)
Arm the per-instruction profiling hook (insn mode only).
void prof_load(const emu_elf_source_t *elf)
Collect + sort FUNC symbols (RA8_EMU_PROFILE only) for PC bucketing.
void prof_report(void)
Print the top hot functions (by wall time or instruction count).
double board_now_s(void)
Monotonic wall-clock seconds.
uint64_t emu_prof_total_insns(void)
Total instructions retired under the per-instruction hook.
Annotation-attribute framework macros for ra8-firmware.
One independently owned immutable raw-descriptor ELF source.