Skip to main content

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

Hi
I tried a different approach with a single analysis module, since the intervals I want to display in one view are a subset of all the intervals in the original view.

I set a flag in my analysis module to indicate whether all events are to be processed or only those that generate the subset of intervals. I can toggle this flag by menu selections from a menu I added to my class extending CallStackView.

I added a method to my class extending TmfTrace that I could call in order to run TmfTrace.executeAnalysis(), which is otherwise inaccessible with the intent that I wanted to rerun the analysis without reloading the trace. I also marked my analysis module class as 'automatic' when registering it with the org.eclipse.linuxtools.tmf.core.analysis extension.

When I initially load the trace, the analysis runs and updates my view as expected. If I try to rerun the analysis, it appears to run, but the methods in my class extending CallStackStateProvider don't seem to run, implying that even though the analysis module runs, it's not re-scanning the trace events. AbstractCallStackAnalysis.executeAnalysis(IProgressMonitor) does return true, so I think analysis was successful.

Is what I'm tying to do possible?

Alternatively, is there any filtering capability in CallStackView such that I can filter individual intervals in or out of the view?

Thanks

Dave
----- Forwarded by David Wootton/Poughkeepsie/Contr/IBM on 07/12/2016 12:42 PM -----

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





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

_______________________________________________
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