script
Command Function
Reads data files and displays their contents, suitable for data inspection and debugging scenarios.
Syntax
./devopt.sh script [-h] -i INPUT [-t {pmu,trace,memory,component}]
Parameter Description
Parameter |
Option |
Description |
|---|---|---|
-h/--help |
- |
(Optional) Obtains help information. |
-i/--input |
- |
(Mandatory) Data file. |
-t/--type |
pmu/trace/memory/component |
(Optional) Data type. The default value is pmu.
|
Example
Display information about the script command.
./devopt.sh script -h
Command output:
USAGE
devopt.sh script [-h] -i INPUT [-t {pmu,trace,memory,component}]
DESCRIPTION
Reads a data file and displays the original collected data.
OPTIONS
-h, --help
Displays help information and exits.
-i INPUT, --input INPUT
Specifies a data file.
-t {pmu,trace,memory,component}, --type {pmu,trace,memory,component}
Specifies the output data type. The value can be pmu, trace, memory or component. The default value is pmu.
EXAMPLES
# View PMU data.
devopt.sh script -i /home/output/devopt_pid_timestamp.rawdata
# View memory data.
devopt.sh script -t memory -i /home/output/devopt_pid_timestamp.rawdata
# View component data.
devopt.sh script -t component -i /home/output/devopt_pid_timestamp.rawdata
View memory analysis data in the data file.
1 | ./devopt.sh script -i devopt_3315674_20260513155321.rawdata -t memory |
Command output:
FS 1: 0x4009bc <-> 0x400bcc Type:SL CacheLineAddr:0x420040 Access Info: adjacent;+0x20/+0x24;4B/4B
A: sum_a(void*)@/home/test/falsesharing_demo:32
B: inc_b(void*)@/home/test/falsesharing_demo:59
Field |
Description |
|---|---|
FS |
Indicates that the event is a false sharing (FS) event. |
1 |
Sequence number of a false sharing event, indicating the analysis priority of a false sharing pair. |
0x4009bc, 0x400bcc |
Program counter address that accesses the cache line. |
Type |
Memory access type.
|
CacheLineAddr |
Start address of the cache line where the false sharing issue occurs. In the example, the start address is 0x420040. |
Access Info |
Memory access information, including whether the accessed cache line addresses are adjacent, the offset, and the access width.
In the example, adjacent indicates that the addresses of the two cache line accesses are adjacent; +0x20/+0x24 indicates that the offsets of the two accesses are +0x20 and +0x24; and 4B/4B indicates that both accesses have a width of 4 bytes. |
A, 32 |
Function name and source code line number corresponding to the first program counter address. In the example, A and 32 indicate the function name and source code line number corresponding to the first program counter address (0x4009bc). |
B, 59 |
Function name and source code line number corresponding to the second program counter address. In the example, B and 59 indicate the function name and source code line number corresponding to the second program counter address (0x400bcc). |