forked from google/orbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tid translation for target processes running in a separate namespace. (…
…google#4195) If the target process is running in a separate namespace, thread ids (tids) observed from within the target process are different from the tids observed in the root namespace. This is a problem for events we obtain from the target process. These are userspace instrumentation (usi), manual instrumentation and the Vulkan layer. This PR is only about usi. Usi events are obtained for the game, received in ProducerEventProcessorHijackingFunctionEntryExitForLinuxTracing and piped back into the LinuxTracing code. Finally they are processed by UprobesUnwindingVisitor where they are used to emit FunctionCall's and to help with the call stack handling. The UprobesUnwindingVisitor needs to translate the tids from inside the UserSpaceFunction{Entry,Exit}PerfEventData events into root namespace tids before handling them. For that purpose we have the UprobesUnwindingVisitor observe the clone{3} exit tracepoints, the task_newtask tracepoint. By that we are able to keep track of new threads and their tids. Additionally, at the beginning of the capture, we also send the initial state of the tid mapping. We obtain this information from the /proc filesystem.
- Loading branch information
1 parent
10593d0
commit 0cff3f5
Showing
13 changed files
with
396 additions
and
17 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
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.