Re: Plugin Memory Callback Debugging

2023-01-06 Thread Emilio Cota
On Fri, Jan 6, 2023, 5:31 AM Alex Bennée wrote: > Are you going to be able to post the patches soon? I'd like to get the > fixes in as early in the cycle as possible. > I intend to post this series on Sunday. Thanks, Emilio

Re: Plugin Memory Callback Debugging

2023-01-06 Thread Alex Bennée
Aaron Lindsay writes: > Emilio, > > On Dec 18 00:24, Emilio Cota wrote: >> On Tue, Nov 29, 2022 at 15:37:51 -0500, Aaron Lindsay wrote: >> (snip) >> > > Does this hint that there are cases where reset cpu->plugin_mem_cbs to >> > > NULL is >> > > getting optimized away, but not the code to set

Re: Plugin Memory Callback Debugging

2022-12-19 Thread Aaron Lindsay
Emilio, On Dec 18 00:24, Emilio Cota wrote: > On Tue, Nov 29, 2022 at 15:37:51 -0500, Aaron Lindsay wrote: > (snip) > > > Does this hint that there are cases where reset cpu->plugin_mem_cbs to > > > NULL is > > > getting optimized away, but not the code to set it in the first place? > > > > Is

Re: Plugin Memory Callback Debugging

2022-12-17 Thread Emilio Cota
On Tue, Nov 29, 2022 at 15:37:51 -0500, Aaron Lindsay wrote: (snip) > > Does this hint that there are cases where reset cpu->plugin_mem_cbs to NULL > > is > > getting optimized away, but not the code to set it in the first place? > > Is there anyone who could help take a look at this from the

Re: Plugin Memory Callback Debugging

2022-12-01 Thread Alex Bennée
Aaron Lindsay writes: > On Nov 22 10:57, Aaron Lindsay wrote: >> On Nov 21 18:22, Richard Henderson wrote: >> > On 11/21/22 13:51, Alex Bennée wrote: >> > > >> > > Aaron Lindsay writes: >> > > >> > > > On Nov 15 22:36, Alex Bennée wrote: >> > > > > Aaron Lindsay writes: >> > > > > > I

Re: Plugin Memory Callback Debugging

2022-11-29 Thread Aaron Lindsay via
On Nov 22 10:57, Aaron Lindsay wrote: > On Nov 21 18:22, Richard Henderson wrote: > > On 11/21/22 13:51, Alex Bennée wrote: > > > > > > Aaron Lindsay writes: > > > > > > > On Nov 15 22:36, Alex Bennée wrote: > > > > > Aaron Lindsay writes: > > > > > > I believe the code *should* always reset

Re: Plugin Memory Callback Debugging

2022-11-22 Thread Aaron Lindsay via
On Nov 21 22:02, Alex Bennée wrote: > > Aaron Lindsay writes: > > > Sorry, left off the very end of my timeline: > > > > On Nov 18 16:58, Aaron Lindsay wrote: > >> I have, so far, discovered the following timeline: > >> 1. My plugin receives a instruction execution callback for a load > >>

Re: Plugin Memory Callback Debugging

2022-11-22 Thread Aaron Lindsay via
On Nov 21 18:22, Richard Henderson wrote: > On 11/21/22 13:51, Alex Bennée wrote: > > > > Aaron Lindsay writes: > > > > > On Nov 15 22:36, Alex Bennée wrote: > > > > Aaron Lindsay writes: > > > > > I believe the code *should* always reset `cpu->plugin_mem_cbs` to > > > > > NULL at the > > > >

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Richard Henderson
On 11/21/22 13:51, Alex Bennée wrote: Aaron Lindsay writes: On Nov 15 22:36, Alex Bennée wrote: Aaron Lindsay writes: I believe the code *should* always reset `cpu->plugin_mem_cbs` to NULL at the end of an instruction/TB's execution, so its not exactly clear to me how this is occurring.

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Alex Bennée
Aaron Lindsay writes: > Sorry, left off the very end of my timeline: > > On Nov 18 16:58, Aaron Lindsay wrote: >> I have, so far, discovered the following timeline: >> 1. My plugin receives a instruction execution callback for a load >>instruction. At this time, cpu->plugin_mem_cbs points

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Alex Bennée
Aaron Lindsay writes: > On Nov 15 22:36, Alex Bennée wrote: >> Aaron Lindsay writes: >> > I believe the code *should* always reset `cpu->plugin_mem_cbs` to NULL at >> > the >> > end of an instruction/TB's execution, so its not exactly clear to me how >> > this >> > is occurring. However, I

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Aaron Lindsay via
On Nov 15 22:36, Alex Bennée wrote: > Aaron Lindsay writes: > > I believe the code *should* always reset `cpu->plugin_mem_cbs` to NULL at > > the > > end of an instruction/TB's execution, so its not exactly clear to me how > > this > > is occurring. However, I suspect it may be relevant that we

Re: Plugin Memory Callback Debugging

2022-11-18 Thread Aaron Lindsay via
On Nov 15 22:36, Alex Bennée wrote: > > Aaron Lindsay writes: > > > Hello, > > > > I have been wrestling with what might be a bug in the plugin memory > > callbacks. The immediate error is that I hit the > > `g_assert_not_reached()` in the 'default:' case in > > qemu_plugin_vcpu_mem_cb,

Re: Plugin Memory Callback Debugging

2022-11-18 Thread Aaron Lindsay
Sorry, left off the very end of my timeline: On Nov 18 16:58, Aaron Lindsay wrote: > I have, so far, discovered the following timeline: > 1. My plugin receives a instruction execution callback for a load >instruction. At this time, cpu->plugin_mem_cbs points to the same >memory which will

Re: Plugin Memory Callback Debugging

2022-11-15 Thread Emilio Cota
On Tue, Nov 15, 2022 at 22:36:07 +, Alex Bennée wrote: > This is exactly the sort of thing rr is great for. Can you trigger it in > that? > > https://rr-project.org/ The sanitizers should also help. For TLB flush tracing, defining DEBUG_TLB at the top of cputlb.c might be useful.

Re: Plugin Memory Callback Debugging

2022-11-15 Thread Alex Bennée
Aaron Lindsay writes: > Hello, > > I have been wrestling with what might be a bug in the plugin memory > callbacks. The immediate error is that I hit the > `g_assert_not_reached()` in the 'default:' case in > qemu_plugin_vcpu_mem_cb, indicating the callback type was invalid. When > breaking on

Plugin Memory Callback Debugging

2022-11-15 Thread Aaron Lindsay
Hello, I have been wrestling with what might be a bug in the plugin memory callbacks. The immediate error is that I hit the `g_assert_not_reached()` in the 'default:' case in qemu_plugin_vcpu_mem_cb, indicating the callback type was invalid. When breaking on this assertion in gdb, the contents of