RFR: Excluding a few default packages with StackProfiler
Behrooz Nobakht
nobeh5 at gmail.com
Sun Feb 1 20:47:22 UTC 2015
Hi Aleksey,
Thanks for the review. Your comments actually got me thinking what I do
really want
from this feature. This led me to somehow conclude the explanation of the
"exclusion".
Interesting that you mentioned the CSV package prefixes. I added and
applied the comments.
The patch is attached. Please read the commit message.
Cheers,
Behrooz
On Wed, Jan 28, 2015 at 8:02 PM, Aleksey Shipilev <
aleksey.shipilev at oracle.com> wrote:
> 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.
>
>
--
-- Behrooz Nobakht
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StackProfiler.patch
Type: text/x-patch
Size: 16534 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/jmh-dev/attachments/20150201/cd18b4df/StackProfiler-0001.patch>
More information about the jmh-dev
mailing list