pub struct Rv32StackUsage {
pub contract_address: ContractAddress,
pub method_id: u64,
pub sp_initial: u32,
pub sp_min: u32,
}Expand description
What an rv32 guest did with its stack pointer over one invocation.
hogd records one of these per rv32 invocation, when the invocation ends,
in Debug builds with HOGD_RV32_STACK_USAGE on – which the prebuilt
test_ffi library this crate links is. sp_initial is the first value the
guest stored to sp (x2): the stack top its _start established.
sp_min is the lowest, the deepest point the stack reached, so
bytes_used is their difference. A fused
lui sp; addi sp, sp, imm prologue stores only the constant it
materializes, so sp_initial is the top the program established, not the
lui intermediate.
Fields§
§contract_address: ContractAddressThe invoked contract.
method_id: u64The invoked method id.
sp_initial: u32First value the guest wrote to sp, or SP_UNWRITTEN.
sp_min: u32Lowest value the guest wrote to sp, or SP_UNWRITTEN.
Implementations§
Trait Implementations§
Source§impl Clone for Rv32StackUsage
impl Clone for Rv32StackUsage
impl Copy for Rv32StackUsage
Source§impl Debug for Rv32StackUsage
impl Debug for Rv32StackUsage
impl Eq for Rv32StackUsage
Source§impl PartialEq for Rv32StackUsage
impl PartialEq for Rv32StackUsage
impl StructuralPartialEq for Rv32StackUsage
Auto Trait Implementations§
impl Freeze for Rv32StackUsage
impl RefUnwindSafe for Rv32StackUsage
impl Send for Rv32StackUsage
impl Sync for Rv32StackUsage
impl Unpin for Rv32StackUsage
impl UnsafeUnpin for Rv32StackUsage
impl UnwindSafe for Rv32StackUsage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more