Unless they call native code, Java classes are reasonably exposed to a profiler.

Alas, I've run into C code that ran into the roadblock of vendor libraries. You can get some good information out of cc compiled for gprof, but many times it is only tantalizing as to where it leads you.