Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not if you are on macOS, the number of available profilers drops after every release. Same with leak detectors, valgrind doesnt work, sanitizers don't work anymore (even if you compile your own clang).


It took Apple a long time to bring ASan and TSan to macOS, but they work now, for me at least. (MSan still unavailable though).


At least in the specific case of Tracy, you can profile over the network. So, you instrument your OSX application, and it streams its data in realtime to your profiler viewer.

Though it's true that more advanced features require OS support (eg: showing how threads get moved amongst CPU cores, and so on).


Is there _any_ usable profiler on macOS? I've found Instruments to be straight-up useless (very slow, frequently gives just plain wrong results on larger projects) and pretty much every search I've tried just gives “use Instruments”.


Can't go wrong with spindump and sample.


Both address sanitizer and UB sanitizer work for me (macOS-13.6, Intel). You have to add a library search path and the appropriate `libclang_rt.*` library to your build.

Library search path is `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/1[4-9].[0-9].[0-9]/lib/darwin`.


Apple mostly keeps their sanitizers up-to-date? Not that it’s really a profiler, to be honest.


Sanitizers only sometimes work on Windows too :)


I found that you can use the 'leaks' command to replace vlgrind memcheck


samply is pretty sweet. It's been my go-to for Deno work for the last year or so.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: