[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 19/22] tcg: introduce tcg_context_clone
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [PATCH 19/22] tcg: introduce tcg_context_clone |
Date: |
Sun, 9 Jul 2017 17:04:38 -0400 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sun, Jul 09, 2017 at 10:48:27 -1000, Richard Henderson wrote:
> On 07/08/2017 09:50 PM, Emilio G. Cota wrote:
> >@@ -409,6 +411,18 @@ void tcg_context_init(TCGContext *s)
> > }
> > /*
> >+ * Clone the initial TCGContext. Used by TCG threads to copy the TCGContext
> >+ * set up by their parent thread via tcg_context_init().
> >+ */
> >+void tcg_context_clone(TCGContext *s)
> >+{
> >+ if (unlikely(tcg_init_ctx == NULL || tcg_init_ctx == s)) {
> >+ tcg_abort();
> >+ }
> >+ memcpy(s, tcg_init_ctx, sizeof(*s));
> >+}
>
> Under what conditions will this be called? How much of this might you need
> to zero out again after the fact?
I checked the profile/tb counts and all of them are zero when this
is called, which is right after the thread has been created.
But it is conceivable that those counts might be !0 for some targets,
so yes it'd be better to actively zero out those.
I don't think there are any other fields that would have to be zeroed
out.
E.
- Re: [Qemu-devel] [PATCH 03/22] cputlb: bring back tlb_flush_count under !TLB_DEBUG, (continued)
Re: [Qemu-devel] [PATCH 03/22] cputlb: bring back tlb_flush_count under !TLB_DEBUG, Alex Bennée, 2017/07/12
[Qemu-devel] [PATCH 15/22] gen-icount: fold exitreq_label into TCGContext, Emilio G. Cota, 2017/07/09
[Qemu-devel] [PATCH 05/22] exec-all: fix typos in TranslationBlock's documentation, Emilio G. Cota, 2017/07/09
[Qemu-devel] [PATCH 19/22] tcg: introduce tcg_context_clone, Emilio G. Cota, 2017/07/09
[Qemu-devel] [PATCH 22/22] translate-all: do not hold tb_lock during code generation in softmmu, Emilio G. Cota, 2017/07/09
[Qemu-devel] [PATCH 07/22] tcg/i386: constify tcg_target_callee_save_regs, Emilio G. Cota, 2017/07/09