DynamoRIO / DynamoRIO/dynamorio

Add set_input_active API, akin to set_output_active

Open
#6,911 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

**Is your feature request related to a problem? Please describe.**

More complex clients have a need to control which threads are active and which are not for longer simulations.
The proposal is to add `set_input_active` akin to the existing `set_output_active` API routine.

Eg,
```
diff --git a/dynamorio/trunk/clients/drcachesim/scheduler/scheduler.h b/dynamorio/trunk/clients/drcachesim/scheduler/sch\
eduler.h
--- a/dynamorio/trunk/clients/drcachesim/scheduler/scheduler.h
+++ b/dynamorio/trunk/clients/drcachesim/scheduler/scheduler.h
@@ -1269,6 +1269,7 @@ protected:
bool needs_init = false;
bool needs_advance = false;
bool needs_roi = true;
+ bool active = true;
bool at_eof = false;
uintptr_t next_timestamp = 0;
uint64_t instrs_in_quantum = 0;
@@ -1748,6 +1749,9 @@ protected:
stream_status_t
set_output_active(output_ordinal_t output, bool active);

+ scheduler_status_t
+ set_input_active(int workload_ordinal, memref_tid_t, bool active);
+
// Caller must hold the input's lock.
void
mark_input_eof(input_info_t &input);
```

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.