ROSS
Functions
tw-state.c File Reference
#include <ross.h>
#include <assert.h>
#include "lz4.h"

Go to the source code of this file.

Functions

void tw_snapshot (tw_lp *lp, size_t state_sz)
 
long tw_snapshot_delta (tw_lp *lp, size_t state_sz)
 
void tw_snapshot_restore (tw_lp *lp, size_t state_sz)
 

Function Documentation

void tw_snapshot ( tw_lp lp,
size_t  state_sz 
)

Make a snapshot of the LP state and store it into the delta buffer

Definition at line 9 of file tw-state.c.

References tw_lp::cur_state, tw_pe::delta_buffer, and tw_lp::pe.

long tw_snapshot_delta ( tw_lp lp,
size_t  state_sz 
)

Create the delta from the current state and the snapshot. Compress it.

Returns
The size of the compressed data placed in delta_buffer[1].

Definition at line 21 of file tw-state.c.

References buddy_alloc(), tw_pe::cur_event, tw_lp::cur_state, tw_event::delta_buddy, tw_pe::delta_buffer, tw_event::delta_size, g_tw_delta_sz, g_tw_lz4_knob, g_tw_pe, LZ4_compress_fast_extState(), tw_lp::pe, tw_statistics::s_buddy, tw_statistics::s_lz4, tw_pe::stats, tw_clock_read(), tw_error(), and TW_LOC.

Here is the call graph for this function:

void tw_snapshot_restore ( tw_lp lp,
size_t  state_sz 
)

Restore the state of lp to the (decompressed) data held in buffer

Definition at line 55 of file tw-state.c.

References tw_pe::cur_event, tw_lp::cur_state, tw_event::delta_buddy, tw_pe::delta_buffer, g_tw_pe, LZ4_decompress_fast(), tw_lp::pe, tw_statistics::s_lz4, tw_pe::stats, tw_clock_read(), tw_error(), and TW_LOC.

Here is the call graph for this function: