Skip to content
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

docs: README should mention MacOS support #31

Closed
nrc opened this issue Apr 21, 2019 · 12 comments
Closed

docs: README should mention MacOS support #31

nrc opened this issue Apr 21, 2019 · 12 comments

Comments

@nrc
Copy link

nrc commented Apr 21, 2019

Whether flamegraph supports MacOS or not, the README should say so.

@mimoo
Copy link

mimoo commented May 30, 2019

it doesn't : (

@jonhoo
Copy link

jonhoo commented May 30, 2019

It does support it using dtrace, though I don't know how standard that is on macOS?

@mimoo
Copy link

mimoo commented May 30, 2019

dtrace: system integrity protection is on, some features will not be available
dtrace: failed to initialize dtrace: DTrace requires additional privileges
failed to sample program

@davidrusu
Copy link

You'll need to disable SIP on your mac to have dtrace work.

Mentioning this in the readme would be nice, and maybe also with a link to how to disable it:

https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/ConfiguringSystemIntegrityProtection/ConfiguringSystemIntegrityProtection.html#//apple_ref/doc/uid/TP40016462-CH5-SW1

reboot into recovery mode and run csrutil disable

@benhannel
Copy link

I have system integrity protection off, and flamegraph still can't use dtrace:

bens-mbp-4:program bhannel$ csrutil status
System Integrity Protection status: disabled.
bens-mbp-4:program bhannel$ cargo flamegraph --bin=bench
warning: `panic` setting is ignored for `test` profile
    Finished release [optimized] target(s) in 0.02s

WARNING: building without debuginfo. Enable symbol information by adding the following lines to Cargo.toml:

[profile.release]
debug = true

dtrace: failed to initialize dtrace: DTrace requires additional privileges
failed to sample program

@bjorn3
Copy link

bjorn3 commented Dec 12, 2019

You need to use sudo.

@benhannel
Copy link

Thanks! I was trying sudo su and had issues but just sudo cargo flamegraph --bin=bench works.

@bjorn3
Copy link

bjorn3 commented Dec 13, 2019

You can also use cargo flamegraph --sudo --bin=bench to prevent any rustc invocations being performed as root.

@capnfabs
Copy link

As at 20 Feb, the above invocation should be cargo flamegraph --root --bin=bench, but I can confirm that it works ✨

@rsqv
Copy link

rsqv commented Oct 6, 2021

As at 20 Feb, the above invocation should be cargo flamegraph --root --bin=bench, but I can confirm that it works ✨

This should definitely be added to the README!

@djc
Copy link
Contributor

djc commented Oct 7, 2021

@rsqv would you like to submit a PR? I'd be happy to review it!

@mimoo
Copy link

mimoo commented Feb 4, 2023

the --sudo flag doesn't work anymore.

EDIT: sorry for bumping, the --root command threw me off as it's usually used to change the root of the workspace or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants