DynamoRIO / DynamoRIO/dynamorio

Include predicated/masked-out loads/stores in drmemtraces

Open
#7,914 2 comments 0 reactions 1 assignee Claimed by @derekbruening View on GitHub
Component-DrMemtrace Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Today, drmemtraces include load/store records only for accesses that actually committed. Masked-out, predicated-out, or otherwise conditionally excluded loads and stores are *not* included.

This is a feature request to include these accesses, since some hardware might act on them (issue prefetches, etc.) before the mask/predicate is resolved.

These should not be regular read/write records: they would have to be a new marker or a new top-level record type. Most likely they should not return true for things like type_is_data() or type_is_read().

This requires changing instrumentation for:

+ Scatter/gather x86 expansion
+ Scatter/gather aarch64 expansion
+ Rep string 0-iteration loops
+ aarch32 predication
+ Other conditional operations like x86 cmov

This will add overhead in the instrumentation and in i/o for extra records.

It may be worth optimizing for some common cases: e.g., for contiguous scatter/gather, do not expand the unrolled loop instrumentation but instead store just the base address in one extra record and let raw2trace fill in the missing accesses as the full set of possible accesses is known statically.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.