|
|
### Index Navigation ###
|
|
|
|
|
|
This section is part of the [CTI Manual](UserManualIndex.md). More precisely, it is included inside the [CTI Codelet Management Manual](TutorialsGeneralUsageCodeletManagement.md).
|
|
|
|
|
|
The previous section is [Section 4: MAQAO](TutorialsGeneralUsageCodeletManagementMAQAO.md).
|
|
|
|
|
|
The next section is [Section 6: Likwid](TutorialsGeneralUsageCodeletManagementLikwid.md).
|
|
|
|
|
|
|
|
|
|
|
|
# Introduction #
|
|
|
|
|
|
The following section explains how to analyze a binary with DECAN. DECAN uses as input a binary. Please make sure that your codelets are compiled before going to this step. The compilation process is described here: [Compile](TutorialsGeneralUsageCodeletManagementCompile.md)
|
|
|
|
|
|
DECAN produced 3 versions of the original binary, saved in the DECAN entry. These binaries are:
|
|
|
* The original binary without floating point instructions (nofp),
|
|
|
* The original binary whitout memory accesses (nomem),
|
|
|
* The original binary whitout memory accesses and floating point instructions (nomemfp).
|
|
|
|
|
|
# Create a DECAN entry #
|
|
|
|
|
|
Create a DECAN entry is the first step to analyze a binary with DECAN.
|
|
|
|
|
|
## CTS ##
|
|
|
|
|
|
### For one codelet ###
|
|
|
|
|
|
First, the user has to select a binary to analyze.
|
|
|
|
|
|
<p align='center'><img src='http://wiki.codelet-tuning-infrastructure.googlecode.com/git/img/Screen_binary_page.png' /></p>
|
|
|
|
|
|
<p align='center'><i>The binary viewer</i></p>
|
|
|
|
|
|
Then, on the binary page, he must click on the "DECAN" button to run the analysis.
|
|
|
|
|
|
<p align='center'><img src='http://wiki.codelet-tuning-infrastructure.googlecode.com/git/img/Screen_decan_new.png' /></p>
|
|
|
|
|
|
<p align='center'><i>The DECAN form</i></p>
|
|
|
|
|
|
The "binary" field is already filled if the codelet has been compiled previsouly. The last field can be filled with one of the suggested options. DECAN needs it in order to update memory accesses. "nop-multiple" is the default option. When the fields are filled, the user has to click on the "Add" button.
|
|
|
When the process is finished, the DECAN entry contains values in "result\_binaries" and "result\_flags" fields. Each entry in "result\_binaries" is linked to a version of the binary and the corresponding flag explains what is the version.
|
|
|
|
|
|
<p align='center'><img src='http://wiki.codelet-tuning-infrastructure.googlecode.com/git/img/Screen_decan_results.png' /></p>
|
|
|
|
|
|
<p align='center'><i>The DECAN results</i></p>
|
|
|
|
|
|
### For a set of codelets ###
|
|
|
|
|
|
The process is exactly the same, but the user must first go to the codelet\_group entry page.
|
|
|
|
|
|
## Command-Line ##
|
|
|
|
|
|
### For one codelet ###
|
|
|
|
|
|
To create a DECAN entry, the user must use the following command line:
|
|
|
```
|
|
|
$ cti decan init <binary_UID> [<mem_mode>]
|
|
|
```
|
|
|
|
|
|
For example:
|
|
|
```
|
|
|
$ cti decan init my_binary
|
|
|
Please enter MEM mode:
|
|
|
nop-multiple
|
|
|
|
|
|
The daemon is running!
|
|
|
DATA_CTI_UID=5791c3c8-3d4b-11e2-9a90-0022191169c2
|
|
|
```
|
|
|
|
|
|
N.B.: the DECAN process is automatically launched. However, the user can first initialize the DECAN entry and then run it as a second step. He must disable the auto\_run mode:
|
|
|
```
|
|
|
$ cti decan init my_binary nop-multiple --auto_run=false
|
|
|
...
|
|
|
UID=qsdqsd544
|
|
|
$ cti decan run qsdqsd544
|
|
|
```
|
|
|
|
|
|
To get data on the running daemon:
|
|
|
```
|
|
|
$ cti view data 76789988-f43e-11e2-bfa7-132fe6258d99
|
|
|
76789988-f43e-11e2-bfa7-132fe6258d99
|
|
|
|
|
|
|
|
|
** Information **
|
|
|
|
|
|
Plugin : daemon
|
|
|
Exit code : 0
|
|
|
Start date : 2013/07/24 10:53:11
|
|
|
End date : 2013/07/24 10:53:16
|
|
|
User : admin
|
|
|
Path : /home/users/mbordet/CTI/ctr-temp/data/76789988-f43e-11e2-bfa7-132fe6258d99
|
|
|
Repository : temp
|
|
|
|
|
|
** Output File **
|
|
|
|
|
|
Command: init
|
|
|
|
|
|
Parameter Description Type List Value
|
|
|
Command Command TEXT True /bin/bash /home/users/mbordet/CTI/ctr-common/plugins/f65256e6-06e8-40f6-9f37-21fe8854c157/decan.sh -b/home/users/mbordet/tmp/.ctr/data/ec485e38-f3a7-11e2-b75c-5fe9074192d1/files/wrapper.tar.gz -d/home/users/mbordet/CTI/ctr-common/plugins/f65256e6-06e8-40f6-9f37-21fe8854c157 -B4ac29bf3-dfd3-4ac5-acb4-bcfb51ddc138 -T/home/users/mbordet/CTI/third-party -E761719ce-f43e-11e2-8d63-63864659fae6 -mnop-multiple -Uadmin -X21232f297a57a5a743894a0e4a801fc3 -w/tmp -rcodelet_[0-9A-Za-z]+(_)?
|
|
|
Produced_By Produced by DATA_UID decan_test
|
|
|
Status Status TEXT Finished
|
|
|
Output Output file FILE output.txt
|
|
|
Pid The PID TEXT 8876
|
|
|
Return Return value TEXT 0
|
|
|
Execution_Time Execution time TEXT 5.78811311722
|
|
|
|
|
|
|
|
|
** Input File **
|
|
|
|
|
|
Command: init
|
|
|
|
|
|
Parameter Description Type List Value
|
|
|
Command Command TEXT True /bin/bash /home/users/mbordet/CTI/ctr-common/plugins/f65256e6-06e8-40f6-9f37-21fe8854c157/decan.sh -b/home/users/mbordet/tmp/.ctr/data/ec485e38-f3a7-11e2-b75c-5fe9074192d1/files/wrapper.tar.gz -d/home/users/mbordet/CTI/ctr-common/plugins/f65256e6-06e8-40f6-9f37-21fe8854c157 -B4ac29bf3-dfd3-4ac5-acb4-bcfb51ddc138 -T/home/users/mbordet/CTI/third-party -E761719ce-f43e-11e2-8d63-63864659fae6 -mnop-multiple -Uadmin -X21232f297a57a5a743894a0e4a801fc3 -w/tmp -rcodelet_[0-9A-Za-z]+(_)?
|
|
|
Produced_By Produced by DATA_UID decan_test
|
|
|
Format Format TEXT json
|
|
|
Auto_Run Auto run? BOOLEAN True
|
|
|
```
|
|
|
|
|
|
|
|
|
To get data from the DECAN entry (to check the binaries):
|
|
|
```
|
|
|
$ cti view data 761719ce-f43e-11e2-8d63-63864659fae6
|
|
|
decan_test
|
|
|
|
|
|
|
|
|
** Information **
|
|
|
|
|
|
Plugin : decan
|
|
|
Exit code : 0
|
|
|
Start date : 2013/07/24 10:53:08
|
|
|
End date : 2013/07/24 10:53:16
|
|
|
User : admin
|
|
|
Path : /home/users/mbordet/tmp/.ctr/data/761719ce-f43e-11e2-8d63-63864659fae6
|
|
|
Repository : my_rep
|
|
|
|
|
|
** Output File **
|
|
|
|
|
|
Command: init
|
|
|
|
|
|
Parameter Description Type List Value
|
|
|
Original_Binary binary entry DATA_UID binary_decan
|
|
|
Mem_Mode MEM mode TEXT nop-multiple
|
|
|
Result_Binaries Resulting binaries DATA_UID True wrapper_mem_13_07_24_10:53:11 wrapper_fp_13_07_24_10:53:11 wrapper_nomem-nofp_13_07_24_10:53:11
|
|
|
Result_Flags List of flags for created binaries TEXT True mem_binary fp_binary nomem_nofp_binary
|
|
|
Decan_Version Decan version TEXT NA
|
|
|
|
|
|
|
|
|
** Input File **
|
|
|
|
|
|
Command: init
|
|
|
|
|
|
Parameter Description Type List Value
|
|
|
Alias Alias TEXT None
|
|
|
Original_Binary binary entry DATA_UID binary_decan
|
|
|
Mem_Mode MEM mode TEXT nop-multiple
|
|
|
Format Format TEXT json
|
|
|
Auto_Run Auto run? BOOLEAN True
|
|
|
```
|
|
|
|
|
|
### For a set of codelets ###
|
|
|
|
|
|
After compiling all the codelets, the user must invoke the process plugin.
|
|
|
|
|
|
The process plugin allows to run a single command on a set of CTI entries. It replaces `<`UID> by the current entry to process. Entries are selected with a CTI query.
|
|
|
```
|
|
|
$ command="cti decan init <UID> nop-multiple"
|
|
|
$ cti process run_command "$command" "*" my_rep binary
|
|
|
```
|
|
|
|
|
|
# Conclusion #
|
|
|
The DECAN section presents how to analyze a binary with DECAN via CTS or command-line.
|
|
|
|
|
|
### Index Navigation ###
|
|
|
|
|
|
This section is part of the [CTI Manual](UserManualIndex.md). More precisely, it is included inside the [CTI Codelet Management Manual](TutorialsGeneralUsageCodeletManagement.md).
|
|
|
|
|
|
The previous section is [Section 4: MAQAO](TutorialsGeneralUsageCodeletManagementMAQAO.md).
|
|
|
|
|
|
The next section is [Section 6: Likwid](TutorialsGeneralUsageCodeletManagementLikwid.md). |
|
|
\ No newline at end of file |