RFR: Excluding a few default packages with StackProfiler

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Jan 23 09:50:23 UTC 2015


Hi Behrooz,

On 01/23/2015 12:37 PM, Behrooz Nobakht wrote:
> During benchmarking and playing with StackProfile,
> I really needed to be able to exclude certain default
> JVM packages from the stacks.

I understand the use case. However, quite some people use JMH to
identify problems with the JDK itself. So, this new behavior should be
turned off by default.

I also think the filtering by stack head biases the profile a lot. Think
about e.g. the user method that calls into HashMap. It seems odd to
filter out that stack ending in HashMap.get() -- it would miss the
"legitimate" part of a stack. If anything, it should probably filter the
excluded classes from the stack top, but still record it the rest of the
stack as legitimate.

> The result is attached as a patch. I hope that it can be
> reviewed and applied as it may be useful for others, too.

In order for us to accept your contribution, you need to sign the OCA,
as required by OpenJDK contribution policy:
 http://openjdk.java.net/contribute/

Thanks,
-Aleksey.



More information about the jmh-dev mailing list