I just started testing ARM mobile studio and I can't quite figure out how to use it correctly with Unity. I managed to capture app data through a development build and streamline. However, if I want to take a look at the CPU call paths, I just see this:
I did generate symbole files with Unity, but how do I import them? It tells me to use the -g compiler option, but I'm not sure how I would use that in Unity?!
And is it possible to caputre GPU data for non-Mali GPUs?
Thanks for any help!
For Unity software profiling:
Unity doesn't build with stack frames, so you'll get a flat function list which isn't always the easiest view to use.
Johannski said:And is it possible to caputre GPU data for non-Mali GPUs?
No, GPU support is for Mali only.
Kind regards, Pete
thanks a lot for the response. Your suggested way is actucally what I did when posting before I created the thread.
Maybe there is some other limitation to this? I created a small repro showing the problem. You can either download the streamline recording and build or build it yourself over here: https://github.com/JohannesDeml/arm-mobile-unity-test/releases/tag/symbols-problem
I used Debugging symbols, since those should include the most information. What am I missing? Is there maybe a problem with Mono builds? The settings used in this repro are all default, except of including your package mobile-studio-integration (github.com/.../mobile-studio-integration-for-unity)
Thanks for the repro - we'll take a look. What Unity version is this using?
Mono builds should work. The info is less useful than IL2CPP builds, as a lot more just shows as interpreter time, but you should still get symbol mapping.
*EDIT* Hmm, I could have sworn that mono builds worked when I looked yesterday, but with Unity 2021.1 IL2CPP builds are tracing OK, but mono builds are not. I'll rebuild clean and see if I can get something useful out of it.
Yep, it's Unity 2021.1.10f1 :)
Awesome, thanks for the quick response. I'm not in a hurry, was just curious to see what I can get out of ARM's tools. Anyway, if you need me for any repro/teesting let me know!
Current status:* For 2021.1 IL2CPP builds definitely work, and if you enable call stack unwinding in Streamline you do actually get the call path hierarchy, not a flat view.
* For 2021.1 Mono builds can work, but you need to grab the right debug libunity.so from inside the Unity directory. The one in the generated symbols.zip isn't the right one. Given Mono is mostly interpreted runtime, I'm not expecting that you get a particularly useful profile here though.
For older Unity releases make sure you leave "Strip Engine Code" enabled in the Player settings. If you disable that you lose libunity.so from symbols.zip, even for IL2CPP builds, and have to rummage to find it.
Thanks a lot for the update!I tried running a debug configuration IL2CPP build and got most symbols imported:
As for mono: Which exact libunity.so file do I need to import? There are multiple files inside the unity editor folder, but none of the ones I tried actually resolved any symbols.
I've used the .\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\Development\Symbols\armeabi-v7a ones in the past, although in 2021.1 it doesn't seem to resolve any symbols in the URP sample project I'm testing on.
Let me follow up with the engineering team and see if we can work out what's missing.
We've so far failed to get anything sensible out of the symbolized mono libraries from Unity, so for now I think we'd suggest using IL2CPP. This is good for other reasons anyway, as it the only backend with arm64 support, which will soon be mandatory on the Google Play store.
Kind regards Pete