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

Syscall after flush is missing syscall marker #6291

Closed
derekbruening opened this issue Sep 1, 2023 · 0 comments · Fixed by #6290
Closed

Syscall after flush is missing syscall marker #6291

derekbruening opened this issue Sep 1, 2023 · 0 comments · Fixed by #6290
Assignees

Comments

@derekbruening
Copy link
Contributor

While testing PR #6290: the tool.drcacheoff.sysnums test fails to output a syscall marker when the block ending in the syscall filled the buffer and wrote it out. The is_new_window_buffer_empty() function returns true in this case. It seems it should only return true for has_tracing_windows() where cur_window_instr_count is tracked.

This results in raw2trace removing the syscall instr as a "false syscall", which then results in PC discontinuities.

@derekbruening derekbruening self-assigned this Sep 1, 2023
derekbruening added a commit that referenced this issue Sep 8, 2023
Adds a timestamp+cpuid pair at the end of normal buffers, to help
separate trace output i/o time.

Adds a timestamp+cpuid pair before and after each application syscall.
It appears around the syscall marker. The trace buffer is no longer
output pre-syscall (this addresses #3113) except for i-filtered traces
or small-window traces where we need a frequent trace size check.

Adds a timestamp+cpuid pair when a kernel transfer event occurs. The
trace buffer is no longer output here.

Fixes the existing behavior where the post-syscall-buffer's timestamp
contains the pre-syscall time.

Bumps the trace version for this change as the contents of post-syscall
timestamps are now different.

Augments the documentation around timestamps and adds a missing entry on
syscall markers.

Adds some invariant checks, and improve existing syscall marker checks.
Further checks are more difficult as the post-syscall time is not
present when there is no post-syscall event, such as with exit or
sigreturn. Did some manual testing with the view tool.

Applies several auxiliary changes required to get all modes to work with
these additional timestamps:
+ Removes the timestamp+cpuid from the split-pipe header, as that
timestamp is delayed by i/o and results in misleading out-of-order
timestamps.
+ Prevents pipe-splitting before a cpuid, to avoid a confusing sequence.
+ Fixes a bug where a syscall marker is missing when the prior block
wrote out its buffer (#6291).
+ Fixes #6245 by re-instating the footer for non-split window files and
removing the template `.*` from PR #6165 which was hiding the warning
(this one could possibly be split into its own PR).
+ Adjusts the PC discontinuity relaxation for online unfetched instrs
(#4915) to check the size now that there's no timestamp.

Issue: #4915
Fixes #6289
Fixes #3113
Fixes #6291 
Fixes #6245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant