-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the actual written address range in DC ZVA's memory operand #4400
Comments
Another complexity with the existing handling of dynamorio/core/ir/aarch64/codec.txt Line 282 in d179619
I tried adding another codec rule, specific to DC ZVA , that considers memx0 as a destination instead. Something like110101010000101101110100001xxxxx sys memx0 : sysops but the pattern overlaps with the existing pattern for sys
We might have to either:
|
Improving the codec is #4393, and splitting up SYS is a key motivator for doing so. |
Just checking my understanding: this IR change would require adding a new member in Line 1413 in 0762e11
and then use this in Line 385 in 0762e11
Also, |
No, rather than inventing a new kind of operand, we would simply discard the original address and store a base+disp equal to what is actually referenced, treating the encoded address as just an encoding detail. That is what I wrote: instead of the encoded address. And that is why I mentioned the (minor) downside of re-encoding fidelity (xref #3339) b/c of the lost info on a modified instruction. Any scheme using the actual linear address range affected in the IR also has the problem that the decoder now has to know the cache line size, bringing up cross-machine and cross-arch decoding consistency issues. |
I guess we would make this a decoder setting like the ISA mode (dr_get_isa_mode()) and add routines for setting it? The alternative is to leave the original address there as part of some new type of operand, forcing updates to all operand handling code to handle the new type, hoping to defer the cache line size evaluation to instrumentation where we are less likely to support cross-machine operation and where the underlying line size being used is reasonable. |
Add traced target processor's cache line size to offline trace header. Back-align memory address in DC ZVA during offline trace post-processing, using the cache line size added in header. Add trace analyzer to existing test for AArch64 flush instrs, and re-purpose it for AArch64 SYS operations in general. Issue: #4400
…aces (#4444) Fixes alignment, size and memref type for address range zeroed using DC ZVA operation on AArch64. Adds traced processor's cache line size to header of offline raw traces. Using this, during offline trace post-processing, back-align the memory address in DC ZVA and mark the operation as a cache line sized store. This is a workaround for offline traces, and doesn't help in correctness of DC ZVA representation in online traces. Adds the cache line size as a new marker type in final offline and online traces. For old raw traces without cache line size in header, the present processor's cache line size is used as default during raw2trace. Repurposes burst_flush_aarch64 to test AArch64 SYS operations in general, and renames it to burst_aarch64_sys. Adds an offline trace analyser test to verify DC ZVA fixes and new marker. Adds new check to trace invariant test that verifies presence of cache line size marker in online traces. Updates offline trace for tool.drcacheoff.altbindir test to add cache line size in header. Issue: #4400
…aces (#4444) Fixes alignment, size and memref type for address range zeroed using DC ZVA operation on AArch64. Adds traced processor's cache line size to header of offline raw traces. Using this, during offline trace post-processing, back-align the memory address in DC ZVA and mark the operation as a cache line sized store. This is a workaround for offline traces, and doesn't help in correctness of DC ZVA representation in online traces. Adds the cache line size as a new marker type in final offline and online traces. For old raw traces without cache line size in header, the present processor's cache line size is used as default during raw2trace. Repurposes burst_flush_aarch64 to test AArch64 SYS operations in general, and renames it to burst_aarch64_sys. Adds an offline trace analyser test to verify DC ZVA fixes and new marker. Adds new check to trace invariant test that verifies presence of cache line size marker in online traces. Updates offline trace for tool.drcacheoff.altbindir test to add cache line size in header. Issue: #4400
Unlike the other DC cache operations, DC ZVA is not a cache management
operation but more of a regular store instruction. But clients analyzing
it need its actual start address (back-aligned) and size (cache line size).
The easiest thing for a client would be to have that in the IR operand,
instead of the encoded address: though that brings up issues of re-encoding
fidelity (xref #3339).
The text was updated successfully, but these errors were encountered: