Compress snapshots using a simple, extensible 1D-compression.
Typically reduces storage overhead for snapshot maps by 60%. The extensible format is a prerequisite for the next redesign steps: Eliminate IR_FRAME and implement return-to-lower-frame.
This commit is contained in:
@@ -14,6 +14,19 @@ LJ_FUNC void lj_snap_add(jit_State *J);
|
||||
LJ_FUNC void lj_snap_shrink(jit_State *J);
|
||||
LJ_FUNC void lj_snap_regspmap(uint16_t *rsmap, Trace *T, SnapNo snapno);
|
||||
LJ_FUNC void lj_snap_restore(jit_State *J, void *exptr);
|
||||
LJ_FUNC void lj_snap_grow_buf_(jit_State *J, MSize need);
|
||||
LJ_FUNC void lj_snap_grow_map_(jit_State *J, MSize need);
|
||||
|
||||
static LJ_AINLINE void lj_snap_grow_buf(jit_State *J, MSize need)
|
||||
{
|
||||
if (LJ_UNLIKELY(need > J->sizesnap)) lj_snap_grow_buf_(J, need);
|
||||
}
|
||||
|
||||
static LJ_AINLINE void lj_snap_grow_map(jit_State *J, MSize need)
|
||||
{
|
||||
if (LJ_UNLIKELY(need > J->sizesnapmap)) lj_snap_grow_map_(J, need);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user