WO2015015591A1 - Procédé de débogage de logiciels, dispositif de traitement d'informations et programme - Google Patents

Procédé de débogage de logiciels, dispositif de traitement d'informations et programme Download PDF

Info

Publication number
WO2015015591A1
WO2015015591A1 PCT/JP2013/070734 JP2013070734W WO2015015591A1 WO 2015015591 A1 WO2015015591 A1 WO 2015015591A1 JP 2013070734 W JP2013070734 W JP 2013070734W WO 2015015591 A1 WO2015015591 A1 WO 2015015591A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
instruction
cpu
area
address
Prior art date
Application number
PCT/JP2013/070734
Other languages
English (en)
Japanese (ja)
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 PCT/JP2013/070734 priority Critical patent/WO2015015591A1/fr
Priority to JP2015529270A priority patent/JP6069719B2/ja
Publication of WO2015015591A1 publication Critical patent/WO2015015591A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Definitions

  • the present invention relates to a software debugging method, an information processing apparatus, and a program.
  • the software running on the computer may stop abnormally or terminate abnormally, and the software operation may contain a bug (bug) that differs from the specification. Debugging is performed to detect and fix the bug. Is called.
  • bugging information that indicates the occurrence of a problem (for example, an error log or memory dump) is collected, the collected information is analyzed to identify the cause of the problem, and software correction (for example, rewriting of the source code) is performed. )I do.
  • a failure may occur due to environmental conditions different from the case where the software is operated by only one processor.
  • One example of the cause of such a problem is a lack of exclusive control over an area on the memory. If a lock is not properly acquired when using a memory area, two or more processors access the same memory address area at the same time, and the data used by one processor is unintentionally rewritten by another processor. May end up.
  • a certain processor temporarily assigns a value to a certain variable and then reads that value. If the value of the variable is rewritten by another processor without appropriate exclusive control between the assignment of the value to the variable and the reading of the value from the variable, an abnormality occurs in the processing of the processor There is.
  • Such inconveniences due to the lack of exclusive control depend on the instruction execution timing in each processor, so the recall rate may be low, and it is often difficult to identify the cause in debugging work.
  • a simulation method has been proposed in which a hardware model such as a virtual processor or virtual memory is built on a simulator as software, and a parallel program is executed on the simulator.
  • a virtual memory monitor collects information about access to the memory from each processor. Then, the memory monitor identifies the memory area accessed by the plurality of processors in an overlapping manner based on the collected information.
  • a data processing device has been proposed in which a memory monitoring circuit as hardware is provided on a bus to which a processor and a memory are connected.
  • This memory monitoring circuit monitors access to the memory in a predetermined address range designated by the user.
  • the memory monitoring circuit has a data write counter and a data read counter, and counts the number of times data is written to and read from an area in a predetermined address range.
  • the counter value is output from the memory monitoring circuit to the analysis logic.
  • an object of the present invention is to provide a software debugging method, an information processing apparatus, and a program that make it easy to determine whether or not exclusive control for a memory is defective.
  • a software debugging method executed by a computer including a plurality of processors Each of the first and second processors executes instructions included in the software to be debugged using control software that controls execution of the instructions.
  • the first processor executes a first instruction indicating data writing or data reference to the memory
  • the first processor generates first history information according to the first instruction.
  • the second processor executes a second instruction indicating data writing to the memory
  • the second processor generates second history information according to the second instruction.
  • the first processor acquires the second history information, and determines the lack of exclusive control for the area on the memory based on the first and second history information.
  • control software that controls the execution of the instructions, the first and second processors that execute the instructions included in the software to be debugged, and the memory that is accessed from the first and second processors Is provided.
  • the first processor executes a first instruction indicating data writing or data reference to the memory
  • the first processor generates first history information corresponding to the first instruction.
  • the second processor executes a second instruction indicating data writing to the memory
  • the second processor generates second history information corresponding to the second instruction.
  • the first processor acquires the second history information, and determines the lack of exclusive control for the area on the memory based on the first and second history information.
  • a program for causing a computer including a plurality of processors to execute the following processing is provided.
  • control is performed so that instructions included in the software to be debugged are executed.
  • first history information corresponding to the first instruction is generated.
  • second history information corresponding to the second instruction is generated.
  • the second history information is acquired, and based on the first and second history information, it is determined whether the exclusive control for the area on the memory is insufficient.
  • FIG. 11 is a block diagram illustrating a hardware example of an information processing apparatus. It is a figure which shows the hierarchy example of software. It is a figure which shows the example of the exclusive control defect at the time of data writing. It is a sequence diagram which shows the detection example of the exclusive control defect at the time of data writing. It is a figure which shows the example of determination of the presence or absence of exclusive control defect. It is a block diagram which shows the function example of information processing apparatus. It is a figure which shows the example of whole structure of the control information of 2nd Embodiment. It is a figure which shows the data structure example of the management information of 2nd Embodiment.
  • FIG. 1 is a diagram illustrating the information processing apparatus according to the first embodiment.
  • the information processing apparatus 10 can execute software that performs parallel processing using a plurality of processors as debug target software.
  • This software may include a system program such as an OS (Operating System) or a device driver, or may include a user program that operates on the system program.
  • OS Operating System
  • device driver or may include a user program that operates on the system program.
  • the information processing apparatus 10 includes processors 11 and 12 and a memory 13.
  • the processors 11 and 12 use the memory 13 to execute various instructions such as arithmetic operation instructions, logical operation instructions, comparison instructions, branch instructions, and data transfer instructions.
  • Each of the processors 11 and 12 may be a processor package such as a CPU (Central Processing Unit) or a processor core in the processor package.
  • the memory 13 is a shared memory accessed from the processors 11 and 12, and is, for example, a RAM (Random Access Memory).
  • each of the processors 11 and 12 executes an instruction included in the software to be debugged using the control software 14 that controls the execution of the instruction.
  • the control software 14 is called an emulator, for example.
  • the emulator converts the former instruction set into the latter instruction set when the instruction set used by the software to be debugged is different from the instruction set interpretable by the processors 11 and 12. It can also be said that the emulator absorbs the difference in instruction set between hardware and software.
  • the control software 14 is provided with a function for determining deficiencies in exclusive control over an area on the memory 13 in order to support debugging work. If a lock is not properly acquired when a certain area on the memory 13 is used, the processors 11 and 12 access the area having the same memory address at the same time, and the data used in the processor 11 is intended by the processor 12. It may be destroyed. As a case where a defect occurs due to inadequate exclusive control, for example, there is a case where the processor 11 and the processor 12 write data to the same area at the same time. As another case where a failure occurs, for example, the processor 12 rewrites data in one of the blocks while the processor 11 is referring to data across a plurality of blocks on the memory 13. There are cases.
  • the processors 11 and 12 perform the following processing according to the control of the control software 14 while executing the software to be debugged.
  • the processor 11 generates the history information 17 corresponding to the instruction 15 when executing the instruction 15 that involves writing or referring to the memory 13 among the instructions included in the software to be debugged.
  • An example of an instruction involving data writing is a store instruction, and an example of an instruction involving data reference is a comparison instruction using data on the memory 13.
  • the history information 17 may include address information indicating an area of the memory 13 to be accessed.
  • the history information 17 may include identification information of the program module to which the instruction 15 belongs.
  • the generated history information 17 is stored in an area for the processor 11 provided in advance on the memory 13, for example.
  • the processor 12 generates history information 18 corresponding to the instruction 16 when executing the instruction 16 accompanied by data writing to the memory 13 among the instructions included in the debug target software.
  • the history information 18 may include address information indicating an area of the memory 13 to be accessed.
  • the history information 18 may include identification information of a program module to which the instruction 16 belongs.
  • the generated history information 18 is stored, for example, in at least one of an area for the processor 11 and an area for the processor 12 provided in advance on the memory 13.
  • the processor 11 collects the history information 18 generated by the processor 12, and determines whether or not the debug target software is deficient in exclusive control based on the generated history information 17 and the collected history information 18.
  • the history information 17 and 18 is collected, for example, in an area for the processor 11 provided in advance on the memory 13. For example, the processor 11 compares the address indicated by the history information 17 with the address indicated by the history information 18 and determines that there is a defect in exclusive control when the history information 17 and 18 indicate the same or close addresses.
  • the processor 11 may generate log information indicating the determination result.
  • This log information may include identification information of the program module to which the instruction 15 belongs and identification information of the program module to which the instruction 16 belongs. Thereby, it becomes easy to specify the position in the program module that causes a problem in the debugging work.
  • the log information is stored in the memory 13 according to the control software 14, for example.
  • the log information may be written to a non-volatile storage device different from the memory 13.
  • the processor 11 may divide the time when the debug target software is executed into a plurality of sections, compare history information belonging to the same section, and not compare history information belonging to different sections. This interval may be a periodic interval determined based on the elapsed time or the number of instructions executed. Further, the processor 11 determines that the section has changed when the lock acquisition instruction or the lock release instruction is executed, when the program module to be executed is switched, or when the operation mode of the program module being executed is changed. May be. Thereby, the accuracy of the determination result of the program module that causes the malfunction can be improved.
  • the processors 11 and 12 execute the instructions of the software to be debugged using the control software 14, and the instructions executed under the control of the control software 14 Collects history information about the and determines the lack of exclusive control. This eliminates the need for special hardware and simulation environments, and allows exclusive control of debug target software using a production system that runs the debug target software or a system with the same hardware configuration as the production environment. It becomes possible to determine deficiencies.
  • the information processing apparatus detects that data writing from two or more CPUs to the RAM has collided due to lack of exclusive control.
  • FIG. 2 is a block diagram illustrating a hardware example of the information processing apparatus.
  • the information processing apparatus 100 includes CPUs 111 to 114 and a RAM 115.
  • the CPUs 111 to 114 and the RAM 115 are connected to the system bus 116.
  • the information processing apparatus 100 also includes an HDD (Hard Disk Drive) 121, an image signal processing unit 122, an input signal processing unit 123, a medium reader 124, and a communication interface 125.
  • the HDD 121, the image signal processing unit 122, the input signal processing unit 123, the medium reader 124 and the communication interface 125 are connected to the input / output bus 126.
  • the system bus 116 and the input / output bus 126 are connected by, for example, a bridge (not shown).
  • the CPUs 111 to 114 are processors that execute programs.
  • the CPUs 111 to 114 load at least a part of programs and data from the HDD 121 to the RAM 115 and execute the programs using the RAM 115.
  • the CPUs 111 to 114 can execute the program physically in parallel.
  • Each of the CPUs 111 to 114 may have a plurality of processor cores and may have one or more cache memories. In the second embodiment, a case where a plurality of CPUs execute a program in parallel will be described, but the present invention can also be applied to a case where a plurality of processor cores execute a program in parallel.
  • the RAM 115 is a volatile memory that temporarily stores programs and data. It can be said that the RAM 115 is a shared memory accessed from the CPUs 111 to 114 via the high-speed system bus 116. Note that the information processing apparatus 100 may include a volatile memory of a type other than the RAM 115, or may include a plurality of memories.
  • the HDD 121 is a non-volatile storage device that stores software programs such as OS programs, driver programs, and user programs, and data.
  • the information processing apparatus 100 may include other types of storage devices such as a flash memory and an SSD (Solid State Drive), and may include a plurality of nonvolatile storage devices.
  • the image signal processing unit 122 outputs an image to the display 101 connected to the information processing apparatus 100 in accordance with an instruction from any of the CPUs.
  • a CRT (Cathode Ray Tube) display a liquid crystal display (LCD), a plasma display (PDP: Plasma Display Panel), an organic EL (OEL: Organic Electro-Luminescence) display, or the like can be used. .
  • the input signal processing unit 123 acquires an input signal from the input device 102 connected to the information processing apparatus 100 and outputs it to any CPU.
  • the input device 102 a mouse, a touch panel, a touch pad, a pointing device such as a trackball, a keyboard, a remote controller, a button switch, or the like can be used.
  • a plurality of types of input devices may be connected to the input signal processing unit 123.
  • the medium reader 124 is a drive device that reads a program and data recorded on the recording medium 103.
  • a magnetic disk such as a flexible disk (FD: Flexible Disk) or HDD
  • an optical disk such as a CD (Compact Disk) or a DVD (Digital Versatile Disk)
  • a magneto-optical disk MO: Magneto-Optical disk
  • a semiconductor memory or the like can be used.
  • the medium reader 124 stores a program or data read from the recording medium 103 in the RAM 115 or the HDD 121.
  • the communication interface 125 is an interface that is connected to the network 104 and communicates with other information processing apparatuses via the network 104.
  • the communication interface 125 may be a wired communication interface connected to a communication device such as a switch or a router with a cable, or may be a wireless communication interface connected to a base station wirelessly.
  • the information processing apparatus 100 may be a client computer or a server computer.
  • the information processing apparatus 100 may not include the medium reader 124. Further, when the information processing apparatus 100 can be controlled from the terminal apparatus operated by the user via the network 104, the information processing apparatus 100 may not include the image signal processing unit 122 and the input signal processing unit 123. Further, the display 101 and the input device 102 may be formed integrally with the housing of the information processing apparatus 100.
  • the CPUs 111 and 112 are examples of the processors 11 and 12 in the first embodiment described above.
  • the RAM 115 is an example of the memory 13 in the first embodiment described above.
  • FIG. 3 is a diagram illustrating an example of the software hierarchy.
  • the software executed by the information processing apparatus 100 includes a user program, a system program, and an instruction emulator.
  • the user program uses a function of a system program such as an application program.
  • the system program controls execution of one or more user programs such as an OS program and a driver program.
  • the instruction emulator makes the system program executable on the CPUs 111 to 114 by converting the instructions when the instruction set used by the system program is different from the instruction sets of the CPUs 111 to 114.
  • the instruction emulator is installed in the information processing apparatus 100 together with the OS program.
  • the user program may call a function of the OS kernel by a supervisor call (system call).
  • system call When the function of the OS kernel is called, the operation mode of the CPU is changed, and control is transferred from the user program to the OS. When the requested OS processing is completed, control is returned from the OS to the user program. Also, switching can occur between user programs and system programs as well as between user programs. The switching of the user program occurs, for example, by calling another user program, returning from the called user program, timer interruption, or the like.
  • an instruction emulator When an instruction of a program (including a user program or a system program) is executed, an instruction emulator converts the program instruction into an instruction set instruction that can be interpreted by the CPU. Thereby, for example, an old OS can be executed using a new CPU.
  • the instruction emulator reads program instructions, converts the read instructions, and causes the CPU to execute them.
  • the CPUs 111 to 114 can execute programs and instruction emulators in parallel.
  • a function for detecting the collision of data writing to the RAM 115 due to the lack of exclusive control is implemented in the instruction emulator.
  • FIG. 4 is a diagram showing an example of incomplete control during data writing.
  • programs A, B, C, and D For example, programs A and B are user programs, and program C is an OS program.
  • the programs A, B, and C are executed by the CPU 111, and the program D is executed by the CPU 112.
  • Program A calls program B by a call instruction.
  • Program B calls program C with a supervisor call instruction (SVC instruction).
  • SVC instruction supervisor call instruction
  • the program C updates the lock word stored in the block # 1 of the RAM 115 by a test and set instruction (TS instruction).
  • the lock word is a set of flags indicating whether or not the lock on the area on the RAM 115 has been acquired. By updating the flag corresponding to the block # 2 from OFF to ON, the program C has acquired the lock of the block # 2 (ST11).
  • the program D When the program D tries to acquire the lock of the block # 2 by the TS instruction, if the lock has already been acquired by the program C (if the flag is ON), the TS instruction of the program D fails (ST12). ). Then, the program D continuously checks the lock word stored in the block # 1 (for example, periodically) until the lock of the block # 2 is released (the flag corresponding to the block # 2 is turned OFF). I will wait). Such a method of exclusive control is sometimes called spin lock.
  • the program C that acquired the lock of the block # 2 writes data to the block # 2 by a store instruction (STR instruction) (ST13).
  • STR instruction store instruction
  • the program C updates the lock word stored in the block # 1 by the STR instruction.
  • the program C has released the lock of the block # 2 (ST14).
  • the program D updates the lock word stored in the block # 1 by the TS instruction and acquires the lock of the block # 2 (ST15).
  • the program D that acquired the lock of the block # 2 writes data in the block # 2 as in the case of the program C (ST16).
  • the program D updates the lock word stored in the block # 1 by the STR instruction and releases the lock of the block # 2 (ST17). Even if data writing to the same area continues, it can be said that the data writing is normal as long as the exclusive control is normally performed.
  • FIG. 5 is a sequence diagram illustrating an example of detection of inadequate exclusive control during data writing.
  • the CPU 111 confirms whether data writing has collided with the CPU 112.
  • the CPU 111 checks whether data writing has collided with other CPUs (CPUs 113 and 114) as with the CPU 112. Further, CPUs other than the CPU 111 also check whether data writing has collided in the same manner as the CPU 111.
  • a control area corresponding to each CPU is prepared in the RAM 115.
  • address information indicating an area where the CPU 111 has written data and address information collected from the CPUs 112 to 114 are stored.
  • a request flag indicating whether to request the CPUs 112 to 114 to collect address information is stored. Similar information is also stored in the control area for the CPU 112.
  • the CPU 111 turns on the request flag stored in the control area for the CPU 111 (ST20).
  • the CPU 111 When the STR instruction is executed by the CPU 111 using the instruction emulator, the CPU 111 generates address information indicating the access destination area and stores it in the control area for the CPU 111 (ST21). Further, when the STR instruction is executed by the CPU 112 using the instruction emulator, the CPU 112 generates address information indicating the access destination area and stores it in the control area for the CPU 112 (ST22). At this time, the CPU 112 checks the request flag of the CPU 111, and when the request flag is ON, copies the generated address information to the control area for the CPU 111 (ST23).
  • the CPU 111 executes the STR instruction
  • the CPU 111 generates address information and stores it in the control area for the CPU 111 (ST24).
  • the CPU 112 generates address information and stores it in the control area for the CPU 112 (ST25). Further, the CPU 112 confirms that the request flag is ON, and copies the address information to the control area for the CPU 111 (ST26).
  • the CPU 111 turns off the request flag stored in the control area for the CPU 111 and stops collecting address information from the CPU 112. Then, the CPU 111 uses the address information collected in the control area for the CPU 111 to determine whether the CPU 111 and the CPU 112 have performed data writing in the same or close area within the latest one section (data writing). Check if there was a collision. That is, CPU 111 checks whether the address indicated by the address information of CPU 111 and the address indicated by the address information of CPU 112 overlap or are close to each other (ST27).
  • the CPU 111 determines that at least one of the program being executed by the CPU 111 and the program being executed by the CPU 112 is deficient in exclusive control. On the other hand, when a data write collision is not detected, the CPU 111 determines that there is no deficiency in exclusive control for an instruction executed in the latest one section. In the example of no exclusive control deficiency in FIG. 5, it is determined that there is no deficiency in exclusive control for the latest one section. The most recent section is a section from when the request flag is turned on last time until the request flag is turned off (until a predetermined condition described later is satisfied). The CPU 111 may discard the collected address information after determining whether or not the exclusive control is deficient.
  • the CPU 111 turns on the request flag stored in the control area for the CPU 111, and resumes collecting address information from the CPU 112 (ST28).
  • the CPU 111 appropriately generates address information and stores it in the control area for the CPU 111.
  • the CPU 112 generates address information as appropriate and stores it in the control area for the CPU 112, and copies it to the control area for the CPU 111.
  • the CPU 111 turns off the request flag stored in the control area for the CPU 111 and stops collecting address information from the PU 112. Then, the CPU 111 determines whether or not the exclusive control is deficient by using the address information collected in the control area for the CPU 111. In the example of lack of exclusive control in FIG. 5, it is determined here that there is a lack of exclusive control (ST29). If it is determined that there is a lack of exclusive control, the CPU 111 generates log information including program information for specifying the program executed by the CPUs 111 and 112 and outputs the log information to the HDD 121 as a log file.
  • the CPU 111 determines deficiency of exclusive control by comparing the address information collected in one section.
  • the timing for determining the deficiency of exclusive control that is, the timing for dividing the section is when any of the following six conditions is satisfied.
  • the first condition is that switching between user programs has occurred due to a call to another user program, a return from the called user program, a timer interrupt, or the like.
  • the second condition is that switching between the user program and the system program has occurred due to an SVC instruction or the like.
  • the third condition is that a lock has been acquired for the RAM 115 area.
  • the fourth condition is that the lock has been released.
  • the fifth condition is that switching of the operation mode of the program being executed has occurred.
  • the operation mode includes a mode for prohibiting an interrupt from the input / output device and a timer interrupt and a mode for prohibiting the interrupt.
  • the sixth condition is that a predetermined number of instructions have been executed since the failure of exclusive control was determined last time (after the request flag was turned ON).
  • FIG. 6 is a diagram illustrating an example of determining whether there is a lack of exclusive control.
  • determining the lack of exclusive control in the second embodiment, a write bit map indicating whether or not data is written to each block of the RAM 115 is used.
  • the bit corresponding to the block in which data was written in the most recent section (for the block, see the description related to FIG. 14 described later) is set to 1 and corresponds to the block in which no data was written
  • the bit to be set is set to 0.
  • the CPU 111 obtains the logical product (AND) of the write bitmap generated by the CPU 111 and the write bitmap generated by the CPU 112.
  • the bit map as the logical product the bit corresponding to the block in which the data has been written from both the CPUs 111 and 112 becomes 1, and the bits corresponding to the other blocks become 0. If all the bits of the logical product are 0, the CPUs 111 and 112 have not written data to the same block.
  • the CPU 111 generates a write bit map indicating the block accessed by the TS instruction as the lock acquisition instruction.
  • the CPU 111 obtains an exclusive OR (XOR) of the bitmap as the logical product and the write bitmap for exclusive control.
  • XOR exclusive OR
  • the bit map as the exclusive OR the bit corresponding to the block in which the data that is not the lock word is written from both of the CPUs 111 and 112 becomes 1, and the bits corresponding to the other blocks become 0. Even if there is 1 bit in the bit map as the logical product, if all the bits of the exclusive logical sum are 0, the CPUs 111 and 112 write data to the same block corresponding to the lack of exclusive control. Will not go.
  • the CPU 111 similarly confirms whether data has been written to adjacent blocks. For example, the CPU 111 rewrites a predetermined number of bits before and after the bit set to 1 in the write bitmap of the CPU 111 to 1 and obtains a logical product with the write bitmap of the CPU 112. When there is 1 bit in the bit map as the logical product, the CPU 111 obtains an exclusive logical sum of the bit map as the logical product and the write bitmap for exclusive control.
  • FIG. 7 is a block diagram illustrating an example of functions of the information processing apparatus.
  • the information processing apparatus 100 includes an instruction determination unit 131, an instruction conversion unit 132, a control information storage unit 133, a log file storage unit 134, an activation unit 135, and a debug support unit 136.
  • the instruction determination unit 131, the instruction conversion unit 132, the activation unit 135, and the debug support unit 136 can be realized as software modules in the instruction emulator.
  • the processes of the instruction determination unit 131, the instruction conversion unit 132, and the debug support unit 136 are executed in parallel by a plurality of CPUs (CPUs 111 to 114).
  • CPUs 111 to 114 CPUs 111 to 114.
  • the control information storage unit 133 can be realized as an area secured in the RAM 115.
  • the log file storage unit 134 can be realized as a storage area secured in the HDD 121.
  • the instruction determination unit 131 determines the type of the read instruction.
  • the instruction type is a predetermined type, the instruction determination unit 131 passes the instruction to both the instruction conversion unit 132 and the debug support unit 136. If the instruction type is not a predetermined type, the instruction determination unit 131 passes the instruction to the instruction conversion unit 132.
  • a predetermined type of instruction a STR instruction used for data writing or lock release, a TS instruction used for lock acquisition, a call instruction used for calling a user program, and a system program Consider four types of SVC instructions used for calls.
  • the instruction conversion unit 132 converts the instruction passed from the instruction determination unit 131 into an instruction interpretable by the CPU 111 and causes the CPU 111 to execute the instruction.
  • the instruction conversion unit 132 notifies the debug support unit 136 of the execution result of the instruction.
  • the instruction conversion unit 132 notifies the debug support unit 136 of the success or failure of the lock acquisition when the TS instruction is executed.
  • the control information storage unit 133 stores control information used for determination of incompleteness of exclusive control.
  • the area of the control information storage unit 133 is secured on the RAM 115 by the activation unit 135 when the debug support unit 136 is activated.
  • the control information storage unit 133 is commonly accessible from the CPUs 111 to 114. However, areas for collecting address information and program information are provided in the control information storage unit 133 for each CPU.
  • the log file storage unit 134 stores a log file.
  • information (address information, program information, etc.) about the data write that has become a problem when a data write collision corresponding to the lack of exclusive control is detected is written as log information.
  • the user of the information processing apparatus 100 can easily identify a program that lacks exclusive control by analyzing the log information described in the log file during debugging, and corrects the program so that no malfunction occurs. Easy to do.
  • the activation unit 135 receives a debug start command and a debug end command from the user. When a command to start debugging is input, the activation unit 135 secures an area for the control information storage unit 133 in the RAM 115 and activates the debug support unit 136 so as to determine the lack of exclusive control. When a debug end command is input, the activation unit 135 stops the debug support unit 136 and releases the area of the control information storage unit 133.
  • the debug support unit 136 monitors the instruction read by the instruction determination unit 131, and determines the lack of exclusive control of the program executed by the CPUs 111 to 114.
  • the debug support unit 136 includes an information collection unit 137, an information provision unit 138, and a detection unit 139.
  • the information collection unit 137 collects information used by the CPU 111 to determine whether the exclusive control is defective.
  • the information collection unit 137 When the CPU 111 executes the STR instruction, the information collection unit 137 generates address information, program information, and the like related to the STR instruction and stores them in the control information storage unit 133.
  • the information collection unit 137 when the CPU 111 executes a TS command, the information collection unit 137 generates address information and the like related to the TS command and stores them in the control information storage unit 133. Further, the information collecting unit 137 collects address information, program information, and the like regarding the STR command from the CPUs 112 to 114 by turning on the request flag of the CPU 111.
  • the information providing unit 138 provides the CPUs 112 to 114 with information used by the CPUs 112 to 114 for determining whether the exclusive control is insufficient.
  • the information providing unit 138 checks the request flags of the CPUs 112 to 114 when the CPU 111 executes the STR command. If the request flag is ON, the information providing unit 138 provides the CPU 112 to 114 with address information and program information related to the STR command generated by the information collecting unit 137. Specifically, the information providing unit 138 copies the generated address information, program information, and the like to an area corresponding to the CPUs 112 to 114 in the control information storage unit 133.
  • the detection unit 139 determines the lack of exclusive control using information collected in the area corresponding to the CPU 111 in the control information storage unit 133 at the timing when the predetermined condition as described above is satisfied.
  • the predetermined condition is, for example, that the CPU 111 executes a call instruction or SVC instruction or the like to switch programs, that the TS instruction has successfully acquired the lock, that the lock is released, or that the previous determination is performed.
  • the CPU 111 has executed a predetermined number of instructions since then.
  • the information collection unit 137 may generate information regarding the instruction before the execution of the instruction is completed, or may generate information regarding the instruction after the execution of the instruction is completed. The same applies to the timing at which the information providing unit 138 copies the generated information.
  • the detection unit 139 may start the determination before the execution of the instruction is completed, The determination may be started after execution of the instruction is completed.
  • the detection unit 139 may start the determination before the execution of the last instruction is completed, or the execution of the last instruction is completed The determination may be started after that.
  • FIG. 8 is a diagram illustrating an example of the overall structure of the control information according to the second embodiment.
  • the control information storage unit 133 stores control information having a structure as shown in FIG.
  • the control information includes management information 141, a plurality of first pointer tables including a pointer table 142, and a plurality of collection areas including a collection area 143 in order to manage other CPU information.
  • the control information includes a pointer table 151 (second pointer table), a plurality of general recording areas including a general recording area 152, a plurality of exclusive recording areas including an exclusive recording area 153, in order to manage the own CPU information. It has a plurality of exclusion management information including exclusion management information 154 and a plurality of work areas including a work area 155.
  • the control information includes log management information 156 and a log recording area 157 for managing log information.
  • Management information 141 indicates the state of the entire information processing apparatus 100 and the states of the CPUs 111 to 114.
  • the first pointer table is provided corresponding to the CPUs 111 to 114.
  • One first pointer table indicates one “own CPU”.
  • the first pointer table can be traced from the management information 141.
  • Information collected from other CPUs is stored in the collection area.
  • the collection area is provided for each combination of “own CPU” and “other CPU”. Three collection areas corresponding to “other CPUs” can be traced from the first pointer table corresponding to one “own CPU”. For example, the collection area corresponding to the CPUs 112 to 114 can be traced from the first pointer table corresponding to the CPU 111.
  • the pointer table 151 includes information indicating the lock acquisition status of each of the CPUs 111 to 114.
  • the general recording area stores address information, program information, and the like related to the STR instruction executed by the CPU.
  • address information related to a TS command executed by the CPU is stored.
  • the exclusive management information includes the address of the lock word updated when the lock is acquired.
  • the address of the lock word is used to determine whether the STR instruction indicates a lock release.
  • the work area temporarily stores information generated by its own CPU.
  • the general recording area, exclusive recording area, exclusive management information, and work area are provided corresponding to the CPUs 111 to 114 and can be traced from the pointer table 151.
  • the log management information 156 includes information for managing the log recording area 157.
  • the log recording area 157 stores log information generated by the detection unit 139 when it is determined that there is a lack of exclusive control.
  • the log information stored in the log recording area 157 is written to a log file (on the HDD 121) stored in the log file storage unit 134.
  • FIG. 9 illustrates an example data structure of management information according to the second embodiment.
  • the management information 141 has items of system status, lock word, and target program in the header. Also, the management information 141 includes items of CPU status and pointer table address for each of the CPUs 111 to 114.
  • the item of system status includes a debug start flag.
  • the debug start flag indicates whether or not the debug support unit 136 is operating.
  • the debug start flag 0 (OFF) indicates that the debug support unit 136 is stopped and the lack of exclusive control is not determined.
  • the item of the lock word includes a lock word used for exclusive control of access to the management information 141.
  • the item of the target program includes identification information of a program to be debugged (a program for determining deficiencies in exclusive control).
  • the target program can also be specified by the user, for example. By limiting the target program, the load on the information processing apparatus 100 can be reduced.
  • the CPU status item includes a request flag.
  • the request flag indicates whether a certain CPU requests information collection from another CPU.
  • the item of the address of the pointer table is the head address of the area of the RAM 115 where the first pointer table exists.
  • FIG. 10 is a diagram illustrating a data structure example of the first pointer table.
  • the pointer table 142 includes items of an area state, a lock word, and a collection area address for each “other CPU” (for example, each of the CPUs 112 to 114).
  • the area state item includes a use flag.
  • the use flag indicates whether or not the collection area is used, that is, whether or not information collected from another CPU exists.
  • Use flag 0 (OFF) indicates that the collected information does not exist.
  • the lock word item is used for exclusive control of access to the pointer table 142.
  • the collection area address item is the start address of the collection area on the RAM 115.
  • FIG. 11 is a diagram illustrating an example of the data structure of the collection area.
  • the collection area 143 includes a collection area header 144, a plurality of aggregation areas including the aggregation area 145, and a plurality of additional recording areas including the additional recording area 147.
  • the collection area header 144 indicates the state of the aggregation area set. Each total area includes a write bit map indicating a block in which data is written on the RAM 115. One total area corresponds to one address range of the RAM 115. The size of the address range handled by one aggregation area is set in advance. When data is written to areas belonging to different address ranges within one section for determining the lack of exclusive control, a plurality of total areas are used. The plurality of total areas are formed as a linked list. From the collection area header 144, it is possible to trace the head total area and the last total area.
  • a plurality of additional write areas are provided for one total area.
  • Each additional recording area includes address information other than the write bitmap, program information, time information, and the like.
  • One additional recording area corresponds to one data writing.
  • a plurality of additional write areas corresponding to one total area are formed as a linked list. From the total area, the head additional area can be traced.
  • FIG. 12 is a diagram illustrating an example of the data structure of the collection area header.
  • the collection area header 144 includes items of an area state, an address of the first aggregation area, and an address of the last aggregation area.
  • the area state item includes a use flag.
  • the use flag indicates whether or not at least one total area is used.
  • the item of the address of the first total area is the start address of the first total area on the RAM 115.
  • the item of the address of the last counting area is the head address of the last counting area.
  • FIG. 13 is a diagram illustrating an example of the data structure of the total area.
  • the total area 145 includes items of the address of the next total area, the area state, the memory address corresponding to the write bitmap, the address of the first additional area, and the address of the last additional area in the header.
  • the total area 145 includes a write bitmap 146.
  • the item of the next aggregation area address includes the start address of the next aggregation area on the RAM 115.
  • the area state item includes a tail flag and a use flag.
  • the end flag indicates whether or not the total area 145 is the end of the linked list.
  • the use flag indicates whether or not the total area 145 is used.
  • the item of the memory address corresponding to the write bitmap includes the start address of the address range of the RAM 115 that the write bitmap 146 is responsible for.
  • the item of the address of the first additional recording area includes the first address of the first additional recording area among the plurality of additional recording areas on the RAM 115 corresponding to the total area 145.
  • the item of the address of the tail additional recording area is the head address of the tail additional recording area among the plurality of additional recording areas on the RAM 115 corresponding to the total area 145.
  • FIG. 14 is a diagram illustrating a data structure example of a write bitmap.
  • a block is a minimum unit of an area accessed by the CPUs 111 to 114, and is, for example, a 4-byte area.
  • FIG. 15 is a diagram illustrating a data structure example of the additional recording area.
  • the additional recording area 147 includes items of an area state, an address of the next additional recording area, a memory address where writing is performed, a base address, program information, a writing time, and a CPU number.
  • the area status item includes a tail flag and a use flag.
  • the end flag indicates whether or not the additional write area 147 is the end in the linked list of additional write areas for one total area.
  • the end flag can be expressed by 1 bit.
  • the use flag indicates whether or not the additional recording area 147 is used.
  • the use flag can be expressed by 1 bit.
  • the meaning of ON / OFF of the tail flag and the use flag is the same as that in the above-described total area 145.
  • the item of the address of the next write-once area is the head address of the next write-once area on the RAM 115.
  • the item of the memory address where the data has been written is the head address of the area where the data has been written.
  • the base address item includes a base address at the time of data writing, that is, an address serving as a starting point for specifying an access destination area.
  • the base address is stored in a base register included in each CPU. As the base register, one or two or more of a plurality of registers included in each CPU is used.
  • the base address is information useful for analyzing the cause of the inappropriate access destination area.
  • the item of program information includes information for specifying a program being executed at the time of data writing in the CPU that has performed data writing.
  • program information for example, a program status word (PSW: Program Status Word) can be used.
  • PSW includes an instruction address indicating an instruction to be executed next and various control flags for controlling instruction execution by the CPU.
  • the item of writing time includes the time when data writing is performed.
  • the CPU number includes an identification number for identifying the CPU that has performed data writing. It is assumed that an identification number is assigned to each of the CPUs 111 to 114 in advance.
  • FIG. 16 is a diagram illustrating a data structure example of the second pointer table.
  • the pointer table 151 includes items of a general recording area address, an exclusive recording area address, a lock state, a lock acquisition number, an instruction counter, an exclusive management information address, and a work area address for each of the CPUs 111 to 114.
  • the address item of the general recording area includes the head address of the general recording area for the CPU (for example, the general recording area 152).
  • the item of the address of the exclusive recording area includes the head address of the exclusive recording area for the CPU (for example, the exclusive recording area 153).
  • the item of lock state includes a lock acquisition flag.
  • the lock acquisition flag indicates whether or not the CPU is currently acquiring a lock for at least one area of the RAM 115.
  • the item of the number of lock acquisition includes the number of locks acquired by the CPU. If the lock acquisition flag is ON, the number of lock acquisitions is 1 or more.
  • the item of the instruction counter includes the number of instructions executed by the CPU since the last time the lack of exclusive control was determined.
  • the instruction counter is counted up every time the CPU executes an instruction, and is reset to 0 every time the CPU determines that the exclusive control is deficient.
  • the item of the exclusive management information address includes the head address of the area of the RAM 115 in which the exclusive management information for the CPU (for example, the exclusive management information 154) is stored.
  • the item of the work area address includes the head address of the work area for the CPU (for example, the work area 155).
  • FIG. 17 is a diagram illustrating an exemplary data structure of log management information.
  • the log management information 156 includes items of a lock word, the size of log information, the entire size of the log recording area, the address of the first log information, and the address of the last log information.
  • the item of lock word includes a lock word used for exclusive control of access to the log management information 156.
  • the log information size item indicates the amount of log information (for example, the number of bytes) currently stored in the log recording area 157.
  • the item of the overall size of the log recording area indicates the size (for example, the number of bytes) of the log recording area 157 including both the used area and the free area.
  • the address of the first log information includes the first address of the first log information (the first added information) stored in the log recording area 157.
  • the address of the tail log information includes the head address of the tail log information (added last) stored in the log recording area 157.
  • FIG. 18 is a diagram illustrating a data structure example of log information according to the second embodiment.
  • the log recording area 157 can store one unit or two or more units of log information with the log information 158 as shown in FIG. 18 as one unit. Two or more units of log information are stored as a linked list, for example.
  • the log information 158 has an item of detection time.
  • the log information 158 includes items of a memory address, a base address, program information, and a writing time at which writing has been performed with respect to “other CPU”.
  • self CPU includes items of a memory address, a base address, and program information for which writing has been performed.
  • the item of the detection time includes a time when the own CPU detects a lack of exclusive control.
  • the item of the other CPU number includes the identification number of the other CPU that performed the data writing that collides with the own CPU.
  • the item of the memory address to which the writing has been performed includes the head address of the area of the RAM 115 where the other CPU has written the data.
  • the item of the base address includes the value of the base register of the other CPU when the other CPU performs data writing.
  • the item of program information includes information (for example, PSW) for specifying a program executed by the other CPU when the other CPU performs data writing.
  • the item of the writing time includes the time when the other CPU performs data writing. As information related to the other CPU, as shown in FIG. 15, information stored in the additional write area in the collection area corresponding to the other CPU can be used.
  • the item of own CPU number includes the identification number of the own CPU.
  • the item of the memory address to which writing has been performed includes the head address of the area of the RAM 115 where the CPU has written data.
  • the item of the base address includes the value of the base register of the own CPU at the time when the own CPU has written data.
  • the item of program information includes information (for example, PSW) for specifying a program executed by the CPU at the time when the CPU has written data.
  • information regarding the own CPU information stored in the additional recording area in the general recording area corresponding to the own CPU can be used.
  • the general recording area 152 can be realized by the same data structure as the collection area 143. That is, the general recording area 152 includes a collection area header, a plurality of total areas, and a plurality of additional areas. Similar to the collection area 143, the exclusive recording area 153 has a collection area header and a plurality of total areas. However, the exclusive recording area 153 does not need to have an additional recording area.
  • the exclusive management information 154 includes the address of the lock word (the lock word updated when the lock is acquired) regarding the currently acquired lock. When the lock acquisition number is 2 or more, for example, addresses of a plurality of lock words are stored as a linked list.
  • FIG. 19 is a flowchart illustrating a procedure example of the start process and the stop process.
  • the activation unit 135 receives a command to start debugging.
  • the debug start command indicates that the information processing apparatus 100 is caused to operate in a debug mode (a mode in which log information with insufficient exclusive control is output) by activating the debug support unit 136.
  • the debug start command is input by the user using the input device 102, for example.
  • the activation unit 135 determines whether the information processing apparatus 100 is already operating in the debug mode, that is, whether the debug support unit 136 is activated. If it is already in the debug mode, the process ends. If it is not in the debug mode, the process proceeds to step S112.
  • the activation unit 135 secures an area for the control information storage unit 133 in the RAM 115, and initializes the area so that the control information having the structure shown in FIG. 8 is stored.
  • the information collection unit 137 changes the request flags of the CPUs 111 to 114 included in the management information 141 from OFF to ON. As a result, each of the CPUs 114 to 114 starts collecting information relating to the STR instruction executed by the other CPU. Then, the process of the activation unit 135 according to the debug start command ends.
  • the activation unit 135 receives a command to end debugging.
  • the debug end command indicates that the information processing apparatus 100 is caused to operate in a non-debug mode (a mode in which log information lacking exclusive control is not output) by stopping the debug support unit 136.
  • the command to end debugging is input by the user using the input device 102, for example.
  • the activation unit 135 releases an area for the control information storage unit 133. Then, the process of the activation unit 135 corresponding to the debug end command ends.
  • the activation unit 135 may be operated by any one of the CPUs 111 to 114 (for example, a predetermined CPU that accepts user input).
  • the instruction determination unit 131, the instruction conversion unit 132, and the debug support unit 136 operate on the CPUs 111 to 114, respectively. In the following, debugging support will be described with the “self CPU” as the CPU 111.
  • FIG. 20 is a flowchart illustrating a procedure example of debugging support at the time of data writing.
  • the instruction determination unit 131 reads one instruction (for example, an instruction of a system program). The read instruction is converted into an instruction interpretable by the CPU 111 by the instruction conversion unit 132 and executed. The following processing after step S121 may be started before the execution of the instruction is completed, or may be started after the execution of the instruction is completed.
  • the instruction determination unit 131 determines whether the read instruction is a STR instruction (store instruction). If the read instruction is a STR instruction, the process proceeds to step S122, and if not, the process proceeds to step S125.
  • the information collecting unit 137 collects address information related to the STR instruction as data writing information of the CPU 111. Further, the information providing unit 138 provides the information of the CPU 111 to the CPUs 112 to 114. Details of address information collection will be described later.
  • the information collection unit 137 determines whether the read STR command is a command for releasing the acquired lock. Whether or not the STR instruction is intended to release the lock can be determined by whether or not the address of the access destination RAM 115 points to the lock word updated when the lock is acquired. Details of the lock release determination will be described later.
  • step S124 If it is determined that the read STR instruction is intended to release the lock, the process proceeds to step S129. Otherwise, the process proceeds to step S128.
  • step S125 The instruction determination unit 131 determines whether the read instruction is a TS instruction (test and set instruction). If the read instruction is a TS instruction, the process proceeds to step S126, and if not, the process proceeds to step S127.
  • step S126 When the TS command is executed and the lock acquisition is successful, the information collection unit 137 records address information indicating the position of the lock word updated by the TS command. The address information of the lock word is used when it is determined in step S123 whether the STR instruction is intended to release the lock. Then, the process proceeds to step S129.
  • the instruction determination unit 131 determines whether the read instruction is an instruction indicating program switching, such as a call instruction or an SVC instruction (supervisor call instruction). If the read instruction is an instruction indicating program switching, the process proceeds to step S129. If the read instruction is not an instruction indicating program switching, the process proceeds to step S128.
  • an instruction indicating program switching such as a call instruction or an SVC instruction (supervisor call instruction).
  • the information collection unit 137 determines whether the value of the instruction counter of the CPU 111 included in the pointer table 151 exceeds a threshold value. That is, the information collection unit 137 determines whether the number of instructions executed by the CPU 111 has exceeded the threshold after the information processing apparatus 100 enters the debug mode, or since the last time the lack of exclusive control was determined. If the value of the instruction counter exceeds the threshold value, the process proceeds to step S129. Otherwise, the process ends.
  • the detecting unit 139 detects a data write collision between the CPU 111 and the CPUs 112 to 114 based on the address information collected in the general recording area, the exclusive recording area, and the collection area corresponding to the CPU 111.
  • the detection unit 139 determines that at least one of the program executed by the CPU 111 and the program executed by the other CPU is defective in exclusive control. Log information including program information is output. Details of exclusive control deficiency detection will be described later.
  • the debug support unit 136 collects address information and program information for data writing performed by the CPUs 111 to 114. Then, the debug support unit 136 is incapable of exclusive control when any one of lock acquisition, lock release, switching between user programs, switching between user programs and system programs, and execution of a certain number of instructions occurs in the CPU 111. Determine. When a lack of exclusive control is detected, the debug support unit 136 outputs log information including information useful for identifying a program with a lack of exclusive control.
  • FIG. 21 is a flowchart illustrating an exemplary procedure for collecting address information. This address information collection is executed in step S122 described above. (S130)
  • the information collection unit 137 refers to the management information 141 and determines whether the program executed by the CPU 111 is a debug target. If the program is a debug target, the process proceeds to step S131. If the program is not a debug target, the process ends.
  • the information collection unit 137 calculates the address (absolute address) of the RAM 115 to which data is written, based on the STR command received from the command determination unit 131.
  • the information collection unit 137 stores the address calculated in step S131 in the work area corresponding to the CPU 111. Further, the information collection unit 137 checks the current value (current base address) of the base register included in the CPU 111 and program information (for example, current PSW) indicating the program being executed by the CPU 111, and stores it in the work area. .
  • the information collecting unit 137 generates a write bitmap as shown in FIG. 14 and stores it in a work area corresponding to the CPU 111. At this time, the information collection unit 137 sets the bit corresponding to the address calculated in step S131 to 1 and sets the other bits to 0.
  • the information collection unit 137 searches the general recording area corresponding to the CPU 111 for a total area where the write bitmap generated in step S133 matches the address range in charge.
  • the information collection unit 137 uses the total area if there is a corresponding total area, and acquires one unused total area if there is not. Then, the information collection unit 137 obtains a logical sum (OR) to synthesize the write bitmap stored in the work area with the write bitmap of the total area to be used. Further, the information collecting unit 137 acquires one unused additional recording area corresponding to the above-mentioned total area, and the additional address acquired from the work area, the write destination address, the base address, and the program information generated in step S132. Copy to area.
  • the information providing unit 138 identifies one of the CPUs 112 to 114 (one other CPU).
  • the information providing unit 138 refers to the management information 141 and determines whether the request flag of the identified other CPU is ON, that is, whether information collection is requested from the other CPU. If the request flag is ON, the process proceeds to step S136. If the request flag is OFF, the process proceeds to step S138.
  • the information providing unit 138 detects a collection area for collecting information of the CPU 111 among a plurality of collection areas corresponding to the identified other CPUs.
  • the information providing unit 138 copies the information in the work area of the CPU 111 to the collection area detected in step S136 by the same method as in step S134. That is, the information providing unit 138 searches for a total area in which the write bitmap generated in step S133 matches the address range in charge from the detected collection areas, and uses one total area.
  • the information providing unit 138 obtains a logical sum (OR), thereby synthesizing the write bitmap stored in the work area with the write bitmap of the totaling area to be used.
  • the information providing unit 138 acquires one unused additional write area corresponding to the above-described total area, and copies the write destination address, base address, and program information stored in the work area to the additional write area.
  • the information providing unit 138 determines whether all other CPUs (CPUs 112 to 114) have been confirmed. If all other CPUs have been confirmed, the process ends. If there is an unconfirmed other CPU, the process proceeds to step S135.
  • FIG. 22 is a flowchart illustrating an exemplary procedure for lock acquisition recording. This lock acquisition recording is executed in step S126 described above. (S140) The information collection unit 137 detects completion of the TS command.
  • the information collection unit 137 refers to the management information 141 to determine whether the program being executed by the CPU 111 is a debug target. If the program is to be debugged, the process proceeds to step S142. If the program is not to be debugged, the process ends.
  • the information collection unit 137 determines whether the lock acquisition has succeeded by the TS command. If the lock acquisition is successful, the process proceeds to step S143. If the lock acquisition fails (waiting for lock release and the TS instruction is re-executed later), the process ends.
  • the information collection unit 137 based on the executed TS instruction, indicates an address indicating the area of the RAM 115 accessed for lock acquisition, that is, an address of an area where the updated lock word is stored (absolute Address).
  • the information collection unit 137 adds the address calculated in step S143 to the exclusive management information corresponding to the CPU 111. Further, the information collection unit 137 updates information corresponding to the CPU 111 in the pointer table 151. That is, the information collection unit 137 changes the lock acquisition flag to ON when the lock acquisition flag is OFF. In addition, the information collection unit 137 increments the lock acquisition number (adds 1 only).
  • the information collection unit 137 generates a write bitmap as shown in FIG. 14 and stores it in a work area corresponding to the CPU 111. At this time, the information collection unit 137 sets the bit corresponding to the address calculated in step S143 to 1 and sets the other bits to 0.
  • the information collection unit 137 searches the exclusive recording area corresponding to the CPU 111 for a total area where the generated write bitmap matches the address range in charge.
  • the information collection unit 137 uses the total area if there is a corresponding total area, and acquires one unused total area if it does not exist. Then, the information collecting unit 137 obtains a logical sum (OR) and synthesizes it with a write bitmap of the total area using the generated write bitmap.
  • FIG. 23 is a flowchart illustrating a procedure example of lock release determination. This lock release determination is executed in step S123 described above.
  • the information collection unit 137 refers to the management information 141 to determine whether the program being executed by the CPU 111 is a debug target. If the program is a debug target, the process proceeds to step S151. If the program is not a debug target, the process ends.
  • the information collection unit 137 reads the address of the area on the RAM 115 where the data is written based on the read STR command from the exclusive management information corresponding to the CPU 111 (the address calculated in the above-described step S131). )
  • the information collection unit 137 determines whether a corresponding address has been retrieved from the exclusive management information in step S151. When the read STR instruction is to update the lock word for releasing the lock, the corresponding address exists in the exclusion management information. If the corresponding address is searched from the exclusion management information, the process proceeds to step S153. If the corresponding address is not searched, the process ends.
  • the information collection unit 137 deletes the address calculated in step S131 described above from the exclusive management information corresponding to the CPU 111. Further, the information collection unit 137 updates information corresponding to the CPU 111 in the pointer table 151. That is, the information collecting unit 137 decrements the lock acquisition number (subtracts 1). When the lock acquisition count becomes 0, the information collection unit 137 changes the lock acquisition flag from ON to OFF.
  • FIG. 24 is a flowchart illustrating an example of a procedure for exclusive control defect detection. This exclusive control deficiency detection is executed in step S129 described above.
  • the detection unit 139 refers to the management information 141 and determines whether the program currently executed by the CPU 111 is a debug target. If it is a debug target, the process proceeds to step S162. If it is not a debug target, the process proceeds to step S161.
  • the detection unit 139 determines whether or not the program has been switched within the most recent predetermined time in the CPU 111, and the program executed immediately before the currently executed program is a debug target. To do. If the above condition is met, the process proceeds to step S162. If the above condition is not met, the process ends.
  • the detection unit 139 changes the request flag corresponding to the CPU 111 in the management information 141 from ON to OFF. As a result, information collection from other CPUs is interrupted. (S163) The detection unit 139 determines whether information about data writing performed by the CPU 111 exists in the general recording area corresponding to the CPU 111. When the CPU 111 executes one or more STR instructions in the latest one section, data writing information exists in the general recording area. If the data writing information of the CPU 111 exists, the process proceeds to step S166, and if not, the process proceeds to step S164.
  • the detection unit 139 discards information in the collection area of the CPU 111.
  • the detection unit 139 changes the request flag corresponding to the CPU 111 in the management information 141 from OFF to ON. Thereby, information collection from another CPU is resumed.
  • FIG. 25 is a flowchart (continuation) illustrating an example of a procedure for detecting exclusive control deficiencies.
  • the detection unit 139 identifies one of the CPUs 112 to 114 (one other CPU). The detection unit 139 determines whether information exists in the collection area for collecting information from other CPUs identified by the CPU 111. When the identified other CPU executes one or more STR instructions in the latest one section, data writing information exists in the collection area. If there is data writing information of the identified other CPU, the process proceeds to step S167, and if not, the process proceeds to step S172.
  • the detection unit 139 identifies one totaling area that is used (one whose use flag is ON) from the general recording areas corresponding to the CPU 111.
  • the detection unit 139 searches the collection area corresponding to the identified other CPU for the aggregation area of the other CPU having the same address range as the aggregation area of the CPU 111. If there is a total area of the corresponding other CPU, the process proceeds to step S168, and if not, the process proceeds to step S171.
  • the detecting unit 139 uses the write bitmap included in the identified total area of the CPU 111 and the corresponding write bitmap included in the total area of the other CPU to detect a data write collision. judge. Details of the writing collision determination will be described later.
  • step S169 The detection unit 139 determines whether or not a data writing collision is detected in step S168. If a data writing collision is detected, the process proceeds to step S170. If no data writing collision is detected, the process proceeds to step S171.
  • the detection unit 139 generates log information including information on the collided data writing and stores it in the log recording area 157. Specifically, the detection unit 139 selects a write-once area corresponding to the collided data write from a plurality of write-once areas associated with the identified total area of the CPU 111 based on the data write destination address. look for. In addition, the detection unit 139 adds additional data corresponding to the collided data writing based on the address of the data writing destination from among a plurality of additional recording areas associated with the total area of the other CPU searched in step S167. Find an area. Then, the detection unit 139 extracts program information and the like from the found additional recording area of the CPU 111 and the additional recording area of another CPU, and inserts them into log information.
  • the detection unit 139 determines whether or not all the total areas of the CPU 111 being used have been confirmed. If all of the total areas have been confirmed, the process proceeds to step S172. If there is an unconfirmed total area, the process proceeds to step S167.
  • the detection unit 139 determines whether all other CPUs (CPUs 112 to 114) have been confirmed. If all other CPUs have been confirmed, the process proceeds to step S173. If there is another unconfirmed CPU, the process proceeds to step S166.
  • the detection unit 139 writes the log information stored in the log recording area 157 to a log file stored in the log file storage unit 134. At this time, the detection unit 139 may delete the log information written in the log file from the log recording area 157.
  • FIG. 26 is a flowchart illustrating a procedure example of writing collision determination.
  • the detection unit 139 obtains a logical product (AND) of a write bitmap (general bitmap) in the general recording area of the CPU 111 and a write bitmap of another CPU.
  • step S181 The detection unit 139 determines whether all the bits of the logical product calculated in step S180 are zero. If all the bits of the logical product are 0, the process proceeds to step S184, and if at least one bit is 1, the process proceeds to step S182.
  • the detection unit 139 searches the exclusive recording area corresponding to the CPU 111 for a write bitmap (exclusive bitmap) in the total area where the address range in charge matches the general bitmap. Then, the detection unit 139 obtains an exclusive OR (XOR) of the bitmap as the logical product calculated in step S180 and the exclusive bitmap.
  • XOR exclusive OR
  • step S183 The detection unit 139 determines whether all the bits of the exclusive OR calculated in step S182 are 0. If all the bits of the exclusive OR are 0, the process proceeds to step S184, and if at least one bit is 1, the process proceeds to step S190.
  • the detection unit 139 changes the peripheral bits (for example, a predetermined number of bits before and after) of the bit having a value of 1 in the general bitmap to 1.
  • the detection unit 139 obtains a logical product (AND) of the general bitmap corrected in step S184 and the write bitmap of another CPU.
  • step S186 The detection unit 139 determines whether all the bits of the logical product calculated in step S185 are zero. If all the bits of the logical product are 0, the process proceeds to step S189, and if at least one bit is 1, the process proceeds to step S187.
  • the detection unit 139 obtains an exclusive OR (XOR) of the bitmap as the logical product calculated in step S185 and the exclusive bitmap.
  • the detection unit 139 determines whether all the bits of the exclusive OR calculated in step S187 are 0. If all the bits of the exclusive OR are 0, the process proceeds to step S189, and if at least one bit is 1, the process proceeds to step S190.
  • the detection unit 139 determines that there is no data write collision.
  • the detection unit 139 determines that there is a data write collision. In this way, the detection unit 139 determines whether data has been written to the same block from both the CPU 111 and another CPU. When data is written to the same block, the detection unit 139 determines that the executed program has a lack of exclusive control in principle. However, when the data write destination is a block in which a lock word is stored, the data write is based on normal exclusive control, and thus is not treated as a defect in exclusive control.
  • the detection unit 139 next determines whether data has been written to a block having a close address from the CPU 111 and another CPU. When data is written to a nearby block, the detection unit 139 determines that there is a lack of exclusive control in the executed program in principle. However, when the data write destination of the other CPU is a block in which a lock word is stored, the data write is based on normal exclusive control, and thus is not treated as a defect of exclusive control.
  • each of the CPUs 111 to 114 uses the instruction emulator to obtain the address information and program information for data writing performed by its own CPU and data writing performed by another CPU. collect. Then, each of the CPUs 111 to 114 uses the instruction emulator to determine the lack of exclusive control based on the address information collected in the most recent section, and outputs log information including program information and the like.
  • the instruction emulator determines the lack of exclusive control based on the address information collected in the most recent section, and outputs log information including program information and the like.
  • the user can specify a program with incomplete exclusive control based on the program information included in the log information, and debugging work is facilitated. Further, by dividing the information collection section in response to lock acquisition or lock release, it is possible to suppress erroneously determining that access by normal exclusive control is incomplete. Further, by comparing the address information excluding access to the lock word, it is possible to improve the accuracy of determining the lack of exclusive control. Further, by dividing the information collection section in the form of switching of the program to be executed, it is possible to improve the determination accuracy of the program having inadequate exclusive control.
  • the information processing apparatus of the third embodiment can be realized by the same hardware configuration as that of the second embodiment shown in FIG.
  • the information processing apparatus according to the third embodiment can be realized by the same software configuration as that of the second embodiment shown in FIG.
  • the information processing apparatus according to the third embodiment will be described below using the same reference numerals as those used in FIGS.
  • FIG. 27 is a diagram illustrating an example of incomplete control during data reference.
  • the program E includes a comparison instruction (CMP instruction) that compares data across a plurality of blocks as an instruction accompanied by data reference to the RAM 115.
  • the program E compares the data X stored across the blocks # 1 and # 2 with the data Y stored across the blocks # 3 and # 4 by this CMP instruction.
  • the block is the minimum unit of access to the RAM 115. Therefore, the program E reads and compares the data of the block # 1 and the data of the block # 3 (ST30).
  • the program E reads and compares the data of the block # 2 and the data of the block # 4 (ST32).
  • the program F includes a store instruction (STR instruction) for writing data in the block # 3.
  • STR instruction a store instruction
  • the STR instruction of the program F may be executed while the CMP instruction of the program E is being executed.
  • the program F updates the data in the block # 3 (ST31).
  • ST31 the correctness of the result of the CMP instruction cannot be guaranteed, for example, the identity of the data X and Y when the CMP instruction is completed may not match the result of the CMP instruction.
  • both the data X and Y to be compared are stored in the RAM 115, but one of the data X and Y may be stored in the register of the CPU 111.
  • the program E may load the data X into a register and refer to the data Y stored in the blocks # 3 and # 4 when executing the CMP instruction.
  • FIG. 28 is a sequence diagram illustrating an example of detection of inadequate exclusive control during data reference.
  • the CPU 111 checks whether the data reference by the CPU 111 and the data writing by the CPU 112 collide. Similar to the CPU 112, the CPU 111 confirms whether or not there is a collision in data writing by the CPUs 113 and 114. In addition, the CPUs 112 to 114 also confirm the presence or absence of a collision in the same manner as the CPU 111.
  • control areas corresponding to the CPUs 111 to 114 are prepared.
  • address information indicating the area of the RAM 115 referred to by the CPU 111 is stored.
  • Collision information indicating (collision) is stored. Similar information is also stored in the control areas for the CPUs 112 to 114.
  • the CPU 111 When a CMP instruction is started by the CPU 111 using the instruction emulator, the CPU 111 generates address information indicating one or two areas in which data to be compared is stored, and stores the address information in the control area for the CPU 111. . Then, CPU 111 turns on the request flag stored in the control area for CPU 111 (ST40).
  • the CPU 112 checks the request flag of the CPU 111, and reads the address information from the control area for the CPU 111 if the request flag is ON. Then, CPU 112 determines whether data writing by CPU 112 collides with data reference by CPU 111, that is, whether the data writing destination is included in the area indicated by the address information (ST41). When a collision between data reference and data writing is detected, the CPU 112 generates collision information indicating the occurrence of the collision and stores it in the control area for the CPU 111. In the example without exclusive control deficiency in FIG. 28, no collision is detected at this point.
  • the CPU 111 turns off the request flag stored in the control area for the CPU 111 and stops collecting the collision information from the CPU 112. Then, the CPU 111 confirms whether there is collision information in the control area for the CPU 111 (ST42). When there is collision information, the CPU 111 determines that at least one of the program being executed by the CPU 111 and the program being executed by the CPU 112 is deficient in exclusive control. On the other hand, when there is no collision information, the CPU 111 determines that there is no deficiency in exclusive control for the section in which the CMP command is executed. In the example of the absence of exclusive control deficiency in FIG. 28, it is determined that there is no exclusive control deficiency.
  • the CPU 111 When the CMP instruction is started, the CPU 111 generates address information, stores it in the control area for the CPU 111, and turns on the request flag (ST43).
  • the CPU 112 confirms that the request flag is ON, and determines whether the data write destination is included in the area indicated by the address information (ST44). In the example with the lack of exclusive control in FIG. 28, a collision is detected at this point. Therefore, the CPU 112 generates collision information and stores it in the control area for the CPU 111 (ST45).
  • the CPU 111 turns off the request flag and checks whether there is collision information in the control area for the CPU 111 (ST46). When detecting the collision information, the CPU 111 determines that at least one of the program being executed by the CPU 111 and the program being executed by the CPU 112 is defective in exclusive control. Then, the CPU 111 generates log information including program information and outputs the log information to the HDD 121 as a log file.
  • FIG. 29 is a diagram illustrating an example of the overall structure of control information according to the third embodiment.
  • the control information storage unit 133 stores control information having a structure as shown in FIG.
  • the control information includes management information 161, a pointer table 162 (third pointer table), a plurality of collection request information including collection request information 163, and a plurality of pieces of comparison recording area 164 in order to manage its own CPU information. It has a comparative recording area.
  • the control information has a plurality of fourth pointer tables including a pointer table 171 and a plurality of collection areas including a collection area 172 in order to manage other CPU information.
  • the control information includes log management information 174 and a log recording area 175 for managing log information.
  • Management information 161 includes information indicating the state of the information processing apparatus 100 as a whole, and points to the pointer table 162.
  • the pointer table 162 includes request flags for the CPUs 111 to 114, and points to collection request information, comparison recording areas, and a fourth pointer table corresponding to the CPUs 111 to 114, respectively.
  • the collection request information stores an address indicating an area in which data to be compared by the CMP instruction is stored.
  • the comparison recording area stores an address, program information, and the like related to a CMP instruction executed by the “own CPU”.
  • the collection request information and the comparison recording area are provided corresponding to the CPUs 111 to 114.
  • the fourth pointer table is provided corresponding to the CPUs 111 to 114.
  • One fourth pointer table indicates one “own CPU”.
  • the fourth pointer table points to collection areas corresponding to a plurality of “other CPUs”.
  • the collection area is provided for each combination of “own CPU” and “other CPU”.
  • collision information collected from other CPUs is stored.
  • the collision information includes address information and program information indicating an area where data has been written by the STR instruction. However, collision information is not stored when no collision has occurred.
  • the log management information 174 includes information for managing the log recording area 175.
  • the log recording area 175 stores log information generated based on the collected information when it is determined that there is a lack of exclusive control.
  • the log information stored in the log recording area 175 is written to a log file (on the HDD 121) stored in the log file storage unit 134.
  • FIG. 30 illustrates an example data structure of management information according to the third embodiment.
  • the management information 161 includes items of system state, lock word, target program, and pointer table address.
  • the item of the system state has a debug start flag.
  • the debug start flag indicates whether or not the debug support unit 136 is operating.
  • the debug start flag can be expressed by 1 bit.
  • the item of lock word includes a lock word used for exclusive control of access to the management information 161.
  • the item of the target program has identification information of the program to be debugged.
  • the item of the address of the pointer table is the head address of the area of the RAM 115 where the pointer table 162 exists.
  • FIG. 31 is a diagram illustrating an example of a data structure of the third pointer table.
  • the pointer table 162 includes items of a request status, an address of collection request information, an address of a comparison recording area, and an address of another CPU pointer table.
  • the request status item has a data 1 request flag and a data 2 request flag as request flags.
  • the data 1 request flag indicates whether or not another CPU is requested to monitor data writing for the first address range indicated by the collection request information described later.
  • the data 2 request flag indicates whether or not another CPU is requested to monitor data writing for a second address range indicated by collection request information described later.
  • the address item of the collection request information is the head address of the area of the RAM 115 where the collection request information corresponding to “own CPU” exists.
  • the item of the address of the comparison recording area is the start address of the area of the RAM 115 where the comparison recording area corresponding to “own CPU” exists.
  • the item of the address of the other CPU pointer table is the start address of the area of the RAM 115 where the fourth pointer table corresponding to “own CPU” is present.
  • FIG. 32 is a diagram showing an example of the data structure of the collection request information. .
  • the collection request information 163 includes items of a head memory address and a tail memory address of the comparison data 1 and a head memory address and a tail memory address of the comparison data 2.
  • the start memory address and the end memory address of the comparison data 1 are the start address and the end address of the area of the RAM 115 in which data corresponding to the first argument of the CMP instruction is stored.
  • the first argument of the CMP instruction refers to a register (when it is not necessary to refer to the comparison data 1 on the RAM 115 when executing the CMP instruction), the start memory address and the end of the comparison data 1 are stored.
  • the memory address field may be empty.
  • the start memory address and the end memory address of the comparison data 2 are the start address and the end address of the area of the RAM 115 in which data corresponding to the second argument of the CMP instruction is stored.
  • the second argument of the CMP instruction refers to a register (when it is not necessary to refer to the comparison data 2 on the RAM 115 when executing the CMP instruction)
  • the start memory address and the end of the comparison data 2 are stored.
  • the memory address field may be empty. Assume that at least one of the comparison data 1 and 2 is accessed in the RAM 115.
  • FIG. 33 is a diagram illustrating a data structure example of comparison instruction information.
  • the comparison recording area 164 stores comparison command information 165 as shown in FIG.
  • the comparison command information 165 includes items of area state, program information, and comparison time.
  • the comparison instruction information 165 includes items of a reference memory address, a base address, and a size for the comparison data 1.
  • the comparison instruction information 165 includes items of the referenced memory address, base address, and size for the comparison data 2.
  • the area status item includes a data 1 flag and a data 2 flag.
  • the data 1 flag indicates whether or not the item of comparison data 1 of the comparison instruction information 165 is used.
  • the data 2 flag indicates whether or not the item of comparison data 2 of the comparison command information 165 is used.
  • the item of the referenced memory address is the start address of the area of the RAM 115 where the comparison data 1 is stored.
  • the item of the base address is a value of the base register at the time when the CMP instruction is started, and is an address serving as a starting point for specifying an area in which the comparison data 1 is stored.
  • the size item includes information (for example, the number of bytes) indicating the size of the comparison data 1 to be referred to.
  • the referenced memory address, base address, and size items contain the same information as the comparison data 1.
  • the item of program information is information for specifying a program including a CMP command executed by the “own CPU”.
  • the program information for example, a program status word (PSW) can be used.
  • PSW program status word
  • the item of comparison time includes the time when the CMP instruction is executed.
  • FIG. 34 is a diagram illustrating an example of the data structure of the fourth pointer table.
  • the pointer table 171 has items of area state, CPU number, lock word, and collection area address corresponding to “other CPUs” (for example, CPUs 112 to 114).
  • the area state item has a use flag.
  • the use flag indicates whether or not the collection area is used, that is, whether or not collision information collected from another CPU exists.
  • the use flag can be expressed by 1 bit.
  • the lock word item is used for exclusive control of access to the pointer table 171.
  • the collection area address item is the start address of the collection area on the RAM 115.
  • FIG. 35 is a diagram illustrating an example data structure of collision information.
  • the collection area 172 stores collision information of one unit or two or more units with collision information 173 as shown in FIG. 35 as one unit. Two or more units of collision information are stored as a linked list.
  • the collision information 173 includes items of an address of the next collision information, a region state, a memory address at which writing is performed, a base address, program information, and a writing time.
  • the item of the next collision information address is the start address of the area of the RAM 115 in which the next collision information in the linked list is stored.
  • the area state item includes a tail flag and a use flag.
  • the end flag indicates whether or not the collision information 173 is the end of the linked list.
  • the use flag indicates whether information is collected from another CPU. Each of the end flag and the use flag can be expressed by 1 bit.
  • the item of the memory address where writing has been performed includes the head address of the area where data writing has been performed by another CPU.
  • the item of the base address includes a base address of another CPU at the time of data writing, that is, an address serving as a starting point for specifying an area accessed by the other CPU.
  • the item of program information is information for specifying a program being executed at the time of data writing. As the program information, for example, PSW can be used.
  • the item of writing time is a time when data writing is performed.
  • the log management information 174 can be realized by, for example, the same data structure as the log management information 156 of the first embodiment shown in FIG.
  • FIG. 36 is a diagram illustrating a data structure example of log information according to the third embodiment.
  • the log recording area 175 stores log information of one unit or two units or more with the log information 176 as shown in FIG. 36 as one unit. Two or more units of log information are stored as a linked list.
  • the log information 176 includes items of the address, area state, and log size of the next log information.
  • the log information 176 includes items of the CPU (local CPU) that executed the CMP instruction, the CPU number, the comparison time, the memory address to which the comparison data 1 and 2 are referenced, the base address of the comparison data 1 and 2 and the program information.
  • the log information 176 includes items of other CPU number, writing time, memory address at which writing is performed, base address, and program information for the CPU (other CPU) that has performed data writing.
  • the next log information address item is the start address of the area of the RAM 115 in which the next log information in the linked list is stored.
  • the area state item includes a data 1 flag and a data 2 flag.
  • the data 1 flag indicates whether or not the item of the comparison data 1 of the log information 176 is used.
  • the data 2 flag indicates whether or not the item of comparison data 2 of the log information 176 is used.
  • Each of the data 1 flag and the data 2 flag can be expressed by 1 bit.
  • the log size item indicates the size of the log information 176.
  • the item of CPU number is an identification number for identifying the CPU that executed the CMP instruction.
  • information included in the comparison command information 165 stored in the comparison recording area 164 is used as information on the CPU that has executed the CMP command.
  • the item of other CPU number is an identification number for identifying the CPU that executed the store instruction that collides with the CMP instruction.
  • information included in the collision information 173 stored in the collection area 172 is used as information on the CPU that has performed data writing.
  • FIG. 37 is a flowchart illustrating a procedure example of debugging support at the time of data reference.
  • the instruction determination unit 131 reads one instruction.
  • the instruction determination unit 131 determines whether the read instruction is a CMP instruction (comparison instruction). If the read instruction is a CMP instruction, the process proceeds to step S212, and if not, the process proceeds to step S213.
  • the information collection unit 137 requests another CPU to monitor whether or not data writing is performed on the area of the RAM 115 referred to by the CMP instruction at the start of the read CMP instruction.
  • the information collection unit 137 generates address information and program information related to the CMP instruction. Then, the process proceeds to step S215. Details of this processing (collision information collection) will be described later.
  • the instruction determination unit 131 determines whether the read instruction is a STR instruction (store instruction). If the read instruction is a STR instruction, the process proceeds to step S214, and if it is not a STR instruction, the process ends.
  • the read instruction is converted into an instruction interpretable by the CPU 111 by the instruction conversion unit 132 and executed.
  • the information providing unit 138 determines whether the data reference by the CPUs 112 to 114 and the data writing by the CPU 111 collide, that is, the data writing to the area of the RAM 115 in which the data compared by the CMP instruction is stored. Determine whether or not When a collision between data reference and data writing is detected, the information providing unit 138 generates collision information including address information and program information regarding the STR instruction. Then, the processing of the read instruction ends. Details of this process (read / write collision determination) will be described later.
  • the detection unit 139 checks whether collision information has been collected in the collection area corresponding to the CPU 111 from the start to the completion of the CMP command. By collecting the collision information, the detection unit 139 detects that the data reference by the CPU 111 and the data writing by at least one of the CPUs 112 to 114 collide. When detecting a collision, the detection unit 139 determines that at least one of the program executed by the CPU 111 and the program executed by the other CPU that has performed data writing is deficient in exclusive control, and includes a log including program information and the like Output information. Details of exclusive control deficiency detection will be described later.
  • FIG. 38 is a flowchart illustrating an exemplary procedure for collecting collision information. This collision information collection is executed in step S212 described above.
  • the information collection unit 137 refers to the management information 161 to determine whether the program being executed by the CPU 111 is a debug target. If the program is a debug target, the process proceeds to step S221. If the program is not a debug target, the process ends.
  • the information collecting unit 137 determines whether the CMP instruction to be executed is an instruction that satisfies a predetermined condition.
  • the predetermined condition is that at least one of two data to be compared is referred to by accessing the RAM 115, and the data on the RAM 115 is stored across a plurality of blocks. It is that you are.
  • a block is a unit of an area of the RAM 115 accessed at one time. If the CMP instruction satisfies the predetermined condition, the process proceeds to step S222. If the CMP instruction does not satisfy the predetermined condition, the process ends.
  • the information collection unit 137 calculates an address range (absolute address) indicating an area of the RAM 115 to be referred to based on the CMP instruction received from the instruction determination unit 131.
  • an address range absolute address
  • one or two address ranges are calculated according to the argument of the CMP instruction. If one of the two arguments of the CMP instruction points to a register, one address range is calculated, and if both arguments point to the RAM 115, two address ranges are calculated.
  • the information collection unit 137 stores information indicating one or two address ranges calculated in step S222 in the collection request information corresponding to the CPU 111.
  • the information collection unit 137 collects the current value (current base address) of the base register included in the CPU 111 and program information (for example, current PSW) indicating the program being executed by the CPU 111.
  • the information collecting unit 137 generates comparison command information including information indicating an address range, a base address, program information, and the like, and stores the comparison command information in a comparison recording area corresponding to the CPU 111.
  • the information collection unit 137 changes the request flag corresponding to the CPU 111 included in the pointer table 162 to ON. At this time, the data 1 request flag and the data 2 request flag are set according to the argument of the CMP instruction. At least one of the data 1 request flag and the data 2 request flag is turned on.
  • FIG. 39 is a flowchart illustrating an example of a procedure for determining a read / write collision. This read / write collision determination is executed in step S214 described above.
  • the information providing unit 138 identifies one of the CPUs 112 to 114 (one other CPU).
  • the information providing unit 138 refers to the pointer table 162 and determines whether at least one of the two request flags (data 1 request flag and data 2 request flag) corresponding to the identified other CPU is ON.
  • the fact that at least one of the request flags is ON indicates that the other CPU is requested to monitor data writing. If at least one request flag is ON, the process proceeds to step S231. If both request flags are OFF, the process proceeds to step S235.
  • the information providing unit 138 calculates the address (absolute address) of the RAM 115 to which data is written, based on the STR command received from the command determining unit 131.
  • the information providing unit 138 refers to the collection request information corresponding to the specified other CPU, and determines one or two address ranges (address range corresponding to the ON request flag) designated by the other CPU. Check. Then, the information providing unit 138 determines whether the data write destination address calculated in step S231 is included in any of the designated address ranges. If the data write destination belongs to the designated address range, the process proceeds to step S233, and if not, the process proceeds to step S235.
  • the information providing unit 138 detects a collection area for collecting collision information of the CPU 111 among a plurality of collection areas corresponding to the identified other CPUs.
  • the information providing unit 138 collects the base register value (base address) and program information (for example, PSW) of the CPU 111, and generates collision information including the data write destination address, base address, and program information. . Then, the information providing unit 138 stores the collision information in the collection area detected in step S233.
  • the information providing unit 138 determines whether all other CPUs (CPUs 112 to 114) have been confirmed. If all other CPUs have been confirmed, the process ends. If there is an unconfirmed other CPU, the process proceeds to step S230.
  • FIG. 40 is a flowchart illustrating an example of a procedure for detecting exclusive control deficiencies when referring to data. This exclusive control deficiency detection is executed in the aforementioned step S215. (S240) The detection unit 139 detects completion of the CMP instruction.
  • the detection unit 139 refers to the management information 161 to determine whether the program being executed by the CPU 111 is a debug target. If the program is a debug target, the process proceeds to step S242. If the program is not a debug target, the process ends.
  • the detection unit 139 determines whether the CMP command is a command that satisfies a predetermined condition.
  • the predetermined condition is the same as that in step S221 in FIG. If the CMP instruction satisfies a predetermined condition, the process proceeds to step S243. If the CMP instruction does not satisfy the predetermined condition, the process ends.
  • the detection unit 139 turns off the data 1 request flag and the data 2 request flag corresponding to the CPU 111 included in the pointer table 162. (S244) The detection unit 139 identifies one of the CPUs 112 to 114 (one other CPU). The detection unit 139 determines whether the collision information of the other CPU exists in the collection area corresponding to the CPU 111 and the set of other CPUs identified. If there is collision information, the process proceeds to step S245; otherwise, the process proceeds to step S246.
  • the detection unit 139 copies address information, program information, and the like included in the collision information to the log recording area 175 as part of the log information.
  • the detection unit 139 determines whether all other CPUs (CPUs 112 to 114) have been confirmed. If all other CPUs have been confirmed, the process proceeds to step S247, and if there is an unconfirmed other CPU, the process proceeds to step S244.
  • the detection unit 139 determines whether or not collision information has been collected by at least one other CPU, that is, whether or not step S245 has been executed. If collision information has been collected, the process proceeds to step S248. If collision information has not been collected, the process ends.
  • the detection unit 139 acquires comparison command information from the comparison recording area corresponding to the CPU 111.
  • the detection unit 139 copies address information, program information, and the like included in the comparison instruction information to the log recording area 175 as a part of the log information.
  • the detection unit 139 writes the log information stored in the log recording area 175 to a log file stored in the log file storage unit 134. At this time, the detection unit 139 may delete the log information written in the log file from the log recording area 175.
  • each of the CPUs 111 to 114 uses an instruction emulator to obtain address information, program information, etc. for data reference performed by its own CPU and data writing performed by another CPU. collect.
  • Each of the CPUs 111 to 114 uses an instruction emulator to determine the lack of exclusive control between data reference and data writing and output log information.
  • it is possible to efficiently detect that there is a defect in exclusive control of access to the RAM 115 without preparing special hardware or a simulation environment.
  • deficiencies in spin-lock exclusive control can be determined efficiently.
  • the user can specify a program having a lack of exclusive control based on the program information included in the log information, and debugging work is facilitated.
  • the information processing according to the first embodiment can be realized by causing the information processing apparatus 10 to execute a program.
  • the information processing according to the second and third embodiments can be realized by causing the information processing apparatus 100 to execute a program.
  • the program can be recorded on a computer-readable recording medium (for example, the recording medium 103).
  • a computer-readable recording medium for example, the recording medium 103.
  • the recording medium for example, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like can be used.
  • Magnetic disks include FD and HDD.
  • Optical disks include CD, CD-R (Recordable) / RW (Rewritable), DVD, and DVD-R / RW.
  • the program may be recorded and distributed on a portable recording medium. In that case, the program may be copied (installed) from a portable recording medium to another recording medium such as an HDD (for example, the HDD 121) and executed.
  • an HDD for example, the HDD 121

Landscapes

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

Abstract

La présente invention a pour objet de faciliter la détermination d'une éventuelle déficience du contrôle exclusif sur une mémoire. Un dispositif (10) de traitement d'informations comprend des processeurs (11, 12) et une mémoire (13). Chacun des processeurs (11, 12) exécute des instructions contenues dans le logiciel à déboguer au moyen d'un logiciel (14) de contrôle qui contrôle l'exécution des instructions. Lorsque le processeur (11) exécute une instruction (15) indiquant une écriture de données ou un référencement de données vers la mémoire (13), le processeur (11) génère des informations (17) d'historique conformément à l'instruction (15). Lorsque le processeur (12) exécute une instruction (16) indiquant une écriture de données vers la mémoire (13), le processeur (12) génère des informations (18) d'historique conformément à l'instruction (16). Le processeur (11) détermine s'il existe une déficience du contrôle exclusif sur une zone de la mémoire (13) en se basant sur les informations (17, 18) d'historique.
PCT/JP2013/070734 2013-07-31 2013-07-31 Procédé de débogage de logiciels, dispositif de traitement d'informations et programme WO2015015591A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2013/070734 WO2015015591A1 (fr) 2013-07-31 2013-07-31 Procédé de débogage de logiciels, dispositif de traitement d'informations et programme
JP2015529270A JP6069719B2 (ja) 2013-07-31 2013-07-31 ソフトウェアデバッグ方法、情報処理装置およびプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/070734 WO2015015591A1 (fr) 2013-07-31 2013-07-31 Procédé de débogage de logiciels, dispositif de traitement d'informations et programme

Publications (1)

Publication Number Publication Date
WO2015015591A1 true WO2015015591A1 (fr) 2015-02-05

Family

ID=52431171

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/070734 WO2015015591A1 (fr) 2013-07-31 2013-07-31 Procédé de débogage de logiciels, dispositif de traitement d'informations et programme

Country Status (2)

Country Link
JP (1) JP6069719B2 (fr)
WO (1) WO2015015591A1 (fr)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006318412A (ja) * 2005-05-16 2006-11-24 Toshiba Corp 半導体装置
JP2010160704A (ja) * 2009-01-08 2010-07-22 Toshiba Corp デバッグ支援装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006318412A (ja) * 2005-05-16 2006-11-24 Toshiba Corp 半導体装置
JP2010160704A (ja) * 2009-01-08 2010-07-22 Toshiba Corp デバッグ支援装置

Also Published As

Publication number Publication date
JP6069719B2 (ja) 2017-02-01
JPWO2015015591A1 (ja) 2017-03-02

Similar Documents

Publication Publication Date Title
US10649853B2 (en) Tracking modifications to a virtual machine image that occur during backup of the virtual machine
US8117600B1 (en) System and method for detecting in-line synchronization primitives in binary applications
US8949671B2 (en) Fault detection, diagnosis, and prevention for complex computing systems
JP2557180B2 (ja) ソフトウェア例外条件に対する選択的データ捕獲方法
US8117403B2 (en) Transactional memory system which employs thread assists using address history tables
US9218234B2 (en) Memory dump and analysis in a computer system
ES2734305T3 (es) Predicción, diagnóstico y recuperación de fallos de aplicaciones en base a patrones de acceso a recursos
US7698690B2 (en) Identifying code that wastes time performing redundant computation
US8032869B2 (en) Profiling method and computer product
US20030163758A1 (en) Method and system to identify a memory corruption source within a multiprocessor system
US9086969B2 (en) Establishing a useful debugging state for multithreaded computer program
Eizenberg et al. Remix: Online detection and repair of cache contention for the jvm
US10346255B2 (en) Method for flagging data modification during a virtual machine backup
JPH07319735A (ja) メモリの不正アクセス検出方法及びシステム
US20130305252A1 (en) Method and system for heterogeneous filtering framework for shared memory data access hazard reports
Vasavada et al. Comparing different approaches for incremental checkpointing: The showdown
US8489652B2 (en) Tracking object fields using relocatable object watchpoints
US8412751B2 (en) Determining whether a Java object has been scan-missed by a garbage collector scan
CN108628726B (zh) Cpu状态信息记录方法和装置
JP6069719B2 (ja) ソフトウェアデバッグ方法、情報処理装置およびプログラム
US11010158B2 (en) Determining the availability of memory optimizations by analyzing a running binary
WO2012137239A1 (fr) Système informatique
Fan Research on using kernel dynamic tracking to locate system bug
JP2014081884A (ja) 計算機システム
Fang Detecting and Fixing Memory-Related Performance Problems in Managed Languages

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: 13890557

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015529270

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: 13890557

Country of ref document: EP

Kind code of ref document: A1