Re: [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-11-28 Thread Emilio G. Cota
On Wed, Nov 28, 2018 at 12:50:23 +, Alex Bennée wrote: > Emilio G. Cota writes: > > I just wrote some code to go over the list and add TB callbacks, > > which go right before the first insn_start Op. The code is hack-ish > > in that we first generate the TCG ops we need, which get added to >

Re: [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-11-28 Thread Alex Bennée
Emilio G. Cota writes: > On Tue, Nov 27, 2018 at 14:06:57 -0500, Emilio G. Cota wrote: >> On Tue, Nov 27, 2018 at 14:48:11 +, Alex Bennée wrote: >> > With a little tweaking to the TCG we could then insert >> > our instrumentation at the end of the pass with all the knowledge we >> > want

Re: [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-11-27 Thread Emilio G. Cota
On Tue, Nov 27, 2018 at 14:06:57 -0500, Emilio G. Cota wrote: > On Tue, Nov 27, 2018 at 14:48:11 +, Alex Bennée wrote: > > With a little tweaking to the TCG we could then insert > > our instrumentation at the end of the pass with all the knowledge we > > want to export to the plugin. > >

Re: [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-11-27 Thread Emilio G. Cota
On Tue, Nov 27, 2018 at 14:48:11 +, Alex Bennée wrote: > Emilio G. Cota writes: > > On Mon, Nov 26, 2018 at 15:16:00 +, Alex Bennée wrote: > >> Emilio G. Cota writes: > > (snip) > >> > +if (tb_trans_cb && first_pass) { > >> > +qemu_plugin_tb_trans_cb(cpu, plugin_tb); > >> > +

Re: [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-11-27 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Nov 26, 2018 at 15:16:00 +, Alex Bennée wrote: >> Emilio G. Cota writes: > (snip) >> > +if (tb_trans_cb && first_pass) { >> > +qemu_plugin_tb_trans_cb(cpu, plugin_tb); >> > +first_pass = false; >> > +goto translate; >> > +}

Re: [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-11-26 Thread Emilio G. Cota
On Mon, Nov 26, 2018 at 15:16:00 +, Alex Bennée wrote: > Emilio G. Cota writes: (snip) > > +if (tb_trans_cb && first_pass) { > > +qemu_plugin_tb_trans_cb(cpu, plugin_tb); > > +first_pass = false; > > +goto translate; > > +} > > So the only reason we are doing

Re: [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-11-26 Thread Alex Bennée
Emilio G. Cota writes: > The second pass only occurs when a plugin has subscribed to > TB translation events. > > Signed-off-by: Emilio G. Cota > --- > tcg/tcg.h | 8 > accel/tcg/translator.c | 91 +- > 2 files changed, 97

[Qemu-devel] [RFC 38/48] translator: implement 2-pass translation

2018-10-25 Thread Emilio G. Cota
The second pass only occurs when a plugin has subscribed to TB translation events. Signed-off-by: Emilio G. Cota --- tcg/tcg.h | 8 accel/tcg/translator.c | 91 +- 2 files changed, 97 insertions(+), 2 deletions(-) diff --git