DynamoRIO / DynamoRIO/dynamorio

Add annotation support to drcachesim to delimit trace boundaries and app phases

Open
#3,107 8 comments 0 reactions 0 assignees View on GitHub
Component-API Component-DrMemtrace
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

For some of our uses cases we found it useful to limit instrumentation (e.g. mem tracing) to a certain code region, e.g.

```
void foo(void){
uninteresting();
__START_TRACE();
for (....) {
interesting accesses
}
__STOP_TRACE();
uninteresting2();
}
```

We have been using invalid encodings on AArch64, which we replace with labels in app2app and then in later stages we keep track of of whether tracing is enabled or disabled.

```
#define __START_TRACE() { asm volatile (".inst 0x2520e020"); }
#define __STOP_TRACE() { asm volatile (".inst 0x2520e040"); }
```

Would something like this be useful as a generic API or does something similar already exist and I missed it?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing drcachesim's trace-processing path and the app2app stage that replaces the invalid AArch64 encodings with labels. Compare the existing handling of tracing-enabled state with the proposed generic API, then define the supported boundary and phase semantics before implementation. Done means the approach is agreed and trace boundaries can be delimited reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
devtools, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.