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

i#5843 scheduler: Use input instead of tid in launcher #6255

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

derekbruening
Copy link
Contributor

@derekbruening derekbruening commented Aug 8, 2023

Switches from using the tid in scheduler_launcher to distinguish inputs to the input ordinal. Tid values can be duplicated so they should not be used as unique identifiers across workloads.

Tested: No automated test currently relies on the launcher; it is there for experimentation and as an example for how to use the scheduler, so we want it to use the recommended techniques. I ran it on the threadsig app and confirmed record and replay are using ordinals:

$ rm -rf drmemtrace.*.dir; bin64/drrun -stderr_mask 12 -t drcachesim -offline -- ~/dr/test/threadsig 16 2000 && bin64/drrun -t drcachesim -simulator_type basic_counts -indir drmemtrace.*.dir > COUNTS 2>&1 && clients/bin64/scheduler_launcher -trace_dir drmemtrace.*.dir/trace -num_cores 4 -sched_quantum 2000 -record_file record.zip > RECORD 2>&1 && clients/bin64/scheduler_launcher -trace_dir drmemtrace.*.dir/trace -num_cores 4 -replay_file record.zip > REPLAY 2>&1 && tail -n 4 RECORD REPLAY
Estimation of pi is 3.141592674423126
Received 89 alarms
==> RECORD <==
Core #0: 16 15 16 15 16 0 15 16 15 8 16 6 5 7
Core #1: 9 3 12 16 11 16 8 0 16 0 16 1 16
Core #2: 3 14 16 14 16 0 15 16 8 16 2 6 8 1 10
Core #3: 13 3 13 9 11 12 16 6 16 6 16 2 4

==> REPLAY <==
Core #0: 16 15 16 15 16 0 15 16 15 8 16 6 5 7
Core #1: 9 3 12 16 11 16 8 0 16 0 16 1 16
Core #2: 3 14 16 14 16 0 15 16 8 16 2 6 8 1 10
Core #3: 13 3 13 9 11 12 16 6 16 6 16 2 4

Issue: #5843

Switches from using the tid in scheduler_launcher to distinguish
inputs to the input ordinal.  Tid values can be duplicated so they
should not be used as unique identifiers across workloads.

Tested: No automated test currently relies on the launcher; it is
there for experimentation and as an example for how to use the
scheduler, so we want it to use the recommended techniques.  I ran it
on the threadsig app and confirmed record and replay are using
ordinals:
  ===========================================================================
  $ rm -rf drmemtrace.*.dir; bin64/drrun -stderr_mask 12 -t drcachesim -offline -- ~/dr/test/threadsig 16 2000 && bin64/drrun -t drcachesim -simulator_type basic_counts -indir drmemtrace.*.dir > COUNTS 2>&1 && clients/bin64/scheduler_launcher -trace_dir drmemtrace.*.dir/trace -num_cores 4 -sched_quantum 2000 -record_file record.zip > RECORD 2>&1 && clients/bin64/scheduler_launcher -trace_dir drmemtrace.*.dir/trace -num_cores 4 -replay_file record.zip > REPLAY 2>&1 && tail -n 4 RECORD REPLAY
  Estimation of pi is 3.141592674423126
  Received 89 alarms
  ==> RECORD <==
  Core #0: 16 15 16 15 16 0 15 16 15 8 16 6 5 7
  Core #1: 9 3 12 16 11 16 8 0 16 0 16 1 16
  Core #2: 3 14 16 14 16 0 15 16 8 16 2 6 8 1 10
  Core #3: 13 3 13 9 11 12 16 6 16 6 16 2 4

  ==> REPLAY <==
  Core #0: 16 15 16 15 16 0 15 16 15 8 16 6 5 7
  Core #1: 9 3 12 16 11 16 8 0 16 0 16 1 16
  Core #2: 3 14 16 14 16 0 15 16 8 16 2 6 8 1 10
  Core #3: 13 3 13 9 11 12 16 6 16 6 16 2 4
  ===========================================================================

Issue: #5843
@derekbruening derekbruening merged commit d0f6386 into master Aug 9, 2023
15 checks passed
@derekbruening derekbruening deleted the i5843-unique-tid branch August 9, 2023 21:04
kuhanov added a commit that referenced this pull request Aug 10, 2023
…om/DynamoRIO/dynamorio into aarch64_instruction_categorization

* 'aarch64_instruction_categorization' of https://github.com/DynamoRIO/dynamorio:
  i#5843 scheduler: Use input instead of tid in launcher (#6255)
  i#5490 ib targets: Add memref ind branch target field (#6250)
  i#5843 scheduler: Add API to disable an output stream (#6243)
  Revert "i#5490 ind br tgt: Stop skip and switch at target marker (#6241)" (#6248)
  i#725 attach: Remove flakiness from attach test (#6244)
  i#5843 scheduler: Add query of input workload (#6246)
  i#5490 ind br tgt: Stop skip and switch at target marker (#6241)
  Replace {u,}int_least64_t with {u,}int64_t (#6239)
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

Successfully merging this pull request may close these issues.

None yet

2 participants