Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable pcycle counting. #96

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion target/hexagon/translate.c
Original file line number Diff line number Diff line change
@@ -136,7 +136,6 @@ static inline void gen_precise_exception(int excp, target_ulong PC)
tcg_gen_movi_tl(hex_cause_code, excp);
gen_exception(HEX_EVENT_PRECISE, PC);
}
#endif

static inline void gen_pcycle_counters(DisasContext *ctx)
{
@@ -145,6 +144,7 @@ static inline void gen_pcycle_counters(DisasContext *ctx)
ctx->num_cycles = 0;
}
}
#endif

static void gen_exec_counters(DisasContext *ctx)
{
@@ -154,6 +154,10 @@ static void gen_exec_counters(DisasContext *ctx)
hex_gpr[HEX_REG_QEMU_INSN_CNT], ctx->num_insns);
tcg_gen_addi_tl(hex_gpr[HEX_REG_QEMU_HVX_CNT],
hex_gpr[HEX_REG_QEMU_HVX_CNT], ctx->num_hvx_insns);

#ifndef CONFIG_USER_ONLY
gen_pcycle_counters(ctx);
#endif
}

static bool use_goto_tb(DisasContext *ctx, target_ulong dest)