-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#6495 syscall templates: Inject kernel traces in raw2trace (#6496)
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
- Loading branch information
1 parent
8eba754
commit 43cbfc3
Showing
17 changed files
with
818 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.