blob: 01b4653078a3ec09d5d726998ff24fcafd734d21 [file] [log] [blame]
h3. BTF -> AMALTHEA Trace Database (ATDB) Import Example
The following section describes how to import an existing Best Trace Format (BTF) file into an AMALTHEA Trace Database (ATDB).
*Step 1*
Consider the following BTF file (stored on the file system as "test1.btf"):
bc. #version 2.1.5
#timeScale ns
0,ECU_1,-1,SIM,SIM,-1,tag,ECU_INIT
0,Processor_1,-1,SIM,SIM,-1,tag,PROCESSOR_INIT
0,Core_1,-1,SIM,SIM,-1,tag,CORE_INIT
0,Core_2,-1,SIM,SIM,-1,tag,CORE_INIT
0,Core_1,0,C,Core_1,0,set_frequence,10000000
0,Core_2,0,C,Core_2,0,set_frequence,11000000
0,Stimulus_Task_1,0,STI,Stimulus_Task_1,0,trigger
0,Stimulus_Task_1,0,T,Task_1,0,activate
0,Stimulus_Task_2,0,STI,Stimulus_Task_2,0,trigger
0,Stimulus_Task_2,0,T,Task_2,0,activate
100,Core_1,0,T,Task_1,0,start
100,Task_1,0,R,Runnable_1_1,0,start
100,Core_2,0,T,Task_2,0,start
100,Task_2,0,R,Runnable_2_1,0,start
20800,Task_1,0,R,Runnable_1_1,0,terminate
20800,Task_1,0,R,Runnable_1_2,0,start
40900,Task_1,0,R,Runnable_1_2,0,terminate
40900,Core_1,0,T,Task_1,0,terminate
45000,Stimulus_Task_3,0,STI,Stimulus_Task_3,0,trigger
45000,Stimulus_Task_3,0,T,Task_3,0,activate
45100,Task_2,0,R,Runnable_2_1,0,suspend
45100,Core_2,0,T,Task_2,0,preempt
45100,Core_2,0,T,Task_3,0,start
45100,Task_3,0,R,Runnable_3_1,0,start
55800,Task_3,0,R,Runnable_3_1,0,terminate
55800,Core_2,0,T,Task_3,0,terminate
55900,Core_2,0,T,Task_2,0,resume
55900,Task_2,0,R,Runnable_2_1,0,resume
61000,Task_2,0,R,Runnable_2_1,0,terminate
61000,Core_2,0,T,Task_2,0,terminate
Create a new empty Eclipse project that shall be used as a target container for the ATDB to imported from the btf file.
*Step 2*
!../pictures/project_rightclick_import.png!
Right-click on the project folder (in this example, the name of the project is "Test1"). You will see several possible options. In that menu select and click "Import...".
This will open a dialogue where different available import options are listed.
*Step 3*
Open the folder called "AMALTHEA Trace DB" by clicking on cross next to the title. This is shown in the following picture:
!../pictures/atdb_import_wizard_open.png!
Select the option "AMALTHEA Trace DB from BTF" and click the "Next" button.
*Step 4*
You are prompted to enter the location of the BTF file you want to import. Click the upper "Browse..." button to navigate your file system and select the "test1.btf" file. If you want to change the target project the ATDB file will be created in, press the lower "Browse..." button and make your choice. If you want the original trace data from the BTF in the data base file, select the option "Persist trace event table". The figure shows the example input:
!../pictures/atdb_to_btf_import_dialog.png!
*Step 5*
After you have made all required inputs, click on "Finish". This will start the import of the database. Once the transformation is done the dialogue will close and the newly created ATDB file is opened in the Metric Viewer. For our example, this is shown in the following figure:
!../pictures/atdb_in_metric_viewer.png!