Bug 488422 - [TMF] Each XML analysis is executed for any custom trace type
Summary: [TMF] Each XML analysis is executed for any custom trace type
Status: NEW
Alias: None
Product: Tracecompass
Classification: Tools
Component: TMF (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-24 16:51 EST by Bernd Hufmann CLA
Modified: 2016-02-24 16:58 EST (History)
0 users

See Also:


Attachments
example files to reproduce problem (3.40 KB, application/zip)
2016-02-24 16:58 EST, Bernd Hufmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Hufmann CLA 2016-02-24 16:51:48 EST
When defining an XML analysis (e.g. RequestAnalysis) for a custom text type (e.g ID o.e.tc.tmf.core.parsers.custom.CustomTxtTrace:TMF:TmfRequest) is executed traces with any other custom text types defined in the workspace e.g. o.e.tc.tmf.core.parsers.custom.CustomTxtTrace:TMF:TmfGeneric).

The reason is that all custom text trace type share the same trace class (CustomTxtTrace) and the analysis modules for a given trace is retrieved using the class type.

The same thing is valid for Custom XML trace types and XML analysis for a Custom XML trace type.
Comment 1 Bernd Hufmann CLA 2016-02-24 16:58:24 EST
Created attachment 259912 [details]
example files to reproduce problem

Zip file contains the following files:
TmfTrace.log - a text trace to test
custom_txt_parser.xml - xml file with 2 custom parser definition 
state.xml - xml analysis

To reproduce:
- Import custom test trace types  with "Manage Custom Parsers". You should see the custom types TmfRequest and TmfGeneric
- Import the analysis xml file with "Manage XML Analysis"
- Import trace TmfTrace.log
- Select trace type TmfGeneric

In the project explorer you will see the Request Analysis under the TmfTrace.log trace. Also when opening the trace the request analysis is executed. Note the analysis should not be applied because the analysis is defined for trace types TmfRequest and not for TmfGeneric.