MacOS managed debugging perf fix#39804
Merged
mikem8361 merged 5 commits intodotnet:masterfrom Jul 25, 2020
Merged
Conversation
This PR adds PAL_OpenProcessMemory, PAL_ReadProcessMemory and PAL_CloseProcessMemory that encapsulate the remote read memory functions for both MacOS and Linux. The DBI code that reads memory using the runtime IPC messages to use these new functions and fallback to the IPC message if the open fails. On MacOS, this won't have any affect on VSCode performance until vsdbg/vsdbgui are signed with the "com.apple.security.cs.debugger" entitlement. Sample entitlements.plist file: ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.cs.debugger</key> <true/> </dict> </plist> ``` Example of locally signing with entitlement command: codesign -s <local-cert> --entitlements entitlements.plist
|
Tagging subscribers to this area: @tommcdon |
…bugging uses faster OOP unwind for HelpMethodFrames
Contributor
Author
|
@hoyosjs Jan is on vacation. Could you review? |
Member
yup, will need to test so I'll check later today. |
Contributor
Author
|
I have tested under VSCode for Linux and no regressions. On MacOS VSCode I get 3x perf improvement on my simple perf test project. |
Contributor
Author
|
@hoyosjs are you going to get to reviewing this today? |
hoyosjs
reviewed
Jul 24, 2020
added 2 commits
July 24, 2020 16:01
hoyosjs
approved these changes
Jul 25, 2020
|
|
||
| exit: | ||
| free(data); | ||
| if (data != nullptr) |
Member
There was a problem hiding this comment.
You don't need this check, but doesn't harm either.
|
Hello @mikem8361! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Jacksondr5
pushed a commit
to Jacksondr5/runtime
that referenced
this pull request
Aug 10, 2020
* MacOS managed debugging perf fix This PR adds PAL_OpenProcessMemory, PAL_ReadProcessMemory and PAL_CloseProcessMemory that encapsulate the remote read memory functions for both MacOS and Linux. The DBI code that reads memory using the runtime IPC messages to use these new functions and fallback to the IPC message if the open fails. On MacOS, this won't have any affect on VSCode performance until vsdbg/vsdbgui are signed with the "com.apple.security.cs.debugger" entitlement. Sample entitlements.plist file: ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.cs.debugger</key> <true/> </dict> </plist> ``` Example of locally signing with entitlement command: codesign -s <local-cert> --entitlements entitlements.plist Fix FreeBSD build. Remove FEATURE_DATATARGET4 for macOS so managed debugging uses faster OOP unwind for HelpMethodFrames
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Issue: #12706
This PR adds PAL_OpenProcessMemory, PAL_ReadProcessMemory and PAL_CloseProcessMemory that
encapsulate the remote read memory functions for both MacOS and Linux.
The DBI code that reads memory using the runtime IPC messages to use these new functions
and fallback to the IPC message if the open fails.
On MacOS, this won't have any affect on VSCode performance until vsdbg/vsdbgui are signed
with the "com.apple.security.cs.debugger" entitlement.
Sample entitlements.plist file:
Example of locally signing with entitlement command:
codesign -s <local-cert> --entitlements entitlements.plist