I am profiling my build with JProfiler. Specifically, I am profiling the configuration phase, which sometimes takes a long time.
After recording sampled CPU in JProfiler, the results indicate that about 1/3rd of the time a thread is sampled in a Runnable state, it is when executing the method
net.rubygrapefruit.platform.internal.jni.AbstractNativeFileEventFunctions.executeRunLoop0. This is a native JNI call defined here.
My understanding is that when JProfiler is configured to only show samples in which threads were in the Runnable state, we are essentially trying to filter to only show threads that are consuming CPU (as opposed to threads that are just waiting and not consuming CPU). My concern is that since
executeRunLoop0 is a native call, JProfiler can not detect whether or not the thread is actually consuming CPU.
So my question is, should I be concerned about
executeRunLoop0 and should I pursue investigating why it is running so much, or should I ignore it? If the thread is sitting in an event-driven loop on the native side, am I correct that it isn’t really consuming significant CPU and that JProfiler is just showing this method because it is not aware the thread is just efficiently waiting?