Richard Henderson writes: > On 09/10/2017 09:31 AM, Lluís Vilanova wrote: >> +void translator__gen_goto_tb(TCGContext *ctx) >> +{ >> + if (ctx->disas.in_guest_code && >> + (TRACE_GUEST_BBL_AFTER_ENABLED)) { >> + if (ctx->disas.inline_label == NULL) { >> + ctx->disas.inline_label = gen_new_inline_label(); >> + } >> + gen_set_inline_point(ctx->disas.inline_label); >> + /* disable next exit_tb */ >> + ctx->disas.seen_goto_tb = true; >> + } >> +} >> + >> +void translator__gen_exit_tb(TCGContext *ctx) >> +{ >> + if (ctx->disas.in_guest_code && !ctx->disas.seen_goto_tb && >> + (TRACE_GUEST_BBL_AFTER_ENABLED)) { >> + if (ctx->disas.inline_label == NULL) { >> + ctx->disas.inline_label = gen_new_inline_label(); >> + } >> + gen_set_inline_point(ctx->disas.inline_label); >> + /* enable next exit_tb */ >> + ctx->disas.seen_goto_tb = false; >> + } >> +}
> I don't understand why you wouldn't just modify tcg_gen_goto_tb and > tcg_gen_exit_tb instead. I prefer to keep all generic translation-related tracing on a single file, where it is easier to reason about. Cheers, Lluis