qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/7] trace: Add event "guest_bbl_after"


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 5/7] trace: Add event "guest_bbl_after"
Date: Wed, 13 Sep 2017 10:34:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

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.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]