Rate This Document
Findability
Accuracy
Completeness
Readability

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

Table 1 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.
  • pmu: displays data from the Performance Monitor Unit (PMU) in the data file.
  • trace: displays function trace data in the data file.
  • memory: displays memory analysis data in the data file.
  • component: displays the component call data in the data file.

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
Table 2 Fields

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.

  • Store-Store (SS): indicates that both accesses are write operations.
  • Store-Load (SL): indicates that one access is a write operation and the other is a read operation.

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.

  • adjacent: indicates that the addresses of two cache line accesses are next to each other.
  • same-line: indicates that the addresses of two cache line accesses are not next to each other.

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).