You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get context switches information in Tracy (ver 0.9.1) from Android device (Magisk rooted Samsung J6 with armv7a processor, running on Android 10). Unfortunately I can't make it work. I don't see any information from CPU data section as I can see on Win machines for example
I have executed this commands in su mode from shell on the device (from documentation):
but it changed nothing, I still don't have context switches information in Tracy. I've found pretty close issue: #268 but there were no updates and no information, also approach of profiling has changed since that moment and that closed issue may be not relevant anymore.
Also I've debugged launch and found that perf_event_open always returns -1 and SysTraceStart doesn't create any listeners in fact. I am ran out of ideas how to fix it or what's exactly is going wrong with this system calls. Any ideas how to make this advanced profiling work on Android devices? I would appreciate any information\help.
The text was updated successfully, but these errors were encountered:
Seems I have found some solution.
There was a problem in SELinux rules, they were blocking access for some files in system call even with root privileges (I tried to start process under root user with am start -S ... --user current option under su and got permission errors). So, I added some debugfs_tracing access in sepolicy:
allow untrusted_app debugfs_tracing:dir { ioctl read lock open };
allow untrusted_app debugfs_tracing:file { ioctl read getattr lock map open };
trough magiskpolicy tool: (https://topjohnwu.github.io/Magisk/tools.html). Warning: it violated security policies as with this changes every app can get access to tracing calls that can cause some data leakage.
But after that I still received -1 results and got errors with invalid parameter (got in from errno). I found out that this errors were caused by use_clockid and clockid setting, seems that my version of kernel\android has no support CLOCK_MONOTONIC_RAW neither CLOCK_MONOTONIC (or maybe all modern Android devices have no access to use them?). After removing usage of this parameters I finally got system tracing\context switches information in tracy (but without call stacks, all zones were marked ???).
Hope this information will be useful for someone and there will be some general solution for use_clockid and type of clockid bu default
Hi,
I am trying to get context switches information in Tracy (ver 0.9.1) from Android device (Magisk rooted Samsung J6 with armv7a processor, running on Android 10). Unfortunately I can't make it work. I don't see any information from CPU data section as I can see on Win machines for example
I have executed this commands in su mode from shell on the device (from documentation):
but it changed nothing, I still don't have context switches information in Tracy. I've found pretty close issue: #268 but there were no updates and no information, also approach of profiling has changed since that moment and that closed issue may be not relevant anymore.
Also I've debugged launch and found that perf_event_open always returns -1 and SysTraceStart doesn't create any listeners in fact. I am ran out of ideas how to fix it or what's exactly is going wrong with this system calls. Any ideas how to make this advanced profiling work on Android devices? I would appreciate any information\help.
The text was updated successfully, but these errors were encountered: