我要评分
获取效率
正确性
完整性
易理解

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.

Syntax

devkit advisor cacheline {-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

Table 1 Parameter description

Parameter

Option

Description

-h/--help

-

Obtains help information.

-i/--input

-

Path of the source code folder to be scanned.

-o/--output

-

Path for storing scan reports. By default, scan reports are stored in the current execution path. A report name is the format of Feature name_Timestamp.

-r/--report-type

all/json/html/csv

Scan report format, which defaults to all.
  • all: generates reports in JSON, HTML, and CSV formats.
  • json: generates a report only in JSON format.
  • html: generates a report only in HTML format.
  • csv: generates a report only in CSV format.

-l/--log-level

0/1/2/3

Log level, which defaults to 1.
  • 0: DEBUG
  • 1: INFO
  • 2: WARNING
  • 3: ERROR

--set-timeout

-

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/advisor/project directory is scanned and the default values are used for other parameters.

devkit advisor cacheline -i /home/advisor/project
The following information is displayed and a report is generated:
Executing Cacheline Alignment Check task, please wait...
Current progress: 100%: 
Scanned time: 2024/05/29 07:43:09

Configuration:
    Scan source code path: /home/advisor/project
    Generate report path: /home/DevKit_Software
    Generate report type: all
    Task Timeout Interval: The timeout period is not set.
    Log level: info

Summary:
    Scanned 7 files, there are 1 recommended modifications.

For the details information, please check:
/home/DevKit_Software/cacheline_20240511065829_1846.json
/home/DevKit_Software/cacheline_20240511065829_1846.csv
/home/DevKit_Software/cacheline_20240511065829_1846.html

Output Report

Table 2 Output report parameters

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.