-
Notifications
You must be signed in to change notification settings - Fork 566
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#6495 syscall templates: Inject kernel traces in raw2trace #6496
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds support to raw2trace to read system call trace templates from the given file and inject the system call trace templates at the corresponding system call number marker during raw2trace conversion of user-space traces. Adds a new offline file type OFFLINE_FILE_TYPE_KERNEL_SYSCALL_TRACE_TEMPLATES used by such system call trace template files. Adds the burst_syscall_inject.cpp test that writes a sample system call template file and verifies that it can be processed by the analyzer framework; further, it collects a user-space trace for an app function that makes some system calls, then performs raw2trace conversion with system call template injection using the above-mentioned file. It then verifies that the trace templates are injected properly. The sample system call template file written by burst_syscall_inject.cpp also serves as documentation for the expected format of OFFLINE_FILE_TYPE_KERNEL_SYSCALL_TRACE_TEMPLATES files. More aspects of system call trace injection is left to future work: supporting multiple trace templates per system call (e.g. differentiated by system call arguments or return value), or other adjustment to the template at injection time. Issue: #6495
abhinav92003
changed the title
i#6495 syscall templates: Inject syscall trace templates in raw2trace
i#6495 syscall templates: Inject kernel traces in raw2trace
Dec 6, 2023
abhinav92003
commented
Dec 7, 2023
derekbruening
approved these changes
Dec 7, 2023
I'm seeing two test timeouts in vs2019-32 that aren't happening on other PRs: tool.drcacheoff.simple and tool.drcacheoff.windows-simple. |
derekbruening
approved these changes
Dec 8, 2023
x86-32 failures are #6417. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support to raw2trace to read system call kernel trace templates from the given file and inject them at the corresponding system call number marker during raw2trace conversion of user-space traces.
Adds a new offline file type OFFLINE_FILE_TYPE_KERNEL_SYSCALL_TRACE_TEMPLATES used by such system call trace template files.
Adds the burst_syscall_inject.cpp test that writes a sample system call template file and verifies that it can be processed by the analyzer framework; further, it collects a user-space trace for an app function that makes some system calls, then performs raw2trace conversion with system call template injection using the above-mentioned file. It then verifies that the trace templates are injected properly in the resulting trace. The test also runs basic_counts on the resulting trace to ensure it can be processed by the analyzer framework.
Extracts raw2trace logic to write the essential header entries (that is, the entries that are expected by the analyzer framework in the trace) into a separate public API that can be used by other libraries (such as the new burst_syscall_inject test or any other library writing the syscall trace template file) to write valid header entries.
The sample system call template file written by burst_syscall_inject.cpp also serves as documentation for the expected format of OFFLINE_FILE_TYPE_KERNEL_SYSCALL_TRACE_TEMPLATES files.
More aspects of system call kernel trace injection is left to future work: supporting multiple trace templates per system call (e.g. differentiated by system call arguments or return value), or other adjustment to the template at injection time.
Issue: #6495