Sampling C on the Playdate hardware

Hi, my first experiment with building and running an entirely C program on Playdate is running at about 1 fps. I'm not really surprised by this, as I wrote a raytracer and I don't expect that to be appropriate for the hardware. Still, I'd like to get some CPU traces to figure out what specifically is taking up all the cycles.

The Sampler isn't really giving me the information I'm looking for. It seems to only show me Panic system entry points and none of my own functions. Is this expected? Do I need to port my C++ profiler to C? I don't really feel like doing that but I guess I will if I have to.

Thanks in advance!


If you're on the Mac, you can control-click the "Sample" button and select your games .elf file to get game symbols in the Sampler. If you're on linux/win, you'll need to wait a bit longer until we get a release out that contains this feature (it's ready to go, just needs to get out the door).


That's exactly what I was looking for, thank you!

(Also, fwiw that feels pretty hidden to me. I never would have known to do that. A "load elf" button would help in general).

Anyway thanks again.


We agree, it will be exposed in the UI in an up-coming update. :slight_smile: Furthermore, it will be added to the Windows/Linux Simulator and the behavior will be improved as well.