WO2022195892A1 - トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム - Google Patents

トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム Download PDF

Info

Publication number
WO2022195892A1
WO2022195892A1 PCT/JP2021/011545 JP2021011545W WO2022195892A1 WO 2022195892 A1 WO2022195892 A1 WO 2022195892A1 JP 2021011545 W JP2021011545 W JP 2021011545W WO 2022195892 A1 WO2022195892 A1 WO 2022195892A1
Authority
WO
WIPO (PCT)
Prior art keywords
emulator
trace
control device
user processes
embedded
Prior art date
Application number
PCT/JP2021/011545
Other languages
English (en)
French (fr)
Inventor
整 山本
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2023506704A priority Critical patent/JP7274069B2/ja
Priority to PCT/JP2021/011545 priority patent/WO2022195892A1/ja
Publication of WO2022195892A1 publication Critical patent/WO2022195892A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment

Definitions

  • the present disclosure relates to a trace control device, an emulator, a trace control method, and a trace control program.
  • the embedded OS runs on the emulator.
  • An emulator is, for example, software that simulates hardware on which an embedded OS operates.
  • the emulator runs on the development PC (Personal Computer) OS, and the development PC OS runs on the development PC.
  • Patent Document 1 discloses executing an object code with a cycle-based instruction set simulator and recording the address to be accessed and the access type.
  • the purpose of this disclosure is to reduce the trace processing load on the emulator and reduce the amount of trace data by tracing only specific user processes.
  • a trace control device is a trace control device that controls tracing of a plurality of user processes, Operating an embedded OS for operating the plurality of user processes, accepting specification of a process identifier for identifying each of the plurality of user processes from the embedded OS, and tracing the user process identified by the specified process identifier and an emulator execution unit that operates an emulator that
  • the trace control device According to the trace control device according to the present disclosure, only specified user processes can be traced, the trace processing load on the emulator can be reduced, and the amount of trace data can be reduced.
  • FIG. 2 is a diagram showing a hardware configuration example of a trace control device according to the first embodiment
  • FIG. 2 is a diagram showing a functional configuration example of a trace control device according to the first embodiment
  • FIG. 4 is a flowchart showing an operation example of trace control processing of the trace control device according to the first embodiment
  • FIG. 4 is a diagram for explaining a process identifier acquisition function of the emulator according to the first embodiment
  • FIG. 4 is a diagram showing an example of trace data according to the first embodiment
  • FIG. FIG. 5 is a diagram showing a hardware configuration example of a trace control device according to a modification of the first embodiment
  • FIG. 1 is a diagram showing an example of the hardware configuration of a trace control device 100 according to this embodiment.
  • Trace controller 100 is a computer.
  • Trace controller 100 includes processor 910 .
  • Processor 910 is specifically a CPU (Central Processing Unit).
  • the trace control device 100 may also include other hardware such as a memory 921 , an auxiliary storage device 922 , an input interface 930 , an output interface 940 and a communication device 950 .
  • the processor 910 is connected to other hardware via signal lines and controls these other hardware.
  • the trace control device 100 includes an emulator execution unit 110 and a storage unit 120 as functional elements. Information such as user processes 21 , trace data 25 , and cache miss rates 27 is stored in the storage unit 120 , for example.
  • the emulator execution unit 110 has a function of operating the emulator 23 .
  • Storage unit 120 is provided in memory 921 . Note that the storage unit 120 may be provided in the auxiliary storage device 922 , or may be distributed between the memory 921 and the auxiliary storage device 922 .
  • a processor 910 Central Processing Unit
  • the trace control program is a program that implements the functions of the emulator execution unit 110 .
  • the processor 910 is an IC (Integrated Circuit) that performs arithmetic processing.
  • the processor 910 may be a DSP (Digital Signal Processor) or a GPU (Graphics Processing Unit).
  • the memory 921 is a storage device that temporarily stores data.
  • a specific example of the memory 921 is SRAM (Static Random Access Memory) or DRAM (Dynamic Random Access Memory).
  • Auxiliary storage device 922 is a storage device that stores data.
  • a specific example of the auxiliary storage device 922 is an HDD.
  • the auxiliary storage device 922 may be a portable storage medium such as an SD (registered trademark) memory card, CF, NAND flash, flexible disk, optical disk, compact disk, Blu-ray (registered trademark) disk, or DVD.
  • SD registered trademark
  • SD® is an abbreviation for Secure Digital
  • CF is an abbreviation for CompactFlash®.
  • DVD is an abbreviation for Digital Versatile Disk.
  • the input interface 930 is a port connected to an input device such as a mouse, keyboard, or touch panel.
  • the input interface 930 is specifically a USB (Universal Serial Bus) terminal.
  • the input interface 930 may be a port connected to a LAN (Local Area Network).
  • the output interface 940 is a port to which a cable of an output device such as a display is connected.
  • the output interface 940 is specifically a USB terminal or an HDMI (registered trademark) (High Definition Multimedia Interface) terminal.
  • the display is specifically an LCD (Liquid Crystal Display).
  • Output interface 940 is also referred to as a display interface.
  • the communication device 950 has a receiver and a transmitter.
  • a communication device 950 is connected to a communication network such as a LAN, the Internet, or a telephone line.
  • the communication device 950 is specifically a communication chip or NIC (Network Interface Card).
  • the trace control program is executed in the trace control device 100.
  • the trace control program is loaded into processor 910 and executed by processor 910 .
  • the memory 921 stores not only the trace control program but also the OS (Operating System).
  • the processor 910 executes the trace control program while executing the OS.
  • the trace control program and OS may be stored in the auxiliary storage device 922 .
  • the trace control program and OS stored in auxiliary storage device 922 are loaded into memory 921 and executed by processor 910 . Part or all of the trace control program may be incorporated into the OS.
  • the trace control device 100 may include multiple processors to replace the processor 910 . These multiple processors share the execution of the trace control program. Each processor, like processor 910, is a device that executes a trace control program.
  • the data, information, signal values and variable values used, processed or output by the trace control program are stored in the memory 921, the auxiliary storage device 922, or the registers or cache memory within the processor 910.
  • the “unit” of the emulator execution unit 110 may be read as “circuit”, “process”, “procedure”, “processing”, or “circuitry”.
  • the trace control program causes the computer to execute emulator execution processing.
  • "Processing" of emulator execution processing may be read as "program”, “program product”, "computer-readable storage medium storing program”, or "computer-readable recording medium storing program”.
  • the trace control method is a method performed by the trace control device 100 executing a trace control program.
  • the trace control program may be provided by being stored in a computer-readable recording medium. Also, the trace control program may be provided as a program product.
  • FIG. 2 is a diagram showing an example of the functional configuration of the trace control device 100 according to this embodiment.
  • the processor 910 that operates the emulator 23, that is, the function of the CPU is assumed to be the emulator execution unit 110.
  • FIG. below, the function of the emulator execution unit 110 may be described as being realized by the processor 910, that is, the CPU.
  • the description of the operations mainly performed by the embedded OS 22 or the emulator 23 means that the operations are actually performed by the processor 910 such as the emulator execution unit 110, that is, the CPU.
  • the trace control device 100 controls tracing of multiple user processes 21 running on the embedded OS 22 .
  • the trace control device 100 operates the embedded OS 22 on the emulator 23 and operates the user process 21 on the embedded OS 22 .
  • the emulator 23 simulates hardware on which the embedded OS 22 operates.
  • the emulator 23 runs, for example, on the development PC OS, and the development PC OS runs on the development PC.
  • the trace control device 100 estimates, for example, the memory access frequency in the user process 21 running on the embedded OS 22 . Specifically, the memory access frequency to the off-chip memory of the user process 21 which is the program to be evaluated is acquired as the cache miss rate 27 . From the memory access frequency, that is, the cache miss rate 27, the execution performance of the user process 21, which is the program to be evaluated, can be estimated.
  • Off-chip memory is main memory such as DRAM connected outside the chip.
  • the emulator 23 has an instruction set simulator 24 .
  • the instruction set simulator 24 executes instructions. Instructions executed by the instruction set simulator 24 are instructions of the embedded OS 22 and instructions of the user process 21 . In this embodiment, the emulator 23 executes the user process 21 by means of the instruction set simulator 24 and traces the designated specific user process 21 .
  • FIG. 3 is a flowchart showing an operation example of trace control processing of trace control device 100 according to the present embodiment.
  • the operation of trace control apparatus 100 according to the present embodiment will be described with reference to FIGS. 2 and 3.
  • FIG. The operation procedure of the trace control device 100 corresponds to the trace control method.
  • a program that implements the operation of the trace control device 100 corresponds to a trace control program.
  • the emulator 23 has a control device 31 that accepts designation of the process identifier PID.
  • the embedded OS 22 also includes a control device driver 32 that enables control of the control device 31 .
  • a control process 33 is included in the plurality of user processes 21 .
  • the control process 33 is written as a control process Pc.
  • the emulator 23 is additionally provided with a control device 31 for trace control.
  • a control device driver 32 corresponding to the control device 31 is added to the embedded OS 22 .
  • the control process Pc included in the user process 21 enables trace-related control of the emulator 23 via the control device driver 32 and the control device 31 .
  • the trace-related control is control such as setting or referring to the process identifier PID that identifies the user process 21 to be traced, and instructing the start or end of the trace.
  • the control process Pc can notify the emulator 23 of the process identifier PID of the trace target process from the user space via the control device 31, for example.
  • tracing only specific processes (P1, . . . , Pn) using the emulator 23 it is possible to shorten the trace processing time of the emulator and reduce the amount of trace data.
  • step S101 the emulator 23 accepts designation of a process identifier PID that identifies each of the plurality of user processes 21.
  • the emulator 23 receives the designation of the process identifier PID from the control device driver 32 via the control device 31 by the control process Pc included in the plurality of user processes 21 .
  • step S102 the emulator 23 traces the specified process identifier PID.
  • the emulator 23 has an instruction set simulator 24 .
  • the instruction set simulator 24 executes instructions. Instructions executed by the instruction set simulator 24 are instructions of the embedded OS 22 and instructions of the user process 21 . Among the instructions executed by the instruction set simulator 24, the emulator 23 traces the information at the time of instruction execution for the instruction in the user process 21 with the specified process identifier PID. The emulator 23 records, as trace data 25, information on the execution of memory access instructions such as load or store and cache operation instructions.
  • FIG. 4 is a diagram for explaining the function of acquiring the process identifier PID by the emulator 23 according to this embodiment.
  • the emulator 23 acquires the process identifier PID from the data structure of the embedded OS22. Specifically, the emulator 23 is added with a function of acquiring the process identifier PID of the user process 21 running on the embedded OS 22 . As shown in FIG. 4, the emulator 23 can acquire the process identifier PID by tracing from the stack pointer. Further, the emulator 23 is added with a function of determining whether the program running on the emulator 23 is an OS or a user process.
  • the emulator 23 acquires the process identifier PID of the user process 21 running on the embedded OS 22, for example, using the function of FIG. 4, and traces if the process identifier PID is the specified process identifier PID.
  • FIG. 5 is a diagram showing an example of trace data 25 according to this embodiment.
  • the emulator 23 outputs trace data 25 having a process identifier 251, an instruction type 252, and execution instruction information 253 as a trace execution result.
  • the process identifier 251 is set with the process identifier of the user process 21 that executed the instruction.
  • the instruction type 252 is set with the type of the executed instruction. Specifically, types such as load, store, or cache operation instructions are set.
  • Information at the time of command execution is set in the execution command information 253 . Specifically, information such as addresses, access sizes, and cache operation types are set.
  • step S103 the emulator 23 inputs the trace data 25 to the cache simulator 26 and estimates the memory access frequency in the specified specific user process 21.
  • the emulator 23 acquires the memory access frequency to the off-chip memory of the specific user process 21 as the cache miss rate 27 .
  • the execution performance of the specific user process 21, which is the program to be evaluated can be estimated.
  • Off-chip memory is main memory such as DRAM connected outside the chip.
  • the emulator 23 analyzes the trace data 25 based on a cache simulator 26 that simulates the cache architecture of the built-in PF (platform). A cache miss rate 27 is estimated.
  • the functions of the trace control device 100 are realized by software.
  • the functions of trace control device 100 may be implemented in hardware.
  • trace controller 100 includes electronic circuitry 909 in place of processor 910 .
  • FIG. 6 is a diagram showing a configuration example of trace control device 100 according to a modification of the present embodiment.
  • the electronic circuit 909 is a dedicated electronic circuit that implements the functions of the trace control device 100 .
  • Electronic circuit 909 is specifically a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, a logic IC, GA, ASIC, or FPGA.
  • GA is an abbreviation for Gate Array.
  • ASIC is an abbreviation for Application Specific Integrated Circuit.
  • FPGA is an abbreviation for Field-Programmable Gate Array.
  • the functions of the trace control device 100 may be realized by one electronic circuit, or may be distributed and realized by a plurality of electronic circuits.
  • part of the functions of the trace control device 100 may be implemented by electronic circuits, and the remaining functions may be implemented by software. Also, part or all of the functions of the trace control device 100 may be realized by firmware.
  • Each processor and electronic circuit is also called processing circuitry.
  • the functions of the trace control device 100 are implemented by the processing circuitry.
  • the emulator trace processing time is can be shortened and the amount of trace data can be reduced.
  • the trace processing load on the emulator can be reduced and the amount of trace data can be reduced.
  • each part of the trace control device has been described as an independent functional block.
  • the configuration of the trace control device does not have to be the configuration of the embodiment described above.
  • the functional blocks of the trace control device may have any configuration as long as they can implement the functions described in the above embodiments.
  • the trace control device may be a system composed of a plurality of devices instead of a single device.
  • this embodiment may be implemented as a whole or partially in any combination. That is, in Embodiment 1, it is possible to freely combine each embodiment, modify any component of each embodiment, or omit any component from each embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

トレース制御装置(100)は、複数のユーザプロセスのトレースを制御する。トレース制御装置(100)は、エミュレータ実行部(110)を備える。エミュレータ実行部(110)は、複数のユーザプロセスを動作させる組込みOS(Operating System)を動作させ、組込みOSから複数のユーザプロセスの各々を識別するプロセス識別子の指定を受け付け、指定されたプロセス識別子により識別されるユーザプロセスのトレースを実施するエミュレータを動作させる。

Description

トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム
 本開示は、トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラムに関する。
 組込みOS(Operating System)上で動作しているユーザプロセスの動作をトレースする装置がある。組込みOSは、エミュレータ上で動作している。エミュレータは、例えば、組込みOSが動作するハードウェアを模擬しているソフトウェアである。エミュレータは、開発PC(Personal Computer)用OS上で動作し、開発PC用OSは開発PC上で動作している。
 特許文献1には、オブジェクトコードをサイクルベース命令セットシミュレータにより実行し、アクセスするアドレスおよびアクセスタイプを記録することが開示されている。
国際公開第2006/022204
 従来技術では、評価対象プログラムがOS上で動作する場合、OSおよび評価対象プログラム以外のプロセスによるオフチップメモリアクセスをすべてトレースしてしまう。そのため、トレース処理時間の長時間化およびトレースデータサイズの大容量化が課題となる。
 本開示では、特定のユーザプロセスのみトレースすることで、エミュレータのトレース処理負荷を低減し、かつ、トレースデータ量を削減することを目的とする。
 本開示に係るトレース制御装置は、複数のユーザプロセスのトレースを制御するトレース制御装置において、
 前記複数のユーザプロセスを動作させる組込みOSを動作させ、前記組込みOSから前記複数のユーザプロセスの各々を識別するプロセス識別子の指定を受け付け、指定されたプロセス識別子により識別されるユーザプロセスのトレースを実施するエミュレータを動作させるエミュレータ実行部を備える。
 本開示に係るトレース制御装置によれば、指定されたユーザプロセスのみトレースすることができ、エミュレータのトレース処理負荷を低減し、かつ、トレースデータ量を削減することができる。
実施の形態1に係るトレース制御装置のハードウェア構成例を示す図。 実施の形態1に係るトレース制御装置の機能構成例を示す図。 実施の形態1に係るトレース制御装置のトレース制御処理の動作例を示すフロー図。 実施の形態1に係るエミュレータによるプロセス識別子の取得機能を説明する図。 実施の形態1に係るトレースデータの例を示す図。 実施の形態1の変形例に係るトレース制御装置のハードウェア構成例を示す図。
 以下、本実施の形態について、図を用いて説明する。各図中、同一または相当する部分には、同一符号を付している。実施の形態の説明において、同一または相当する部分については、説明を適宜省略または簡略化する。
 実施の形態1.
***構成の説明***
 図1は、本実施の形態に係るトレース制御装置100のハードウェア構成の例を示す図である。
 トレース制御装置100は、コンピュータである。トレース制御装置100は、プロセッサ910を備える。プロセッサ910は、具体的にはCPU(Central Processing Unit)である。また、トレース制御装置100は、プロセッサ910の他に、メモリ921、補助記憶装置922、入力インタフェース930、出力インタフェース940、および通信装置950といった他のハードウェアを備えていてもよい。この場合、プロセッサ910は、信号線を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
 トレース制御装置100は、機能要素として、エミュレータ実行部110と記憶部120を備える。記憶部120には、例えば、ユーザプロセス21、トレースデータ25、およびキャッシュミス率27といった情報が記憶される。
 エミュレータ実行部110は、エミュレータ23を動作させる機能を有する。
 記憶部120は、メモリ921に備えられる。なお、記憶部120は、補助記憶装置922に備えられていてもよいし、メモリ921と補助記憶装置922に分散して備えられていてもよい。
 プロセッサ910(Central Processing Unit)は、トレース制御プログラムを実行する装置である。トレース制御プログラムは、エミュレータ実行部110の機能を実現するプログラムである。
 プロセッサ910は、演算処理を行うIC(Integrated Circuit)である。プロセッサ910は、DSP(Digital Signal Processor)、GPU(Graphics Processing Unit)であってもよい。
 メモリ921は、データを一時的に記憶する記憶装置である。メモリ921の具体例は、SRAM(Static Random Access Memory)、あるいはDRAM(Dynamic Random Access Memory)である。
 補助記憶装置922は、データを保管する記憶装置である。補助記憶装置922の具体例は、HDDである。また、補助記憶装置922は、SD(登録商標)メモリカード、CF、NANDフラッシュ、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVDといった可搬の記憶媒体であってもよい。なお、HDDは、Hard Disk Driveの略語である。SD(登録商標)は、Secure Digitalの略語である。CFは、CompactFlash(登録商標)の略語である。DVDは、Digital Versatile Diskの略語である。
 入力インタフェース930は、マウス、キーボード、あるいはタッチパネルといった入力装置と接続されるポートである。入力インタフェース930は、具体的には、USB(Universal Serial Bus)端子である。なお、入力インタフェース930は、LAN(Local Area Network)と接続されるポートであってもよい。
 出力インタフェース940は、ディスプレイといった出力機器のケーブルが接続されるポートである。出力インタフェース940は、具体的には、USB端子またはHDMI(登録商標)(High Definition Multimedia Interface)端子である。ディスプレイは、具体的には、LCD(Liquid Crystal Display)である。出力インタフェース940は、表示器インタフェースともいう。
 通信装置950は、レシーバとトランスミッタを有する。通信装置950は、LAN、インターネット、あるいは電話回線といった通信網に接続している。通信装置950は、具体的には、通信チップまたはNIC(Network Interface Card)である。
 トレース制御プログラムは、トレース制御装置100において実行される。トレース制御プログラムは、プロセッサ910に読み込まれ、プロセッサ910によって実行される。メモリ921には、トレース制御プログラムだけでなく、OS(Operating System)も記憶されている。プロセッサ910は、OSを実行しながら、トレース制御プログラムを実行する。トレース制御プログラムおよびOSは、補助記憶装置922に記憶されていてもよい。補助記憶装置922に記憶されているトレース制御プログラムおよびOSは、メモリ921にロードされ、プロセッサ910によって実行される。なお、トレース制御プログラムの一部または全部がOSに組み込まれていてもよい。
 トレース制御装置100は、プロセッサ910を代替する複数のプロセッサを備えていてもよい。これら複数のプロセッサは、トレース制御プログラムの実行を分担する。それぞれのプロセッサは、プロセッサ910と同じように、トレース制御プログラムを実行する装置である。
 トレース制御プログラムにより利用、処理または出力されるデータ、情報、信号値および変数値は、メモリ921、補助記憶装置922、または、プロセッサ910内のレジスタあるいはキャッシュメモリに記憶される。
 エミュレータ実行部110の「部」を「回路」、「工程」、「手順」、「処理」、あるいは「サーキットリー」に読み替えてもよい。トレース制御プログラムは、エミュレータ実行処理をコンピュータに実行させる。エミュレータ実行処理の「処理」を「プログラム」、「プログラムプロダクト」、「プログラムを記憶したコンピュータ読取可能な記憶媒体」、または「プログラムを記録したコンピュータ読取可能な記録媒体」に読み替えてもよい。また、トレース制御方法は、トレース制御装置100がトレース制御プログラムを実行することにより行われる方法である。
 トレース制御プログラムは、コンピュータ読取可能な記録媒体に格納されて提供されてもよい。また、トレース制御プログラムは、プログラムプロダクトとして提供されてもよい。
***機能構成の説明***
 図2は、本実施の形態に係るトレース制御装置100の機能構成の例を示す図である。
 図1では、エミュレータ23を動作させるプロセッサ910、すなわちCPUの機能をエミュレータ実行部110とした。
 以下では、エミュレータ実行部110の機能を、プロセッサ910、すなわちCPUが実現するものとして説明する場合がある。また、以下では、組込みOS22あるいはエミュレータ23が主体となる動作の説明は、実際にはエミュレータ実行部110といったプロセッサ910、すなわちCPUが行うことを意味する。
 トレース制御装置100は、組込みOS22上で動作している複数のユーザプロセス21のトレースを制御する。
 トレース制御装置100では、エミュレータ23上で組込みOS22を動作させ、組込みOS22上でユーザプロセス21を動作させる。
 エミュレータ23は、組込みOS22が動作するハードウェアを模擬する。エミュレータ23は、例えば、開発PC用OS上で動作し、開発PC用OSは開発PC上で動作する。
 トレース制御装置100は、例えば、組込みOS22上で動作しているユーザプロセス21におけるメモリアクセス頻度を推定する。具体的には、評価対象プログラムであるユーザプロセス21のオフチップメモリへのメモリアクセス頻度をキャッシュミス率27として取得する。その、メモリアクセス頻度、すなわち、キャッシュミス率27から、評価対象プログラムであるユーザプロセス21の実行性能が推定できる。オフチップメモリとは、チップ外に接続されたDRAMといったメインメモリである。
 エミュレータ23は、命令セットシミュレータ24を備える。命令セットシミュレータ24は、命令を実行する。命令セットシミュレータ24により実行される命令は、組込みOS22の命令、および、ユーザプロセス21の命令である。
 なお、本実施の形態では、エミュレータ23は、命令セットシミュレータ24により、ユーザプロセス21を実行し、指定された特定のユーザプロセス21のトレースを実施する。
***動作の説明***
 図3は、本実施の形態に係るトレース制御装置100のトレース制御処理の動作例を示すフロー図である。
 図2および図3を用いて、本実施の形態に係るトレース制御装置100の動作について説明する。
 トレース制御装置100の動作手順は、トレース制御方法に相当する。また、トレース制御装置100の動作を実現するプログラムは、トレース制御プログラムに相当する。
 エミュレータ23は、プロセス識別子PIDの指定を受け付ける制御用デバイス31を備える。また、組込みOS22は、制御用デバイス31を制御可能にする制御用デバイスドライバ32を備える。
 また、複数のユーザプロセス21には、制御用プロセス33が含まれる。制御用プロセス33を制御用プロセスPcと表記する。
 図2に示すように、本実施の形態では、エミュレータ23に、トレース制御用の制御用デバイス31が追加されている。また、組込みOS22には、制御用デバイス31に対応する制御用デバイスドライバ32が追加されている。ユーザプロセス21に含まれる制御用プロセスPcにより、制御用デバイスドライバ32および制御用デバイス31を介してエミュレータ23へトレース関連の制御を行うことが可能となる。
 トレース関連の制御とは、トレース対象のユーザプロセス21を識別するプロセス識別子PIDの設定あるいは参照、および、トレースの開始指示あるいは終了指示といった制御である。
 制御用プロセスPcにより、例えば、制御用デバイス31を介してユーザ空間からエミュレータ23へトレース対象プロセスのプロセス識別子PIDを通知することができる。エミュレータ23により、特定のプロセス(P1,・・・,Pn)のみトレースすることで、エミュレータのトレース処理時間を短縮するとともに、トレースデータ量を削減することができる。
 ステップS101において、エミュレータ23は、複数のユーザプロセス21の各々を識別するプロセス識別子PIDの指定を受け付ける。エミュレータ23は、複数のユーザプロセス21に含まれる制御用プロセスPcにより、制御用デバイスドライバ32から制御用デバイス31を経由してプロセス識別子PIDの指定を受け付ける。
 ステップS102において、エミュレータ23は、指定されたプロセス識別子PIDについてトレースを実施する。
 エミュレータ23は、命令セットシミュレータ24を備える。命令セットシミュレータ24は、命令を実行する。命令セットシミュレータ24により実行される命令は、組込みOS22の命令、および、ユーザプロセス21の命令である。
 エミュレータ23は、命令セットシミュレータ24により実行された命令のうち、指定されたプロセス識別子PIDのユーザプロセス21における命令について、命令実行時の情報をトレースする。
 エミュレータ23は、ロードあるいはストアといったメモリアクセス命令、および、キャッシュ操作命令の実行時に、命令実行時の情報をトレースデータ25として記録する。
 図4は、本実施の形態に係るエミュレータ23によるプロセス識別子PIDの取得機能を説明する図である。
 エミュレータ23は、組込みOS22のデータ構造からプロセス識別子PIDを取得する。
 具体的には、エミュレータ23には、組込みOS22上で動作しているユーザプロセス21のプロセス識別子PIDを取得する機能が追加される。図4に示すように、エミュレータ23は、スタックポインタからたどることでプロセス識別子PIDを取得できる。また、エミュレータ23には、エミュレータ23上で動作しているプログラムがOSかユーザプロセスかを判断する機能が追加される。
 エミュレータ23は、例えば、図4の機能により、組込みOS22上で動作しているユーザプロセス21のプロセス識別子PIDを取得し、プロセス識別子PIDが指定されたプロセス識別子PIDであれば、トレースを実施する。
 図5は、本実施の形態に係るトレースデータ25の例を示す図である。
 エミュレータ23は、トレースの実施結果として、プロセス識別子251、命令種別252、および実行命令情報253をもつトレースデータ25を出力する。
 プロセス識別子251には、命令を実行したユーザプロセス21のプロセス識別子が設定される。
 命令種別252には、実行した命令の種別が設定される。具体的には、ロード、ストア、あるいは、キャッシュ操作命令といった種別が設定される。
 実行命令情報253には、命令実行時の情報が設定される。具体的には、アドレス、アクセスサイズ、およびキャッシュ操作種別といった情報が設定される。
 ステップS103において、エミュレータ23は、トレースデータ25をキャッシュシミュレータ26へ入力し、指定された特定のユーザプロセス21におけるメモリアクセス頻度を推定する。具体的には、エミュレータ23は、特定のユーザプロセス21のオフチップメモリへのメモリアクセス頻度をキャッシュミス率27として取得する。その、メモリアクセス頻度、すなわち、キャッシュミス率27から、評価対象プログラムである特定のユーザプロセス21の実行性能が推定できる。オフチップメモリとは、チップ外に接続されたDRAMといったメインメモリである。
 具体的には、エミュレータ23は、トレースデータ25を組込みPF(プラットフォーム)のキャッシュアーキテクチャを模擬したキャッシュシミュレータ26をもとに解析し、キャッシュミスが生じオフチップメモリへのアクセスが発生する頻度であるキャッシュミス率27を推定する。
 ***他の構成***
 本実施の形態では、トレース制御装置100の機能がソフトウェアで実現される。変形例として、トレース制御装置100の機能がハードウェアで実現されてもよい。
 具体的には、トレース制御装置100は、プロセッサ910に替えて電子回路909を備える。
 図6は、本実施の形態の変形例に係るトレース制御装置100の構成例を示す図である。
 電子回路909は、トレース制御装置100の機能を実現する専用の電子回路である。電子回路909は、具体的には、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ロジックIC、GA、ASIC、または、FPGAである。GAは、Gate Arrayの略語である。ASICは、Application Specific Integrated Circuitの略語である。FPGAは、Field-Programmable Gate Arrayの略語である。
 トレース制御装置100の機能は、1つの電子回路で実現されてもよいし、複数の電子回路に分散して実現されてもよい。
 別の変形例として、トレース制御装置100の一部の機能が電子回路で実現され、残りの機能がソフトウェアで実現されてもよい。また、トレース制御装置100の一部またはすべての機能がファームウェアで実現されてもよい。
 プロセッサと電子回路の各々は、プロセッシングサーキットリとも呼ばれる。つまり、トレース制御装置100の機能は、プロセッシングサーキットリにより実現される。
***本実施の形態の効果の説明***
 以上のように、本実施の形態に係るトレース制御装置100では、評価対象プログラムであるユーザプロセスにおけるオフチップメモリへのアクセス頻度(キャッシュミス率)をエミュレータで取得する際の、エミュレータのトレース処理時間を短縮し、トレースデータ量を削減することができる。組込みOS上で動作するプロセス識別子を取得し、特定プロセスのみトレースできるようにすることで、エミュレータのトレース処理負荷を低減、トレースデータ量を削減することができる。
 以上の実施の形態1では、トレース制御装置の各部を独立した機能ブロックとして説明した。しかし、トレース制御装置の構成は、上述した実施の形態のような構成でなくてもよい。トレース制御装置の機能ブロックは、上述した実施の形態で説明した機能を実現することができれば、どのような構成でもよい。また、トレース制御装置は、1つの装置でなく、複数の装置から構成されたシステムでもよい。
 また、実施の形態1のうち、複数の部分を組み合わせて実施しても構わない。あるいは、この実施の形態のうち、1つの部分を実施しても構わない。その他、この実施の形態を、全体としてあるいは部分的に、どのように組み合わせて実施しても構わない。
 すなわち、実施の形態1では、各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。
 なお、上述した実施の形態は、本質的に好ましい例示であって、本開示の範囲、本開示の適用物の範囲、および本開示の用途の範囲を制限することを意図するものではない。上述した実施の形態は、必要に応じて種々の変更が可能である。
 21 ユーザプロセス、22 組込みOS、23 エミュレータ、24 命令セットシミュレータ、25 トレースデータ、251 プロセス識別子、252 命令種別、253 実行命令情報、26 キャッシュシミュレータ、27 キャッシュミス率、31 制御用デバイス、32 制御用デバイスドライバ、33 制御用プロセス、100 トレース制御装置、110 エミュレータ実行部、120 記憶部、909 電子回路、910 プロセッサ、921 メモリ、922 補助記憶装置、930 入力インタフェース、940 出力インタフェース、950 通信装置。

Claims (7)

  1.  複数のユーザプロセスのトレースを制御するトレース制御装置において、
     前記複数のユーザプロセスを動作させる組込みOS(Operating System)を動作させ、前記組込みOSから前記複数のユーザプロセスの各々を識別するプロセス識別子の指定を受け付け、指定されたプロセス識別子により識別されるユーザプロセスのトレースを実施するエミュレータを動作させるエミュレータ実行部を備えたトレース制御装置。
  2.  前記エミュレータは、前記プロセス識別子の指定を受け付ける制御用デバイスを備え、
     前記組込みOSは、前記制御用デバイスを制御可能にする制御用デバイスドライバを備え、
     前記エミュレータは、
     前記複数のユーザプロセスに含まれる制御用プロセスにより、前記制御用デバイスドライバと前記制御用デバイスを経由して前記プロセス識別子の指定を受け付ける請求項1に記載のトレース制御装置。
  3.  前記エミュレータは、
     前記組込みOSのデータ構造から前記複数のユーザプロセスの各々のプロセス識別子を取得する請求項1または請求項2に記載のトレース制御装置。
  4.  前記エミュレータは、
     前記トレースの実施結果として、命令を実行したユーザプロセスのプロセス識別子、実行した命令の命令種別、および命令実行時の情報である実行命令情報を含むトレースデータを出力する請求項1から請求項3のいずれか1項に記載のトレース制御装置。
  5.  複数のユーザプロセスのトレースを制御するトレース制御装置に含まれるエミュレータにおいて、
     前記複数のユーザプロセスを動作させる組込みOS(Operating System)を動作させ、前記組込みOSから前記複数のユーザプロセスの各々を識別するプロセス識別子の指定を受け付け、指定されたプロセス識別子についてトレースを実施するエミュレータ。
  6.  複数のユーザプロセスのトレースを制御するトレース制御方法において、
     前記複数のユーザプロセスを動作させる組込みOS(Operating System)を動作させ、
     前記組込みOSから前記複数のユーザプロセスの各々を識別するプロセス識別子の指定を受け付け、指定されたプロセス識別子により識別されるユーザプロセスのトレースを実施するトレース制御方法。
  7.  複数のユーザプロセスのトレースを制御するトレース制御プログラムにおいて、
     前記複数のユーザプロセスを動作させる組込みOS(Operating System)を動作させ、前記組込みOSから前記複数のユーザプロセスの各々を識別するプロセス識別子の指定を受け付け、指定されたプロセス識別子により識別されるユーザプロセスのトレースを実施するエミュレータを動作させるエミュレータ実行処理をコンピュータに実行させるトレース制御プログラム。
PCT/JP2021/011545 2021-03-19 2021-03-19 トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム WO2022195892A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2023506704A JP7274069B2 (ja) 2021-03-19 2021-03-19 トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム
PCT/JP2021/011545 WO2022195892A1 (ja) 2021-03-19 2021-03-19 トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/011545 WO2022195892A1 (ja) 2021-03-19 2021-03-19 トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム

Publications (1)

Publication Number Publication Date
WO2022195892A1 true WO2022195892A1 (ja) 2022-09-22

Family

ID=83322188

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/011545 WO2022195892A1 (ja) 2021-03-19 2021-03-19 トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム

Country Status (2)

Country Link
JP (1) JP7274069B2 (ja)
WO (1) WO2022195892A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08221296A (ja) * 1995-02-15 1996-08-30 Nec Corp 組み込みソフトウェアデバッグ支援装置
WO2014147742A1 (ja) * 2013-03-19 2014-09-25 富士通株式会社 エラー分析方法、情報処理装置およびエラー分析プログラム
JP2019212244A (ja) * 2018-06-08 2019-12-12 富士通株式会社 通知制御プログラム、通知制御方法および情報処理装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08221296A (ja) * 1995-02-15 1996-08-30 Nec Corp 組み込みソフトウェアデバッグ支援装置
WO2014147742A1 (ja) * 2013-03-19 2014-09-25 富士通株式会社 エラー分析方法、情報処理装置およびエラー分析プログラム
JP2019212244A (ja) * 2018-06-08 2019-12-12 富士通株式会社 通知制御プログラム、通知制御方法および情報処理装置

Also Published As

Publication number Publication date
JPWO2022195892A1 (ja) 2022-09-22
JP7274069B2 (ja) 2023-05-15

Similar Documents

Publication Publication Date Title
TWI509518B (zh) 用於改良巢式虛擬化之性能的方法、中央處理單元裝置及系統
JP6994071B2 (ja) Protobufベースのプロジェクトのための包括的な検証手法
JP4843013B2 (ja) Vmmシステムにおけるユーザosがサービスosによって使用されている装置の電源を切らないようにするためのシステム及び方法
US7743228B2 (en) Information processing apparatus and method for obtaining software processing log
WO2017020647A1 (zh) 基于新型存储器的嵌入式文件系统及其实现方法
US10127018B2 (en) Dynamic addition of code in shared libraries
KR20170027125A (ko) 컴퓨팅 시스템 및 컴퓨팅 시스템에서 연산들을 처리하는 방법
US7581037B2 (en) Effecting a processor operating mode change to execute device code
JP5778296B2 (ja) 仮想計算機システム、仮想化機構、及びデータ管理方法
CN114327777B (zh) 确定全局页目录的方法、装置、电子设备及存储介质
KR20200060245A (ko) 데이터 액세스 방법, 장치, 기기 및 저장 매체
JP2010152892A (ja) ハードウェアデバイスをヘテロジニアス処理ユニット間でバインドし移行するためのチップセットサポート
CN105740413A (zh) Linux平台上使用FUSE的文件移动方法
CN112882694A (zh) 一种程序编译方法、装置、电子设备及可读存储介质
US20100017588A1 (en) System, method, and computer program product for providing an extended capability to a system
US7689728B2 (en) Method and apparatus for describing ACPI machine language in computer having multibridge PCI structure, and program thereof
WO2022195892A1 (ja) トレース制御装置、エミュレータ、トレース制御方法、および、トレース制御プログラム
JP6667733B2 (ja) シミュレーション装置、シミュレーション方法およびシミュレーションプログラム
US9003364B2 (en) Overriding system attributes and function returns in a software subsystem
JP6545417B2 (ja) シミュレーション装置、シミュレーション方法およびシミュレーションプログラム
JP2007094986A (ja) シミュレーション装置およびシミュレーション方法
KR100699268B1 (ko) 하드 디스크 드라이브의 플래쉬 메모리를 메인 &비디오메모리로 사용 할 수 있는 컴퓨터
US8117427B2 (en) Motherboard, storage device and controller thereof, and booting method
US10216524B2 (en) System and method for providing fine-grained memory cacheability during a pre-OS operating environment
TWI779630B (zh) 儲存除錯資訊的系統及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21931637

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023506704

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21931637

Country of ref document: EP

Kind code of ref document: A1