My Android app is currently in open beta and I am receiving crash reports from my beloved testers. Audio processing is the app's primary focus therefore the render thread is cpu intensive and time sensitive. In an attempt to achieve the best performance possible, I am reserving exclusive cores for the process by calling:
int exclusiveCores[] = {};
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
exclusiveCores = android.os.Process.getExclusiveCores();
}
then sending the int array on through the JNI to be handled by the engine.
This has worked fine until recently when I received a crash report stating a RuntimeException was thrown on the getExclusiveCores() call. The device was a Samsung J7 (SM-J727T) running Android 7.0. This is the only device so far that has given me this report.
Has anyone else experienced this issue? Is this API not available for this specific device? Is there another limitation I should be checking for before calling getExclusiveCores?
The documentation states:
To support an exclusive core on a device:
Enable cpusets and configure a cpuset that contains only the top foreground application.
Ensure one core (this is the exclusive core) is reserved for threads from this cpuset.
but I am unable to find any other documentation on how to enable cpusets and configure a cpuset.
Can anyone provide an example of this implementation or point me in the right direction?
Also, I personally do not have this device and Firebase Testlab does not have this device running android 7.0 so testing any solution will have its own complications.
Thanks