JVM_FindLoadedClass takes the given jstring class name and calls internalize_classname - which returns a new java String after converting '.' to '/' in the original one. We then turn that string into an UTF-8 string. This means we're allocating a String object on heap, which we then instantly throw away, and unless I'm missing something we could just get rid of this intermediary allocation. internalize_classname is only used in this one place, so it should be inlined and simplified to remove a String allocation by doing the conversion to utf-8 first, then update that in place.
|