Closed washanhanzi closed 2 years ago
This sounds like a problem related to instruments itself, and I don't have a lot of insight there. Can you launch the instruments GUI app (bundled with Xcode)?
Yes I can. I can launch the app and open the instruments file generated by cargo instruments
. But in GUI it showed the same error.
can you launch the app and record new traces from within it? This sounds like a problem with Xcode/Instruments that is unrelated to cargo-instruments
, and I haven't encountered it before. If you can't find anything, I would try uninstalling and reinstalling Xcode. :/
I looked around and find maybe it was because my program is too simple. The program finishes before Instruments can start profiling. Then I tested with a line of thread::sleep
, and it works fine.
Thanks for your time.
Closing.
thanks so much @washanhanzi (and @cmyr for this great package 🙏) I've just run into the same problem with latest xcode 14.
Solution was to add std::thread::sleep(std::time::Duration::from_millis(10))
just before exiting.
Was this working for either of you before Xcode 14? I'm curious if this is a change, or just a coincidence.
I tried cargo-instruments
for the first time yesterday, so I'm afraid I can't help on that.
Same for me. Never used it before.
The command report the following error:
The instruments file are generated, and I can open the file with
instruments
.instruments
showed the same error. I'm not familiar withinstruments
andxcode
, could you provide me with some information so I can debug the problem?