摘要:
In an embodiment, in response to reading a declaration of a function that specifies a name of the function and a type of memory on which the function operates, the name of the function, a pointer to the function, and the type are saved to a template. In response to reading a call statement that specifies the name of the function and an identifier of an object, first code is generated. The first code, when executed, reads the pointer to the function from a virtual function table pointed to by the object, finds an entry in the virtual function table that represents the function, and reads the pointer from the entry in the virtual function table. The call statement, when executed, requests a call of the function. Second code is generated that, when executed, calls the function using the pointer read from the virtual function table.
摘要:
In an embodiment, in response to reading a declaration of a function that specifies a name of the function and a type of memory on which the function operates, the name of the function, a pointer to the function, and the type are saved to a template. In response to reading a call statement that specifies the name of the function and an identifier of an object, first code is generated. The first code, when executed, reads the pointer to the function from a virtual function table pointed to by the object, finds an entry in the virtual function table that represents the function, and reads the pointer from the entry in the virtual function table. The call statement, when executed, requests a call of the function. Second code is generated that, when executed, calls the function using the pointer read from the virtual function table.
摘要:
A method, computer-readable storage medium, and computer system are provided. In an embodiment, a detection is made that at least one thread, in a plurality of threads executing in a computer, has hung. A lock order of a plurality of locks used by the plurality of threads is determined. A determination is made that a first thread in the plurality of threads violates the lock order. After the determination that the first thread violates the lock order, the computer is restarted and the first thread that violates the lock order is scheduled on a reduced-speed processor.
摘要:
A method, computer-readable storage medium, and computer system are provided. In an embodiment, a detection is made that at least one thread, in a plurality of threads executing in a computer, has hung. A lock order of a plurality of locks used by the plurality of threads is determined. A determination is made that a first thread in the plurality of threads violates the lock order. After the determination that the first thread violates the lock order, the computer is restarted and the first thread that violates the lock order is scheduled on a reduced-speed processor.
摘要:
A method, computer-readable storage medium, and computer system are provided. In an embodiment, a defect is detected in a product. In response to detecting the defect in the product, a part is created that describes the state of execution of the product at a time that the defect was detected. In response to creating the part that describes state of the execution of the product at the time that the defect was detected, authority is granted to access the part to a first user who is responsible for fixing the defect.
摘要:
In an embodiment, a first execution path in a program is determined that has been executed a largest number of times, as compared to at least one other path in the program. Swapped instructions are replaced in the program with breakpoints, wherein the swapped instructions are not on the first execution path. The breakpoints that are not on the first execution path and that are contiguous to each other are replaced in the program with a control word.
摘要:
Debugging source code includes: tracking, by a debugger during a debug session, duration of user examination of source code locations; providing, by the debugger to an optimizing compiler, a source code examination profile specifying source code locations examined by the user during the debug session; and receiving, by the debugger from the optimizing compiler: compiled source code for debugging, the compiled source code comprising, at each of one or more source code locations specified in the source code examination profile: a snapshot before the source code of the source code location, followed by an expanded snapshot, the expanded snapshot including computer program instructions to enable, during a debug session, examination of variable values changing during execution of the source code at the source code location; and a recording of snapshot locations and expanded snapshot locations.
摘要:
Compiling source code includes receiving, by an optimizing compiler from a debugger, a variable value modification profile that specifies locations in the source code at which variable values modified during a debug session; compiling the source code, including: inserting snapshots at one or more of the locations in the source code at which variable values were modified, each snapshot including a breakpoint; and only for each snapshot at a location in the source code at which variable values were modified: inserting, between the breakpoint and remaining source code at the location of the snapshot, a module of computer program instructions that when executed retrieves a current value of a variable and stores the current value in a register; and recording the location of each inserted snapshot; and providing, to the debugger by the optimizing compiler, the recorded locations of each inserted snapshot along with the compiled source code.
摘要:
In an embodiment, a current internal corrosion level at a current time is read from an internal corrosion sensor that is internal to a computer. An internal corrosion difference is calculated between the current internal corrosion level and a previous internal corrosion level. If the internal corrosion difference is more than a first threshold amount, a first action is performed that decreases an internal temperature of the computer.
摘要:
Compiling source code includes receiving, by an optimizing compiler from a debugger, a variable value modification profile that specifies locations in the source code at which variable values modified during a debug session; compiling the source code, including: inserting snapshots at one or more of the locations in the source code at which variable values were modified, each snapshot including a breakpoint; and only for each snapshot at a location in the source code at which variable values were modified: inserting, between the breakpoint and remaining source code at the location of the snapshot, a module of computer program instructions that when executed retrieves a current value of a variable and stores the current value in a register; and recording the location of each inserted snapshot; and providing, to the debugger by the optimizing compiler, the recorded locations of each inserted snapshot along with the compiled source code.