[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 14/55] plugin-gen: add module for TCG-related code
From: |
Richard Henderson |
Subject: |
Re: [PATCH v5 14/55] plugin-gen: add module for TCG-related code |
Date: |
Mon, 14 Oct 2019 08:23:42 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 10/14/19 3:49 AM, Alex Bennée wrote:
> From: "Emilio G. Cota" <address@hidden>
>
> We first inject empty instrumentation from translator_loop.
> After translation, we go through the plugins to see what
> they want to register for, filling in the empty instrumentation.
> If if turns out that some instrumentation remains unused, we
> remove it.
>
> This approach supports the following features:
>
> - Inlining TCG code for simple operations. Note that we do not
> export TCG ops to plugins. Instead, we give them a C API to
> insert inlined ops. So far we only support adding an immediate
> to a u64, e.g. to count events.
>
> - "Direct" callbacks. These are callbacks that do not go via
> a helper. Instead, the helper is defined at run-time, so that
> the plugin code is directly called from TCG. This makes direct
> callbacks as efficient as possible; they are therefore used
> for very frequent events, e.g. memory callbacks.
>
> - Passing the host address to memory callbacks. Most of this
> is implemented in a later patch though.
>
> - Instrumentation of memory accesses performed from helpers.
> See the corresponding comment, as well as a later patch.
>
> Signed-off-by: Emilio G. Cota <address@hidden>
> [AJB: add alloc_tcg_plugin_context, use glib, rm hwaddr]
> Signed-off-by: Alex Bennée <address@hidden>
>
> ---
> v3
> - introduce alloc_tcg_plugin_context
> - allocate GPtrArray for tracking insns
> v4
> - remove hwaddr variants of callbacks
> - pass full 32bit meminfo
> - remove now unused code
> - move plugin_gen_from into .c file
> v5
> - fix offsets when storing mem callbacks.
> - remove #if 0 code no longer needed
> ---
Reviewed-by: Richard Henderson <address@hidden>
r~
- [PATCH v5 42/55] tests/tcg: move "virtual" tests to EXTRA_TESTS, (continued)
- [PATCH v5 42/55] tests/tcg: move "virtual" tests to EXTRA_TESTS, Alex Bennée, 2019/10/14
- [PATCH v5 45/55] tests/plugin: add a hotblocks plugin, Alex Bennée, 2019/10/14
- [PATCH v5 29/55] target/m68k: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 26/55] target/sh4: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 48/55] tests/plugin: add hotpages plugin to breakdown memory access patterns, Alex Bennée, 2019/10/14
- [PATCH v5 16/55] tcg: let plugins instrument virtual memory accesses, Alex Bennée, 2019/10/14
- [PATCH v5 14/55] plugin-gen: add module for TCG-related code, Alex Bennée, 2019/10/14
- Re: [PATCH v5 14/55] plugin-gen: add module for TCG-related code,
Richard Henderson <=
- [PATCH v5 35/55] translator: inject instrumentation from plugins, Alex Bennée, 2019/10/14
- [PATCH v5 28/55] target/hppa: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 34/55] target/openrisc: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 19/55] *-user: notify plugin of exit, Alex Bennée, 2019/10/14
- [PATCH v5 23/55] translator: add translator_ld{ub,sw,uw,l,q}, Alex Bennée, 2019/10/14
- Re: [PATCH v5 23/55] translator: add translator_ld{ub,sw,uw,l,q}, Richard Henderson, 2019/10/14
- Re: [PATCH v5 23/55] translator: add translator_ld{ub,sw,uw,l,q}, Peter Maydell, 2019/10/14
- Re: [PATCH v5 23/55] translator: add translator_ld{ub,sw,uw,l,q}, Alex Bennée, 2019/10/15
- Re: [PATCH v5 23/55] translator: add translator_ld{ub,sw,uw,l,q}, Alex Bennée, 2019/10/15
- Re: [PATCH v5 23/55] translator: add translator_ld{ub,sw,uw,l,q}, Alex Bennée, 2019/10/15