DynamoRIO / DynamoRIO/drmemory
Reduce packed callstack memory usage
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
_From [rnk@google.com](https://code.google.com/u/rnk@google.com/) on May 15, 2012 11:35:20_
Thoughts while working on prefix trie: Our packed callstacks can be improved (should file issue). A packed frame is currently 12 bytes:
struct _packed_frame_t {
struct _frame_loc_t {
app_pc addr; # semi redundant with mod+offs, not needed for syscall
const char *syscall_aux; # only needed for syscall, null 99% of the time
} loc;
uint modoffs : 24;
uint modname_idx : 8;
};
Since a syscall frame can really only be in the first frame, it might be possible to move the syscall_aux field into the packed_callstack_t struct.
We could give those extra bits to modoffs + modname_idx and drop the extra full_frame_t indirection. This would even work for x64, since modules larger than 2 GB are hard to create (rip-rel uses 32-bit offset).
The addr field looks redundant with modoffs if you have the base stored somewhere else, but we actually don't have that data in mod_name_t because modules can be reloaded. We'd either have to track all module loads and their bases and use modname_idx to point at that instead.
_Original issue: http://code.google.com/p/drmemory/issues/detail?id=887_
Contributor guide
Assessment
This issue has not been assessed yet.