But it works fine with Instruments->Time Profiler
.
All the other documents are closed.
Am trying to find a tool to find how much memory is used by my c++ code.
But it works fine with Instruments->Time Profiler
.
All the other documents are closed.
Am trying to find a tool to find how much memory is used by my c++ code.
You can fix this without disabling SIP by running the following command in zsh
. It will sign your binary with the get-task-allow
entitlement, which allows debugging.
codesign -s - -v -f --entitlements =(echo -n '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"\>
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>') <your executable>
Source: https://cocoaphony.micro.blog/2022/10/29/solving-required-kernel.html
Thanks to Mārtiņš Možeiko for pointing me toward this solution.
codesign -s - -v -f --entitlements=entitle.xml /path/to/my/app
–
Uranous You need to disable SIP to be able to profile memory https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection?language=objc
© 2022 - 2025 — McMap. All rights reserved.