Instrumenting a method called often leads to very high memory consumption. In my mind, memory usage should be or nearly be independant from the frequency at which methods are called (see implementation of "InstrumentationSample" but probably more importantly (more surprising) the cardinality of StackTraceElement :

In my case, I was sampling at the default 1sec interval and just instrumented a java method which was called 3 million times. It pretty much killed the JVM (-> filled up approximately 2 GB Memory). Is there a way to optimize this?
