IPC분류정보
국가/구분 |
United States(US) Patent
등록
|
국제특허분류(IPC7판) |
|
출원번호 |
UP-0449157
(2006-06-07)
|
등록번호 |
US-7673181
(2010-04-21)
|
발명자
/ 주소 |
- Lindo, Jonathan
- Daudel, Jeffrey
|
출원인 / 주소 |
|
대리인 / 주소 |
Hickman Palermo Truong & Becker LLP
|
인용정보 |
피인용 횟수 :
41 인용 특허 :
12 |
초록
▼
Recording and replaying computer programs includes detecting whether a race condition exists among multiple threads of a multithreaded application program. In an embodiment, detecting race conditions comprises detecting and preventing an operation of a first thread of an application program to read
Recording and replaying computer programs includes detecting whether a race condition exists among multiple threads of a multithreaded application program. In an embodiment, detecting race conditions comprises detecting and preventing an operation of a first thread of an application program to read or write a computer memory, wherein the application program executes a plurality of threads; storing an exception point representing a current location in an execution path of the application program; allowing the operation to read or write the memory; creating and storing a record identifying the memory, the first thread, and an index value for a location in the execution path; and determining, based on the record and a plurality of other similar records, whether a race condition exists at the exception point for the first thread and one or more other threads in the plurality of the threads.
대표청구항
▼
What is claimed is: 1. A computer-implemented method, comprising: setting access permissions of a computer memory to prohibit reading or writing; intercepting an attempted operation of a first thread of an application program to read or write the memory, wherein the application program executes a p
What is claimed is: 1. A computer-implemented method, comprising: setting access permissions of a computer memory to prohibit reading or writing; intercepting an attempted operation of a first thread of an application program to read or write the memory, wherein the application program executes a plurality of threads; storing an exception point representing a current location in an execution path of the application program; setting the access permissions to permit reading and writing; executing the attempted operation, that was previously intercepted, to read or write the memory; creating and storing a record identifying the memory, the first thread, and an index value for a location in the execution path; determining, based on the record and a plurality of other similar records, whether a race condition exists at the exception point for the first thread and one or more other threads in the plurality of the threads. 2. The method of claim 1, further comprising installing an exception handler that the computer system invokes when a memory write exception or memory read exception occurs, wherein the exception handler at least performs: the storing of the exception point representing the current location in the execution path of the application program; the setting of the access permissions to permit reading and writing; the creating and storing of the record identifying the memory, the first thread, and the index value for the location in the execution path. 3. The method of claim 1, wherein the memory comprises any of: static memory in the computer system, and heap memory in the computer system. 4. The method of claim 1, further comprising: detecting a call of the first thread to one or more thread synchronization functions; determining whether the call will require the first thread to wait on execution of another thread; resetting the index value of the first thread to a current replay index value, wherein the replay index value represents a current execution point of the application program. 5. The method of claim 1, wherein the storing further comprises storing a thread synchronized index value in the record for the first thread, wherein the thread synchronized index value represents a point in application execution at which the first thread is synchronized to all the other threads. 6. The method of claim 1, wherein the determining further comprises: scanning the record, and one or more other records, wherein the other records represent other operations of one or more of the other threads to read or write other memory and comprise information the other memory, the other threads, and index values for locations in the execution path at which the other operations occurred; determining whether the index value of the first thread is earlier in the execution path than all other index values, and in response, removing the record from storage. 7. The method of claim 1, wherein the determining further comprises: scanning the record, and one or more other records, wherein the other records represent other operations of one or more of the other threads to read or write other memory and comprise information the other memory, the other threads, and index values for locations in the execution path at which the other operations occurred; locating one or more pairs of records indicating that two threads read and wrote the same memory location; determining that the race condition exists when the two threads read and wrote the same memory location close in time; generating a user notification about the race condition. 8. The method of claim 7, wherein the storing further comprises storing a thread synchronized index value in the record for the first thread, wherein the thread synchronized index value represents a point in application execution at which the first thread is synchronized to all the other threads, and further comprising determining that the race condition exists when the index values for the two threads are after the last recorded thread synchronized index. 9. The method of claim 1, wherein generating a notification comprises setting a debugger breakpoint at the current location in the execution path, and invoking a debugger at the debugger breakpoint. 10. The method of claim 1, wherein the application program is a computer game platform. 11. A computer-implemented method, comprising: detecting and preventing an attempted operation of a first thread of an application program to read or write a computer memory, wherein the application program executes a plurality of threads; storing an exception point representing a current location in an execution path of the application program; executing the attempted operation of the first thread, that was previously prevented, to read or write the memory; creating and storing a record identifying the memory, the first thread, and an index value for a location in the execution path; determining, based on the record and a plurality of other similar records, whether a race condition exists at the exception point for the first thread and one or more other threads in the plurality of the threads. 12. A computer-readable volatile or non-volatile medium, carrying one or more instructions, which instructions, when executed by one or more processors, cause the one or more processors to carry out the steps of: setting access permissions of a computer memory to prohibit reading or writing; intercepting an attempted operation of a first thread of an application program to read or write the memory, wherein the application program executes a plurality of threads; storing an exception point representing a current location in an execution path of the application program; setting the access permissions to permit reading and writing; executing the attempted operation, that was previously intercepted, to read or write the memory; creating and storing a record identifying the memory, the first thread, and an index value for a location in the execution path; determining, based on the record and a plurality of other similar records, whether a race condition exists at the exception point for the first thread and one or more other threads in the plurality of the threads. 13. The computer-readable medium of claim 12, further storing instructions, which when executed cause the one or more processors to carry out the step of installing an exception handler that the computer system invokes when a memory write exception or memory read exception occurs, wherein the exception handler at least performs: the storing of the exception point representing the current location in the execution path of the application program; the setting of the access permissions to permit reading and writing; the creating and storing of the record identifying the memory, the first thread, and the index value for the location in the execution path. 14. The computer-readable medium of claim 12, wherein the memory comprises any of: static memory in the computer system, and heap memory in the computer system. 15. The computer-readable medium of claim 12, further storing instructions, which when executed cause the one or more processors to carry out the steps of: detecting a call of the first thread to one or more thread synchronization functions; determining whether the call will require the first thread to wait on execution of another thread; resetting the index value of the first thread to a current replay index value, wherein the replay index value represents a current execution point of the application program. 16. The computer-readable medium of claim 12, wherein the storing further comprises storing a thread synchronized index value in the record for the first thread, wherein the thread synchronized index value represents a point in application execution at which the first thread is synchronized to all the other threads. 17. The computer-readable medium of claim 12, wherein the determining further comprises: scanning the record, and one or more other records, wherein the other records represent other operations of one or more of the other threads to read or write other memory and comprise information the other memory, the other threads, and index values for locations in the execution path at which the other operations occurred; determining whether the index value of the first thread is earlier in the execution path than all other index values, and in response, removing the record from storage. 18. The computer-readable medium of claim 12, wherein the determining further comprises: scanning the record, and one or more other records, wherein the other records represent other operations of one or more of the other threads to read or write other memory and comprise information the other memory, the other threads, and index values for locations in the execution path at which the other operations occurred; locating one or more pairs of records indicating that two threads read and wrote the same memory location; determining that the race condition exists when the two threads read and wrote the same memory location close in time; generating a user notification about the race condition. 19. The computer-readable medium of claim 17, wherein the storing further comprises storing a thread synchronized index value in the record for the first thread, wherein the thread synchronized index value represents a point in application execution at which the first thread is synchronized to all the other threads, and further comprising determining that the race condition exists when the index values for the two threads are after the last recorded thread synchronized index. 20. The computer-readable medium of claim 12, wherein generating a notification comprises setting a debugger breakpoint at the current location in the execution path, and invoking a debugger at the debugger breakpoint. 21. The computer-readable medium of claim 12, wherein the application program is a computer game platform. 22. The method of claim 1, further comprising installing an exception handler that the computer system invokes when a memory write exception or memory read exception occurs, wherein the exception handler at least performs execution of the attempted operation, that was previously intercepted, to read or write the memory. 23. The computer-readable medium of claim 12, further storing instructions, which when executed causes the one or more processors to perform the step of installing an exception handler that the computer system invokes when a memory write exception or memory read exception occurs, wherein the exception handler at least performs execution of the attempted operation, that was previously intercepted, to read or write the memory.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.