RFR: Excluding a few default packages with StackProfiler
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Jan 28 19:02:21 UTC 2015
Hi Behrooz,
On 27.01.2015 15:55, Behrooz Nobakht wrote:
> Thanks for your review and comments.
> Indeed, I've missed a few important things
> to make a decision to include a stack line or not.
> I've updated the patch and attached.
Much better now, thanks! There are still a few problems though:
* Current code always records at most SAMPLE_STACK_LINES. Your code can
truncate the stack, and the resulting StackRecord can contain less than
SAMPLE_STACK_LINES, even when the original stack trace contained more lines.
It might sound as the UX problem, but it actually deforms the profiles.
The equality of StackRecords is established via Arrays.equals of the
stacks, which means your code treats the stack record with the filtered
lines as distinct from vanilla stack record. Suppose for example two
stack traces that should be equal if HashMap.get is filtered:
java.util.HashMap.get() MyClass1.call()
MyClass1.call() ...
... MyClass29.call()
MyClass29.call() MyClass30.call()
MyClass30.call()
* I think StackRecord.lines should be List<String> to avoid needless
conversions from String[] and back.
* Maybe we should provide another option with comma-separated package
prefixes to filter?
Thanks,
-Aleksey.
More information about the jmh-dev
mailing list