Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Fw: Implementing multiple analysis modules for same trace type

Looking at this more today, I found that it is not consistent how many times I need to reload the trace before the output of the analysis I requested (by a menu choice I added to my UI) is displayed. Sometimes I only need to reload once and sometimes select the analysis again and reload the trace again for it to take effect.

Investigating further, I found that the CallStackView class has a method getCallStackModule() that is invoked after the trace is reloaded if a CallStackView view is open, and it is running the wrong analysis module sometimes. Looking at CallStackView source I see that method gets a list of analysis modules derived from AbstractCallStackAnalysis and selects the first module in the list, where the list order seems unpredictable.

There are TODO comments in this method stating work is needed for traces which have multiple analysis modules, which is my case.

Does this mean I need to implement a single analysis module that has multiple state systems?

Also, I'm still not sure why I need to reload the trace to get my view to refresh.

Dave
----- Forwarded by David Wootton/Poughkeepsie/Contr/IBM on 07/07/2016 05:37 PM -----

From: David Wootton/Poughkeepsie/Contr/IBM@IBMUS
To: "tracecompass developer discussions" <tracecompass-dev@xxxxxxxxxxx>
Date: 07/07/2016 09:49 AM
Subject: [tracecompass-dev] Implementing multiple analysis modules for same trace type
Sent by: tracecompass-dev-bounces@xxxxxxxxxxx





I'm trying to implement analysis modules for my trace, where the analysis modules both extend AbstractCallStackAnalysis. My intent is to view the results in my view which extends CallStackView (only to add a couple menu entries to the toolbar menu in CallStackView for now)

Both of these analysis modules are registered to the org.eclipse.linuxtools.tmf.core.analysis extension with 'automatic' set to false.

If I use either of these analysis modules separately they seem to generate correct data for the view.

One of these analysis modules is intended to generate intervals for all events in my trace. The second analysis module is intended to generate intervals for only a subset of the events in the trace, providing an alternate view of the trace.

My intent is that once a trace is opened, the user can select a menu entry to select which type of analysis to display in the view, and that the user can switch back and forth without having to reload the trace.

When I click the menu entry for an analysis, the Action handler invokes IAnalysisModule.schedule() for the required analysis module.

In order for the view to update at all, I have to reload the trace, but even then, it seems like I have to do it twice. I've tried this with the in-memory state model to see what happened, thinking there might be problems with lingering analysis files but that did not matter.

Looking at the documentation, I also read about an analysis module that could implement ITmfAnalysisModuleWithStateSystems in order to deal with multiple state systems in one analysis module, but I'm not sure if that helps here or how it helps.

I'm apparently missing something in the code I'm writing, but I'm not sure what.

Anyone have suggestions?

Thanks

Dave
_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tracecompass-dev



Back to the top