Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Reusing TmfStateValue objects

Hi Dave,

I think the problem you are seeing is a concurrency issue that has nothing to do with your changes, it was probably introduced in

I would guess that the state system is being built in another thread, and in between the full query (line 586) and getting the quark list (line 588), a new quark has been created in the other thread that wasn't part of the full query.

This would be intermittent when building the state system, but when reopening the same trace with state system already built, or opening the Call Stack view only after the state system has been built, you wouldn't see the problem.

We'll make sure to fix this soon.

Thanks for reporting the issue,

On Tue, Jan 3, 2017 at 11:34 AM, David Wootton <dwootton@xxxxxxxxxx> wrote:

I am trying to reduce storage consumption by my plugin. This plugin creates a large number of TmfStateValue objects, where multiple TmfStateValue objects may have the same value.

If I just create the TmfStateValue objects without regard to duplication, my plugin works without problems.

I tried to reuse TmfStateValue objects by maintaining a HashMap<TmfStateValue, TmfStateValue> hash map where the TmfStateValue object is both the key and the value, essentially a HashSet, but where I can get a value of an object in the set, which HashSet doesn't allow.

If I do this, I intermittently get an IndexOutOfBounds exception at line 601 of (Neon SR1 version). Sometimes, when I load a trace I get this exception. Other times the same trace loads with no problem.

Is there a reason why attempting to reuse TmfStateValue objects will not work or why I should not be doing this? I realize TmfStateValue maintains an internal cache of 128 elements, but this is too small, which is why I am trying this approach.

I'm doing something similar with TmfEventField objects and that seems to work fine.


tracecompass-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top