Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add set_input_active API, akin to set_output_active #6911

Open
xdje42 opened this issue Aug 8, 2024 · 0 comments
Open

Add set_input_active API, akin to set_output_active #6911

xdje42 opened this issue Aug 8, 2024 · 0 comments

Comments

@xdje42
Copy link
Contributor

xdje42 commented Aug 8, 2024

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant