easy_profiler on iOS/Android
Hi!
I would like to integrate easy_profiler on my current project, a game made with Cocos2d-x. There are records that if is possible to integrate easy_profiler on these platforms (iOS/Android)? Can I generate the dump file and store it in the device? There are some advices/recommendations that I should know before jumping into this?
The idea is to integrate easy_profile in the project, run the game on a device, generate the dump file, send the dump file to a remote server (our backend will handle the file), then using the GUI provided by easy_profiler, see the files stored in our servers.
Kind regards!
Hi @arcticmicho
You can connect easy_profiler UI directly to your device via network instead of dumping to file and then sending it to remote server.
As for advices: not me nor @yse haven't used easy_profiler on mobile devices, but people already made some fixes for Android and iOS so it should work out of the box (I hope). As I know @rokups was using easy_profiler on Android and iOS (but within the confines of @AtomicGameEngine).
Also I recommend to see #115 : currently, top-level profiled block should be finished to make it possible to dump/send via network it's data and it's children - this is done for sending/dumping only fully finished frames. Each top-level block (without currently opened parent block) is treated as a "frame".
Hi @cas4ey !
Thanks for your answer!
I was able to make it works on iOS (now I'm testing on Android). These are the issue that I found when implementing the library on my project:
- To change all what I need, at the end I have added the easy_profiler_core to my project so I'm not using the dynamic library generated.
- On iOS, your Xcode project require a minimal deployment target of 9 since just from that version the compiler support thread local storage.
- I had issues with the current_time header since, on iOS and Android (with architecture aarch64 to be more specific) the app was throwing exceptions when trying to get the virtual timer:
asm volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));So I have had to use EASY_CHRONO_HIGHRES_CLOCK. - As said on #96 I was unable to connect via network to the app with the simulator.
Now, there is an alternative for the thread local storage logic used in the library? Changing the deployment version target of my project could be complicated since the app is already published... I have read another options, like using the alternative that boost offers? ( Do you know if someone have already done something like this? Here is an example of how the change would looks like.
kinds regards!
Hi @cas4ey !
Thanks for your answer!
I was able to make it works on iOS (now I'm testing on Android). These are the issue that I found when implementing the library on my project:
- To change all what I need, at the end I have added the easy_profiler_core to my project so I'm not using the dynamic library generated.
- On iOS, your Xcode project require a minimal deployment target of 9 since just from that version the compiler support thread local storage.
- I had issues with the current_time header since, on iOS and Android (with architecture aarch64 to be more specific) the app was throwing exceptions when trying to get the virtual timer:
asm volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));So I have had to use EASY_CHRONO_HIGHRES_CLOCK.- As said on #96 I was unable to connect via network to the app with the simulator.
Now, there is an alternative for the thread local storage logic used in the library? Changing the deployment version target of my project could be complicated since the app is already published... I have read another options, like using the alternative that boost offers? ( Do you know if someone have already done something like this? Here is an example of how the change would looks like.
kinds regards!
hi! I got the same issue on ios
asm volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));it will throw EXC_BAD_INSTRUCTION
how to fix it?
Could it be related to https://github.com/google/benchmark/issues/415 ?