Checking Cache Line Alignment
The cache line alignment check function checks the 128-byte alignment of structure variables in the C/C++ source code to improve memory access performance.
Command Function
Performs 128-byte alignment check on structure variables in C/C++ source code.
Syntax
devkit advisor cacheline [-h | --help] {-i INPUT_PATH | --input INPUT_PATH} [-o OUTPUT_PATH | --output OUTPUT_PATH] [-r {all,json,html,csv} | --report-type {all,json,html,csv}] [-l {0,1,2,3} | --log-level {0,1,2,3}] [--set-timeout TIMEOUT]
Parameter Description
Parameter |
Option |
Description |
|---|---|---|
-h/--help |
- |
Obtains help information. |
-i/--input |
input_path |
Path of the source code folder to be scanned. This parameter is mandatory. |
-o/--output |
output_path |
Path for storing scan reports. By default, scan reports are stored in the current execution path. A report name is the format of Module name_Timestamp. |
-r/--report-type |
all/json/html/csv |
Scan report format, which defaults to all.
|
-l/--log-level |
0/1/2/3 |
Log level, which defaults to 1.
|
--set-timeout |
time |
Timeout interval of a task, in minutes. If the execution duration exceeds the timeout interval, the task exits. By default, there is no timeout interval. The task will be executed until it is complete. |
Example
In this example, the source code in the /home/test_code/vecanalyzer directory is scanned. Retain the default values for the other parameters. Replace the example parameter values with the actual ones.
devkit advisor cacheline -i /home/test_code/vecanalyzer -o /home/out/
The following information is displayed and a report is generated:
Executing Cacheline Alignment Check task, please wait...
Current progress: 100%:
Scanned time: 2024/06/12 03:59:22
Configuration:
Scan source code path: /home/test_code/vecanalyzer
Generate report path: /home/out
Generate report type: all
Task Timeout Interval: The timeout period is not set.
Log level: info
Summary:
Scanned 3 files, there are 1 recommended modifications.
For the details information, please check:
/home/out/cacheline_20240612035922_3710.json
/home/out/cacheline_20240612035922_3710.csv
/home/out/cacheline_20240612035922_3710.htmlOutput Report
Parameter |
Description |
|---|---|
Configuration |
Displays the software source file path. |
Source File to Be Modified |
Displays information such as the path of the source file that needs to be modified. |