I'm working on a fairly low-level Kotlin JVM library that deals a lot with Bytes and ByteArrays. As I'm dealing with large volumes of data, keeping performance of individual operations high is important. I would like to find out if (and where) the JVM is busy with Auto-Boxing and Auto-Unboxing of primitive byte into wrapper Byte and back. With Kotlin, the compiler hides the syntactic difference between byte and Byte, which makes this job even harder.
Profilers like JVisualVM do not show auto-boxing and auto-unboxing as individual operations, they just attribute the time it takes to execute them to the parent method as "self time" which isn't helpful in this case.
What are my options to find out if/where auto-boxing and auto-unboxing occur?