Performance characteristics / compilation affected by profiling
I'm trying to do some performance critical computation in java. So I profile.
However many profilers agree on giving me a wrong profile.
The profiles are obviously wrong as a method that is estimated to take ca. 12% of runtime really takes about 50% of the runtime (as tested by commenting the method out).
The yourkit profiler gives an answer that seems reasonable if I chose the lightest profile mode, and at the same time it seems not to list all methods (some are inlined?)
I suspect that the method counting that both 1), 2) and 3) do screws up the profiling.
Can anyone give hints to how I would construct my own profiler that gives the same measurements as the yourkit profiler in "light mode"/no method counting? Does HPROF do method counting in its polling mode?