-
Notifications
You must be signed in to change notification settings - Fork 590
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
Another batch of seek-ticks fixes #3644
Conversation
6a108c0
to
44e5338
Compare
fails tests; will look at tomorrow. (no clue how to write tests for the bugs here) |
It should be possible to construct a program that does some context switching and use the bash .run script to run |
Pushed some testing. For whatever reason, in a sequence of
a The failed test is from the comparison change, previously changed the other direction here. I don't see any real reason for a seek-ticks to prefer a specific event number though, when all match the ticks, and currently I don't see a nice way to make it go the previous way while fixing the bug here. |
1c91697
to
135a049
Compare
Actually, even before these changes, // initial status of a bin/tick0 recording:
(rr) when
Current event: 15
(rr) when-ticks
Current tick: 0
// thing currently tested by tick0:
(rr) c
Continuing.
EXIT-SUCCESS
(rr) seek-ticks 0
(rr) when
Current event: 15
// broken thing:
(rr) run 15
(rr) when
Current event: 16 // run 15 goes to when==16, whatever, regular rr weirdness
(rr) seek-ticks 0
(rr) when
Current event: 17 // seek-ticks 0 didn't go to 15! whereas with my changes here it at least consistently always goes to 17: (rr) when
Current event: 15
(rr) when-ticks
Current tick: 0
(rr) seek-ticks 0
(rr) when
Current event: 17
(rr) c
Continuing.
EXIT-SUCCESS
(rr) seek-ticks 0
(rr) when
Current event: 17
(rr) run 15
(rr) when
Current event: 16
(rr) seek-ticks 0
(rr) when
Current event: 17 |
I'm happy for you to change the existing test behaviour here. |
135a049
to
46de444
Compare
Yes, we should probably clean up the way event numbers work so that |
46de444
to
c496bfa
Compare
Is that what's happening though? Perhaps my understanding of events/ticks is even worse than I imagined (which is extremely possible), but I think a Also, didn't notice the [FATAL src/PerfCounters.cc:970:read_ticks()]
(task 320807 (rec:307717) at time 198)
-> Assertion `!counting_period || interrupt_val <= adjusted_counting_period' failed to hold. Detected 695896 ticks, expected no more than 689668 which is similar to #3614 (just a bit above the value; 32-bit). Other than this, I did adapt the tick0 test to the new behavior, so this PR should be done |
See #3674 3674 |
This fixes two bugs:
seek-ticks
to a tick exactly on aSCHED
event goes to the other thread, not the current one (the>=
→<
change);seek-ticks
to within the current event skips too far if the next event is for a differenttid
.Additionally, this extracts the logic for tick→time conversion to a function (first commit doing nothing but that).