Reverse debugging of software failures
By intelligently avoiding analytical inference and operating block timestamp sorting, the problem of memory aliasing and multi-thread concurrency of sparse hardware trace data in time travel debugging is solved, improving debugging scalability and information acquisition, and reducing resource dependence. .
Patent Information
- Application Number
- CN201980064836.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-10-01
- Filing Date
- 2019-09-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2039-09-04
AI Technical Summary
Existing technologies face memory aliasing and multi-thread concurrency issues when utilizing sparse hardware trace data for time travel debugging, resulting in increased debugging difficulty, and existing solutions are not scalable and impractical.
Perform iterative backward and forward analysis by intelligently determining when to avoid making analytical inferences that could lead to prohibitions, combining recorded state values and sparse hardware trace data, avoiding inferring state values for unknown destination addresses, and operating Block timestamp sorting generates merged sequence lists to solve concurrency issues.
Effectively alleviates memory aliasing and multi-thread concurrency issues, improves debugging scalability and practicality, provides more information for debugging, and reduces dependence on resources.
Smart Images

Figure CN112789602B_ABST
Abstract
Description
Background Art
[0001] Computers and corresponding software applications are becoming increasingly sophisticated, enabling users to store, access, and manipulate data in a variety of ways. For example, computing applications can be used to perform word processing, graphics design, sound / visual processing, data analysis, electronic communications, and more.
[0002] Computer applications include code in the form of executable instructions that are executed by one or more processors of a computer system. These instructions are created and sequenced together by developers in a development environment. Once the instructions are compiled, interpreted, and / or built, the corresponding application can be deployed for use.
[0003] Unfortunately, computer systems and applications do not always operate in the intended or expected manner, which may cause application crashes before or after deployment. At least for this reason, debugging applications to identify and fix instructions in the code that crash the application is often necessary.
[0004] Different developer tools have also been created to assist developers in writing, editing, testing and debugging the executable instructions of an application to help troubleshoot system failures. Some of these tools include program code text editors, source code editors, debuggers, and integrated development environments (IDEs), to name a few. Unfortunately, however, unnoticed program errors sometimes persist during the development phase and will not be noticed until the software application is deployed for general or widespread use. Debugging application failures can be more difficult when the application has already been deployed because a larger amount of code must be examined to identify the instruction that caused the problem.
[0005] Recently, a debugging process known as "time travel" debugging has emerged as a popular technique. With time travel debugging, a tracer program records the states of all processor instructions in a processor instruction, as well as many of the states that exist during the execution of a program. Later, when the program is debugged, the tracer data is used to recreate the exact memory state and register state that existed at any point during execution, in order to identify the specific instructions and locations in the code that caused the error. This technique has been particularly advantageous to developers in development environments where the high resource usage of collecting trace data is acceptable to some extent. However, it is still undesirable because the data logging that would be included in the heavy tracing in conventional time travel debugging is computationally expensive.
[0006] Additionally, it should be noted that heavy tracing of this type for time travel debugging is highly impractical for most post-deployment scenarios. Thus, most post-deployment debugging is notoriously difficult because developers have to rely on very limited information (e.g., essentially only information collected after deployment and included in memory dump files (dumps)) as opposed to the large amount of data obtained during development and collected for time travel debugging. In particular, it should be noted that the entire execution history of the application (e.g., time travel tracing data) is often not available because high-fidelity program tracing for those systems is too expensive (i.e., clients do not want to run resource-intensive debuggers along with the executing application). This limited information availability is one of the main factors why debugging already deployed applications is so difficult.
[0007] Some attempts have been made to provide developers with additional data that can be used during debugging, such as client-side debugging data obtained from sparse processor traces. For example, Processor Trace is a lightweight hardware tracing mechanism that has been included in almost all The sparse hardware trace, also referred to herein as a sparse trace, a thin trace, a thin hardware trace, a sparse / thin trace, or a sparse / thin hardware trace, identifies the control flow of an application (i.e., the sequence of actual instructions executed by a computer system in response to the application's commands). Although this information can be used to identify the general flow of a program, the control flow data only identifies the instructions that are executed. It does not describe data values or even some of the memory addresses that are used. Therefore, the use of this sparse data has not substantially improved conventional debugging techniques, particularly time travel debugging.
[0008] Despite the foregoing, some attempts have been made to derive, or rather infer, the missing data values and missing memory addresses described above from the control flow information obtained using hardware processor tracing. Typically, these attempts combine the state values included in the memory dump file with lightweight hardware trace data (i.e., control flow), and then perform a recursive backward analysis to obtain the unknown state corresponding to each processor instruction. Although some of these debugging techniques have been helpful, these techniques have not been widely adopted because they only successfully identify a small fraction of the total number of processor instruction states.
[0009] In conjunction with this low performance, existing attempts to debug programs using sparse hardware trace data have encountered significant problems that limit their scalability and practicality. For example, one such problem is referred to herein as "memory aliasing". This type of problem occurs when a write instruction for an unknown destination address is encountered during a recursive backward inference analysis, and the debugger cannot know how to handle the state value for the unknown destination address. To address this problem, some existing proposals include making attempts to infer all possible options for all unknown memory locations. However, this type of approach is practically prohibited because the debugging system cannot track and resolve all possible inferences for all branches without reaching a serious failure of the resource, especially for large and complex programs. Another approach is to avoid making any assumptions for unknown memory locations and corresponding address values. However, this naive approach is impractical because it actually prevents the debugging software from identifying / inferring any large amount of information, especially for complex programs. In this regard, both of the aforementioned methods are insufficient and are not scalable in practice. This is particularly true when using sparse / thin hardware trace data to debug a program that has executed a large number of instructions (eg, thousands of instructions, tens of thousands of instructions, hundreds of thousands of instructions, or even millions of instructions).
[0010] Another problem with time travel debugging based on sparse hardware trace data is the "concurrency" problem, which exists when an application is executed on multiple processors and / or with multiple threads that are tracked separately. This problem specifically involves the difficulty in knowing the sequence of instructions because there are no separate timestamps for the different instructions for each trace. Instead, within each of the different traces, a block of instructions is associated with a single timestamp. Using block timestamps, it is possible to identify the start time of each block, but it is not possible to identify the specific time and relative sequence of each instruction in the instruction block, especially when blocks of instructions are executed concurrently with instructions executed on other threads. Existing debugging systems are indeed unable to handle this concurrency problem because inferring all possible sequencing options would require exponential branch / analysis potential.
[0011] In view of the foregoing, it will be appreciated that a need currently exists to identify debugging solutions, particularly solutions that can scale efficiently, that mitigate memory aliasing and / or multi-thread concurrency issues caused by time travel debugging utilizing sparse / thin hardware traces.
[0012] The subject matter claimed herein is not limited to solving any disadvantages described above or operating only in the described environment. Rather, this background is merely provided to illustrate one exemplary technology area in which some embodiments described herein may be practiced. Summary of the invention
[0013] The disclosed embodiments include computer systems, methods, and hardware storage devices configured to perform debugging utilizing sparse hardware trace data (eg, control flow data) in conjunction with a limited set of recorded state values.
[0014] In some examples, debugging is performed in a manner that intelligently determines when to avoid making inferences that may lead to prohibited analysis, thereby mitigating memory aliasing and / or multi-threaded concurrency issues during time travel debugging.
[0015] In some embodiments, the disclosed debugging process includes a computer system that obtains a set of recorded state values corresponding to a previous execution of an application. As an example, these recorded state values may be included in a memory dump file (e.g., from an application crash), or as a result of a manually triggered program stop corresponding to a breakpoint or another specified location within the debugged code. Additionally, control flow information is obtained from hardware trace data included in a thin hardware trace of a previous execution of the application. The control flow information describes a sequence of a set of processor instructions executed during a previous execution of the application. Subsequently, iterative backward and forward analysis of the set of processor instructions is performed to identify at least some of the program states or processor states corresponding to the processor instructions. During the iterative backward and forward analysis, when a memory write instruction encounters an unknown destination write address (thereby causing a memory alias condition), the iterative backward and forward analysis avoids inferring an unrecorded program state value at the unknown destination address for the memory write instruction. Therefore, the outdated value in the unknown destination address remains unmodified by the memory write instruction, at least until a conflict associated with the unknown destination address is subsequently detected. In response to detecting such a conflict, if the outdated value in the unknown destination address is correctable, the outdated value is corrected via error correction techniques. However, if the outdated value is not correctable, an indication is provided to indicate that the outdated value is not correctable and therefore will not be used for further inference during forward and backward analysis. Thus, in some examples, these processes can be used for address memory alias conditions.
[0016] Related embodiments that can be used to help solve concurrency problems related to multithreaded implementations are also provided. In these embodiments, a set of recorded state values corresponding to a previous execution of an application is obtained. Additionally, thin hardware tracing data corresponding to the previous execution of the application is identified. Here, the thin hardware tracing data includes control flow information for operation blocks of processor instructions executed during the previous execution of the application, and corresponding operation block timestamps for each operation block in the operation blocks. In this case, at least some of the operation blocks are executed by different processor threads (thereby causing concurrency conditions). Then, a single merged sequence list of the operation blocks is generated by sequentially sorting each operation block in the operation blocks based on its corresponding operation block timestamp. Thereafter, program states for some of the identified processor instructions are identified. This is achieved by iterative backward and forward analysis of the processor instructions included in the single sequence list of the operation blocks. Therefore, in some instances, these processes can be used to generate a single merged list to resolve some of the known concurrency problems.
[0017] In some embodiments, as part of the above-described ordering of the operation blocks, certain overlapping operation blocks are identified based on the corresponding operation block timestamps of the overlapping operation blocks, wherein the overlapping operation blocks have overlapping execution time periods. In response to determining that at least two of the overlapping operation blocks access the same memory location, and at least one of the at least two overlapping operation blocks includes a write operation to the memory location, the at least two overlapping operation blocks are marked to prevent the memory location from being used to make inferences (e.g., during iterative backward and forward analysis). If the overlapping operation blocks do not include a write operation to the same memory location, the merging of instructions from those operation blocks is not marked, and those operation blocks are merged into a single merged instruction sequence in an arbitrary order (relative to each other). In this regard, the disclosed embodiments can be used to help solve multi-threaded concurrency problems by generating a single merged sequence of operation blocks from different threads, including merging some of the operation blocks with concurrent operation timing in an arbitrary order in the merged sequence, and simultaneously identifying memory locations that are avoided from being used to make inferences during iterative backward and forward debugging analysis.
[0018] This Summary is provided to introduce some concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
[0019] Additional features and advantages will be set forth in the following description and will be apparent in part from the description or may be learned by practice of the teachings herein. The features and advantages of the present invention may be realized and obtained by the instruments and combinations particularly pointed out in the appended claims. The features of the present invention will become more fully apparent from the following description and the appended claims or may be learned by practice of the present invention as set forth below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to describe the manner in which the above and other advantages and features are obtained, the subject matter briefly described above will be described in more detail by reference to the specific embodiments shown in the accompanying drawings. It should be understood that these drawings depict only typical embodiments and therefore should not be considered as limiting the scope of the invention. Additional description and detailed description of the embodiments of the invention will be provided through the use of the accompanying drawings.
[0021] Figure 1 An example of an IDE (Integrated Development Environment) in which source code can be developed and displayed is illustrated.
[0022] Figure 2 Illustrated is the flow of source code that is compiled into binary / assembly code and subsequently executed as code blocks by one or more processor threads.
[0023] Figure 3 A flow chart illustrating actions associated with debugging.
[0024] Figure 4A and Figure 4B Illustrated are a sequence of processor instructions and corresponding control flow for the processor instructions, and a final recorded state for the processor instructions collected as a result of a crash or event that triggers termination of the sequence of processor instructions.
[0025] Figure 5A and Figure 5B illustrates a data inference graph populated with information obtained from backward and forward analysis of iterations of control flow and Figure 4A and Figure 4B The final recorded state information associated with the processor instruction referenced in .
[0026] Figure 6 A flow diagram of acts associated with a method for selectively avoiding making inferences during time travel debugging to mitigate memory aliasing issues is illustrated.
[0027] Figure 7 A flow diagram is illustrated that is associated with multi-threaded time travel debugging and includes actions for merging sequences of operations from different threads together.
[0028] Figure 8 An example is illustrated of code blocks executed by different threads and in which some of the code blocks include processor instructions that are executed during concurrent time periods.
[0029] Fig. 9 The diagram shows Figure 8 Another illustration of an example of code blocks of FIG. 1 and in which the code blocks are merged into a single merged sequence for debugging.
[0030] Fig.10 A flow diagram is illustrated that is associated with multi-threaded time travel debugging and includes actions for merging sequences of operations from different threads together.
[0031] Fig.11 Illustrated is a computing environment / architecture including a computer system that is included within or can be used to implement the disclosed embodiments. DETAILED DESCRIPTION
[0032] The disclosed embodiments include computer systems, methods, and hardware storage devices configured to utilize sparse hardware trace data (e.g., control flow data) in conjunction with a limited set of recorded state values to perform time travel debugging in a manner that intelligently determines when to perform debugging in a manner that avoids making inferences that may result in prohibited analysis, thereby mitigating memory aliasing and / or multi-threaded concurrency issues.
[0033] In some embodiments, a set of recorded state values corresponding to a previous execution of the application is obtained, such as from a memory dump file, or as a result of a manually triggered program stop corresponding to a breakpoint or another specified location within the code being debugged. Control flow information is also obtained from hardware trace data included in a sparse hardware trace of the previous execution of the application, the control flow information describing a sequence of a set of processor instructions executed during the previous execution of the application, but omitting detailed timestamp information for each processor instruction and / or omitting memory addresses and / or values associated with each processor instruction.
[0034] Subsequently, during the iterative backward and forward analysis of the set of processor instructions, at least some of the program states or processor states corresponding to the processor instructions are identified. The process is iterated until no newer states / values are identified, or more precisely, inferred. Additionally, during the iterative backward and forward analysis, when a memory write instruction encounters an unknown destination write address (which can cause a memory aliasing condition, for which there are multiple possible inferred locations), the iterative backward and forward analysis avoids inferring an unrecorded program state value at the unknown destination address of the memory write instruction. As a result, the expired value in the unknown memory address remains unmodified by the memory write instruction until at least a conflict associated with the unknown destination address is subsequently detected. In response to detecting such a conflict during subsequent backward / forward analysis, if the expired value in the unknown destination address is correctable, the expired value is corrected via an error correction technique. However, if the expired value is not correctable, an indication is provided to indicate that the expired value cannot be corrected and will therefore not be further used for inference during forward and backward analysis.
[0035] By implementing time travel debugging in this manner, it is possible to identify a greater number of values for processor instructions than would be possible if all unknown memory locations were ignored (or avoided from being used) in debug analysis, while still providing a solution that is scalable by not inferring all possible options for unknown memory locations. This is a technical benefit for improving the way time travel debugging with sparse hardware traces can be achieved, and can be used to address technical issues with memory aliasing that occurs during debugging with sparse hardware traces.
[0036] The disclosed embodiments may also be used to address technical issues of concurrency associated with time travel debugging for multi-threaded / processor scenarios. For example, in some embodiments, a set of recorded state values corresponding to a previous execution of an application is obtained (e.g., in response to a dump or a developer-triggered event). Additionally, sparse hardware trace data including control flow information is obtained together with sparse timestamp data, the control flow information being for operation blocks of processor instructions executed during a previous execution of the application, the sparse timestamp data indicating at least one timestamp for each operation block, but not including a timestamp for each processor instruction in the operation block.
[0037] Then, a single merged sequence list of the operation blocks is generated by sequentially sorting each of the operation blocks based on the corresponding operation block timestamps. At least some of the operation blocks executed during the concurrent time period are sequenced in an arbitrary order based on determining that the operation blocks do not include any write instructions to the unknown memory.
[0038] Thereafter, program states for at least some of the identified processor instructions are identified by performing iterative backward and forward analysis of the processor instructions included in the single merged sequence list of the operation block.
[0039] When a concurrently executed block of operations is discovered where at least one processor instruction for that block of operations includes a write to an unknown location (as discovered during backward / forward analysis), that block of operations is marked so that it (or its particular write operations) is not used to make inferences for any values inferred during backward / forward analysis of the merged sequence of operations.
[0040] By implementing time travel debugging in this manner, a greater number of possible values for processor instructions can be identified than if all unknown memory locations were ignored in the analysis (or their use was avoided), while still providing a scalable solution by not inferring all possible options for unknown memory locations and without inferring all possible sequences of operations for multi-threaded operations. This is a technical benefit for improving the manner in which time travel debugging with sparse hardware traces can be implemented, and can be used to address technical issues of memory aliasing and multi-threaded concurrency that occur during debugging with sparse hardware traces for applications executed with multiple processors / threads.
[0041] Note that now Figure 1 , Figure 1 An example of an IDE (Integrated Development Environment) is illustrated in which a developer may develop and analyze code, such as example code 100 , which may be written in a variety of different programming languages.
[0042] Figure 2 The code, also referred to as source code 200, is illustrated as being compiled into binary or assembly code 205. The assembly code 205 is then executed by one or more processors as a sequence of processor instructions 210 to implement the functionality of the application described in the code. Note that each of the illustrated code blocks (e.g., code block A - code block E, and ellipsis 215 indicates that there may be any number of code blocks) may each include multiple individual processor instructions.
[0043] During operation, processor instructions are logged using, for example, tracing, which reflects information identifying the type of instruction being implemented, and sometimes a timestamp and / or memory location associated with the processor instruction. These types of tracing can be logged as a software solution to be referenced at a later time for debugging. However, the more information collected as part of the trace, the more expensive the trace becomes. In practice, it is computationally too expensive to generate a heavyweight trace that logs every state of every register of all processor instructions that will be executed during the operation of the application.
[0044] Therefore, some systems avoid creating and storing a complete trace. Instead, some systems trace a more limited set of execution information (e.g., using hardware tracing as opposed to software tracing), and infer state values through a process known as time travel debugging. In such instances, the system references a known state of the program (such as may be obtained during a crash dump), and then uses this initial known information to extrapolate previously unknown state values.
[0045] For example, this is illustrated in Figure 3 . As shown, the system can obtain a set of recorded values corresponding to a previous execution of the application (action 305). The set of recorded values may include the final state of the application, for example, as reflected in a core dump file resulting from an unexpected crash. In some other embodiments, recorded values can be obtained from the program in response to a collection event selected by an intentional user, such as a current value / recorded value that a developer selects for a program at a breakpoint, or other instances in the source code of a program that has been executed or is being executed.
[0046] The system also obtains control flow information for a set of processor instructions that were executed during a previous execution of the application (act 310). The control flow information may be obtained from a thin / sparse hardware trace (e.g., such as PT (Processor Trace)) or any other processor trace that omits values for a plurality of different memory locations, and possibly also omits timestamps for each processor instruction in the identified preceding set of processor instructions. The set of instructions may also include any number of instructions prior to the "final" recorded state of the program, as identified from a dump file or a user-triggered event for collecting the recorded values.
[0047] However, in some instances, a trace (even if sparse) may not include a complete set of control flow information for all processor instructions prior to a final, recorded state. For example, recording of a trace in a ring buffer may effectively limit the number of instructions and corresponding control flow information that may be recorded to a fixed-size ring buffer. In other instances, a trace includes hardware trace data (i.e., sparse data as opposed to the large amounts of data used in conventional time travel debugging) that spans all or a substantial portion of an application's execution and is stored in a large repository such that the trace is a complete set of control flow information prior to a final, recorded state of the program.
[0048] Then, using this final recorded state information, and the control flow information obtained from the sparse trace, the system identifies state information for at least some of the preceding processor instructions by performing an iterative backward and forward analysis of the processor instructions (action 315). The process includes identifying instructions for a previous and unknown state of the program (e.g., register values, memory values, memory addresses, etc.) to extrapolate what the state was likely to be prior to the execution of the previous instruction. By way of example, if the known state value for memory location (A) is 4 (e.g., at the time of a memory dump file or breakpoint, the known final state value is 4), but the previous value at the memory location (A) is unknown, it is possible to extrapolate, infer, or derive the value by examining previous instructions in the trace. For example, if such an instruction is an instruction to increase the value at memory location (A) by 1, it can be inferred / extrapolated that the previous state value at the memory location is 3. In some cases, to infer state values, the iterative backward and forward analysis iteratively steps back 1 instruction step, 2 instruction steps, 3 instruction steps, 4 instruction steps, or more, and then iteratively steps forward 1, 2, 3, 4 (or more) instruction steps to infer state values. In this regard, the iterative backward and forward analysis may travel backward and forward in time any number of processor steps in attempting to derive / infer state values.
[0049] As indicated above, once the processor instructions are traversed (reverse) to identify one, some, or all possible values, the system can then traverse the processor instructions forward to infer new states, which may have been unknown and can now be resolved using the inferred information. This backward / forward debugging process can continue until all values are known and / or until the system is no longer able to resolve unknown values.
[0050] Unfortunately, if there are a large number of unknown values (such as often occurs when utilizing sparse hardware tracing), then as previously described, the problem of memory aliasing can occur. For example, if an instruction is to read or write a value to a specific address (which is unknown), it is impossible to infer / extrapolate what that address will be in all cases (even when referencing previous instructions). To address this problem, some systems infer and track all possible address locations. However, this exponential analysis is not scalable and may crash the debugger before resolving to a large number of unknown values. Other systems ignore all unknown values during the extrapolation process and resolve only those values that are obviously unknown. However, a large number of unknown values can also cause the system to be non-scalable because it is not actually able to make enough inferences to provide a practical debugging solution.
[0051] Some of the currently disclosed embodiments provide a solution that selectively ignores some unknown values corresponding to write instructions while still inferring other unknown values to thereby solve the memory aliasing problem. Figure 4A-Figure 6 Let’s discuss this in more detail.
[0052] Figure 4A-4B 4. The diagram illustrates a sequence of individual processor instructions (A, B, C, D, E, F, G, and H), or alternatively blocks of instructions, ordered in a sequence of instructions 400 that are executed 405 by the processor during operation of the program. As also shown in this example, the final execution (or attempted execution) of processor instruction H corresponds to a crash or triggering event at which point the final recorded state 415 of the program (see Figure 4B ) is logged. The final recorded state 415 may include a core dump file. Alternatively, the final recorded state 415 may include a log corresponding to a breakpoint or other location specified by a user in the source code and obtained during the execution of the program.
[0053] The instruction sequence is also associated with control flow 420 identified by sparse hardware trace (see Figure 4B ) corresponding to the state of each processor instruction (e.g., instruction A, B, C, D, E, F, G, or H). In particular, the sparse trace omits at least some timestamps and / or memory locations corresponding to the state of each processor instruction (e.g., instruction A, B, C, D, E, F, G, or H). The control flow 420 maintains information indicating the branches of the source code during execution, and this information may not be a simple sequential process as the execution 405 of instructions A, B, C, D, E, F, G, and H would appear or appear. The control flow 420 also identifies the type of processor instructions that were executed, but the actual state values of those instructions (e.g., memory locations and the values in those locations) are not recorded or included in the control flow 420 or the recorded state 415 for each instruction.
[0054] In order to debug a program effectively, a developer will need to evaluate the instructions that caused a specific result (e.g., a crash, a specific value to be set, etc.). This may require analyzing the processor instructions in the source code that preceded the "specific result", and the resulting state of each of these instructions. However, when relying only on recorded state 415 and control flow 420 from sparse tracing, there are many unknown states. Therefore, it is necessary to resolve as many unknown state values as possible to make the debugging process effective.
[0055] One way to resolve unknown state values based on control flow information and the final recorded state of the program is to generate and parse / populate a data inference graph that identifies different execution time sequences for preceding processor instructions identified in the control flow, and the corresponding processor state for each of those instructions, based on inferences derived from the final recorded state and backward / forward analysis.
[0056] Figure 5A An example of a data inference graph 500A is illustrated, which is used to identify a processor state for a processor that is Figure 4B The control flow 420 and recorded state 415 information shown in FIG. Figure 4A The inference graph 500A corresponds to an execution 405 of the instruction sequence 400. The inference graph includes register states / values that exist for each processor instruction in the instruction sequence 400. For example, the first row in the data inference graph 500A corresponds to the execution of processor instruction A at relative execution time T1. Similarly, the second row corresponds to the execution of processor instruction B at relative execution time T2, the third row corresponds to the execution of processor instruction C at relative execution time T3, the fourth row corresponds to the execution of processor instruction D at relative execution time T4, the fifth row corresponds to the execution of processor instruction E at relative execution time T5, the sixth row corresponds to the execution of processor instruction F at relative execution time T6, the seventh row corresponds to the execution of processor instruction G at relative execution time T7, and the eighth row corresponds to the execution of processor instruction H at relative execution time T8 and includes state information that is obtained from the recorded state 415 associated with the final execution or attempted execution of processor instruction H.
[0057] Note that the execution times (T1-T8) are relative times, as the control flow 420 (in some cases) may not maintain this actual information for each processor instruction. However, for some embodiments (as discussed below), the timestamps are known and are code block timestamps associated with different code blocks, such as if the illustrated instructions (e.g., A, B, C, D, E, F, G, and H) of the instruction sequence 400 include actual code blocks.
[0058] Returning now to data inference graph 500A, note that in this example scenario there are four different columns of information that can be determined for each processor instruction. However, this example is illustrative and not limiting. Therefore, it will be understood that data inference graph 500A may include many more columns of information (or fewer columns of information) that correspond to different processors and memory locations and are collectively referred to herein as state values, which are associated with the processor state of the processor executing the program. These state values may include register values (e.g., values at register A, register B, etc.) and various address values (e.g., addresses corresponding to global variables, buffers, etc.). In some instances, the state values may also include a timestamp (not shown).
[0059] Figure 5B Illustrated is a data inference diagram 500A ( FIG. 5B ) based on the deduction / inference achieved through the iterative backward 510 and forward 520 analysis described above. Figure 5A ) can be parsed or filled.
[0060] It will be understood that during this analysis, the Figure 5B Inferring new state data of the more populated data inference graph 500B is an iterative process that may involve various traversals of the control flow, starting with only the actual state values obtained in the recorded state 415 for each of the different processor instructions identified in the recorded state 415, which is obtained from a core dump file or other extraction process and is based on the control flow instruction information. For example, in some instances, the debugger traverses 510 control flow information backwards from beginning to end (e.g., from T8 to T1 in time), using the initial limited information provided from the final state values (i.e., those recorded in row T8) to infer / determine any possible new values in the data inference graph that it can infer / determine.
[0061] The analysis also traverses the control flow forward in the forward 520 direction, using the control flow information and the newly inferred values to identify more new values that were not inferred / determined in the backward 510 processing. This process can be continuously repeated, iteratively alternating between forward analysis and backward analysis, until no new state values are discovered, and / or until a predetermined time has passed, and / or until a predetermined number of iterations have occurred.
[0062] In some instances, during backward / forward analysis, the debugger identifies a write operation to an unknown destination address. For example, in the current example, instruction D (corresponding to execution time T4) may cause a write operation to a buffer with an unknown address. In such an instance, the debugger ignores or leaves the state as an out-of-date value (regardless of what it was before), rather than trying to infer the actual value of the address (and / or tracking all possible options). For example, in this case the out-of-date value of the corresponding buffer destination address is abstractly represented as a value (X), which is the same value that existed at the time of the dump file (e.g., execution time T8), but it is an unknown destination address.
[0063] During backward analysis 510, this value (X) is propagated upward in data inference graph 500B (as a stale value) due to control flow information 420 specifying instructions at execution times T5, T6, T7, and T8 that leave the destination address unmodified (according to the current example). Unless and until a write operation to the unknown destination address is detected in the control flow information, the stale value can be used to make inferences.
[0064] Then, in response to detecting an instruction in control flow 420 to write to the unknown destination address (e.g., corresponding to code block D, writing to a buffer at execution time T4), the value (X) for the destination address is locked and prevented from being used to make further inferences in iterative backward and forward analysis unless and until a conflict is later discovered for the same address location (X). This is reflected by the "????" in cell 530 and the first three boxes of the buffer column, as no further inferences are made for the destination address. Later, however, if a conflict is discovered, such as another instruction writing to the same unknown destination address (e.g., to the destination address of the buffer at execution time T4), the system will resolve the conflict and determine which value should be used.
[0065] Various heuristics, including additional analysis of processor instructions and other information identified in control flow 420, may be used to select between two conflicting values (one of which is an expired value) to determine which value is more appropriate. If, for example, a conflicting instruction for a destination address is found that specifies the destination address as value Y, and (due to heuristics and other analysis) determines that the Y value is more correct than the expired X value, then the value Y is used to fill the corresponding cell 530 because the unknown value is determined to be more correct. Alternatively, (in other cases) it may be determined that the value is more correct because, based on other instructions in the control flow, the instructions associated with the Y value may not be conditional and may be ignored or indeterminate. In these instances, the value X may be determined to be correct and unlocked for further inference.
[0066] In some instances, the stale value is correctable and is corrected by recovering the unknown destination address from other information accessible to the system (e.g., other control flow information obtained from another instruction, other IDE information, other stored state information, in response to user input, etc.), and then using the recovered unknown destination address to infer the actual value of the stale value.
[0067] In other instances, there is not enough information available to resolve the conflict for the locked expired value to a threshold degree of certainty, and cause it to remain uncorrectable. In such instances, the value remains locked from further inferences, and may be marked in an inference table to prevent further inferences from the unknown value. In some instances, this may simply include ignoring the memory write instruction.
[0068] While this may limit the total number of inferences that can be made for the data inference graph, it still allows some inferences to be made by selectively locking destination address values from being used to make inferences only when there are detected write operations for those destination addresses that are unknown. The technique further allows, when a conflict is later discovered and in response to resolving the conflict, some of the locked values to be unlocked to make further inferences.
[0069] Note reference Figure 6 , Figure 6 Illustrated is a flow chart 600 of various memory aliasing operations including actions associated with handling memory aliasing that may occur when performing reverse debugging based on control flow information and sparse hardware trace data.
[0070] As shown, the first action illustrated is the action of encountering a memory write processor instruction during the backward and forward analysis of the iterations of time travel debugging (act 610). The memory write instruction is included in a set of processor instructions obtained from the control flow information in the sparse hardware trace, the set of processor instructions being executed during a previous execution of the application, the previous execution of the application being timing relative to the recorded core dump file state information (or other extracted recorded state information) obtained for the program. The write instruction is also an instruction to an unknown destination address.
[0071] In the disclosed embodiment, the debugging system is performing iterative backward and forward analysis of values to populate an inference graph. However, in response to detecting a memory write instruction to an unknown destination address (act 610), the system avoids making any inferences using the unrecorded program state value at the unknown destination address corresponding to the write instruction (act 620). This causes the stale value in the unknown destination address to remain unmodified by the memory write instruction to the unknown destination address during the iterative backward and forward analysis unless and until a conflict is detected that is also associated with the unknown destination address.
[0072] Then, in response to detecting such a conflict, the outdated value in the unknown destination address is corrected if it is correctable, or alternatively, remains uncorrected if it is not correctable (act 630). The value is correctable if other heuristics or other information in the control flow can be used to ascertain what the value should be. For example, this may be caused by checking for another write operation that specifies an address for the unknown destination address.
[0073] Note that now refer to Figure 7 , which illustrates embodiments related to resolving concurrency issues associated with multi-threaded debugging.
[0074] Figure 7 A flowchart 700 of actions associated with concurrent operations is illustrated, which actions are related to an embodiment for generating a merged sequence list that can be used to perform time travel debugging of multi-threaded processes. These multi-threaded processes can include multiple threads associated with the operation of a single application being processed on a single processor, or different threads being processed on a multi-core processor or multiple processors.
[0075] When the system crashes and provides a dump file of the final recorded state, or when the operator selects a selection point for obtaining the final recorded state of the program at the selection point, various hardware trace data before the final recorded state can be obtained to perform debugging using the recorded state information. In some instances, as previously described, the hardware trace data includes thin / sparse hardware trace data that specifies control flow information for operation blocks of processor instructions executed during a previous execution of the application. In some instances, such as multi-threaded process embodiments, the control flow information includes multiple different operation / code blocks associated with multiple different threads. In such instances, the control flow information also includes at least one operation block timestamp for each block, but does not include separate timestamps for each processor instruction within each block.
[0076] In some instances, the thin hardware trace data may be identified (act 710) when it is obtained from the remote system corresponding to a crash of the remote system. In other instances, the thin hardware trace data is identified (act 710) by an IDE in which an operator selects a breakpoint / selection point from which to begin analysis, and the IDE identifies processor instructions prior to the selection point at which the selected / final recorded state of the program is identified.
[0077] Once thin hardware trace data is obtained from one or more hardware traces (act 710), and the thin hardware trace data includes multiple different operation blocks associated with different threads, those operation blocks are merged into a single merged sequence (act 720). In some examples, the ordering of the operation blocks in the single merged sequence is based on an operation timestamp associated with each operation block. The operation timestamp can be a timestamp corresponding to the first instruction operated within each corresponding operation block, or another timestamp. The timestamp can also be an actual time, a cycle count, or any other relative timestamp measurement that can be used to distinguish relative operation times between different operation blocks.
[0078] Once the single merged sequence list is generated (act 720), it is used to perform the aforementioned time travel debugging (act 730) with iterative backward / forward analysis, and may also include selectively locking certain values from being used to make inferences during the iterative backward / forward analysis. More specifically, the process includes identifying (e.g., deducing / inferring) a specific program state at a corresponding time of execution, the specific program state at the corresponding time of execution being for each of at least some of the following processor instructions: these processor instructions were executed during a previous execution of the application (as identified in a single sequence list of different sparse thread traces) and were not previously recorded in control flow information obtained directly from separate thread traces.
[0079] Figure 8 An embodiment is illustrated showing three different traces corresponding to three different threads executed during operation of an application. A first thread (Thread 1) is associated with the execution of code blocks A, B, and C. Thread 2 is associated with the execution of code blocks D and E. Thread 3 is associated with the execution of code blocks F and G. Each of these code blocks (AG) is associated with a plurality of separate processor instructions executed during operation of a single application. In the current embodiment, each of these code blocks (and its corresponding processor instructions) is identified from control flow information recorded in the thin / sparse hardware trace described above.
[0080] In the current multithreaded embodiment, such as applied to the current example, during the operation of the corresponding application, the code blocks are executed by separate threads, either on the same processor or on different processors. Hardware timestamps 800 associated with different code blocks (AG) can also be obtained from the control flow information (e.g., as obtained from sparse thread tracking). The operation block timestamp can be the timestamp of the first instruction processed within each corresponding operation / code block (e.g., TS 0 for code block A, TS 4 for code block D, etc.). The timestamp can also be an actual time, a cycle count, or any other relative timestamp measurement, which can be used to distinguish the relative operation time between different operation blocks.
[0081] At least one timestamp (and, sometimes, multiple timestamps) for each code block (AG) may be identified. In some instances, this includes identifying some, but not all, timestamps for all processor instructions included within each code block, making it impossible to (deterministically) determine the actual execution order of different processor instructions present within the code blocks when those code blocks are executed concurrently. By way of example, code blocks C and G are in Figure 8 In an embodiment of , code block C and code block G are executed concurrently, and it is unknown which processor instructions within code block C are executed before / after the individual processor instructions contained in code block G because execution appears to start at the same time (e.g., at execution time TS 22). This scenario represents a concurrency problem because it is impossible to ascertain ordering information, which is typically necessary to perform speculative time travel debugging using a merged list of different processor instructions.
[0082] Notwithstanding the foregoing, the present embodiments are still able to build a merged list of useful processor instructions by selectively determining when to arbitrarily order processor instructions and code blocks that can be used to make inferences during iterative backward / forward analysis, and when to mark instructions / code blocks to avoid their use for making inferences in iterative backward / forward analysis.
[0083] To illustrate the foregoing, note that reference is now made to Fig. 9 , Fig. 9 A list 900 of merged sequences of processor instructions is shown, the list being based on instructions for Figure 8 The sparse hardware trace of the threads associated with the code block (AG) obtains the ordering information (eg, operation timestamps).
[0084] Note that in the current embodiment, when determining that there is no write operation to the same address location in one code block in the code blocks of concurrent operation and another code block in the code blocks of concurrent operation, the operation / block executed concurrently in the merge sequence 900 of operation can be made to any order.For example, code block A, code block D and code block F are operated concurrently, with at least some processor instructions overlapping in time.Because it is determined that there is no code block in these code blocks (code blocks A, D or F) with instructions for the memory location identical to the memory location referenced by another code block in the code blocks (code blocks A, D or F) overlapping concurrently, they can be written into the merge sequence 900 in any order.Here, code block D is listed before code block F, although at least one operation timestamp associated with code block F appears to start before code block D.In this regard, the order of the operations executed concurrently can be irrelevant.(For example, code block F can be positioned before code block A, for example).
[0085] In such an embodiment, when the ordering of the concurrently executed blocks is not relevant, the ordering of the individual processor instructions for each operation block may be maintained together as a single contiguous list of instructions within the merged sequence of instructions 900, or alternatively, intermixed with processor instructions from another operation block in the concurrently executed operation blocks in the merged sequence of instructions 900 (not presently shown).
[0086] In some embodiments, the earliest operation timestamp associated with any concurrently executed operation blocks is used to control the sequential ordering within the merged list, so that code block F would be sequenced before code block D, even though the ordering is irrelevant. In some other embodiments, the last operation timestamp of the concurrently executed operation blocks is used to order the processor instructions / blocks within the merged sequence list 900 of instructions.
[0087] Likewise, when there is no overlap or concurrency between operations / code blocks, the operation blocks are ordered in the merged sequence of instructions 900 according to the relative operation timestamps of the different operation blocks. For example, this is shown with code block B being positioned before code block E in the merged sequence of instructions 900.
[0088] In some instances, the ordering of concurrently executed operation blocks may be relevant and may trigger selective marking of the operation blocks to avoid use during speculative time travel debugging analysis using a merged order list of processor instructions. For example, both code block C and code block G utilize separate processor instructions in their respective code blocks to access the same memory location. One of those processor instructions may also include a write instruction. In such an instance, code block C and code G may be relevant, have some interdependency, and cannot be resolved using a simple operation block timestamp.
[0089] Thus, in the current example, code block C and code block G are marked to prevent them from being used in inferring any values based on the state values of their processor instructions during backward / forward analysis of iterations of the merged sequential list. More specifically, control flow information for code block C and code block G obtained from the sparse hardware traces of thread 1 and thread 3 will be marked during construction of the data inference graph of merged sequential list 900, and will not be used to make inferences about corresponding state data within the data inference graph, similar to marking and ignoring the use of values associated with write operations to unknown addresses (e.g., as described in reference to FIG. 1 ) during backward / forward analysis of the previous iterations. Figure 5B This would avoid the potential of having to apply an exponentially growing analysis during the inferential analysis step, which would otherwise need to be performed to consider all possible ordering scenarios for all potentially in-order critical operations.
[0090] Although this selective ordering and selective use of control flow information for blocks of code for multi-threaded operations may limit the number of inferences that can be made during debugging, the use of this type of selective ordering of control information can provide significant scalability for time travel debugging for multi-threaded operations by limiting the total number of unknown inferences that must be tracked (which could otherwise be exponential and overwhelm / crash the debugger) while still enabling a large number of inferences to be made.
[0091] Fig.10 Flowchart 1000 of concurrency operations, such as described above, is illustrated that may be used to selectively identify locked values that are not used for speculative debug analysis.
[0092] As shown, the first step involves identifying overlapping operation blocks having overlapping execution time periods based on the corresponding operation block timestamps of the operation blocks (act 1010). Fig. 9 , which may include determining that code block C has an operation block timestamp of 22-24, which overlaps with the same operation block timestamp of code block G, for example, meaning that they were executed with concurrent time periods.
[0093] Next, in response to determining that at least two of the overlapping blocks of operations access the same specific memory location, and at least one of those two overlapping blocks of operations includes a write instruction, the memory values from the overlapping blocks of operations are marked to avoid their use in the speculative backward / forward analysis described above (action 1020). It will be appreciated that this may include marking the entire blocks of operations, or only marking specific operations in those blocks of operations, and / or values associated with the specific memory location.
[0094] Next, in response to identifying those operation blocks that have been marked (act 1030) (e.g., operation blocks with marked memory values), a determination is made as to whether the order for those blocks is determinate or indeterminate (act 1040). For example, the determination may be made based on other attributes within the operation blocks, or other attributes of control flow information obtained from a sparse hardware trace for the corresponding thread. In some instances, for example, instructions in the operation blocks may specify interdependencies between processor instructions from different code blocks, the interdependencies reflecting the relative ordering of the operation blocks and / or processor instructions within each of the processor blocks.
[0095] If relative ordering information for concurrent operation blocks (particularly marked operation blocks) can be determined from additional attributes and information for different operation blocks (e.g., information other than the first operation block timestamp), then according to the relative ordering information, the marked operation blocks (e.g., blocks with marked memory values) are sequenced / ordered within the merged sequence of instructions 900. In some examples, this also includes un-marking the operation blocks (e.g., un-marking the memory values for the blocks), once those blocks are properly ordered so that they can be considered for making inferences during the iterative backward / forward analysis described earlier.
[0096] Otherwise, if the ordering of the marked operation blocks (e.g., blocks with marked memory values) is still uncertain after analyzing other attribute information (e.g., information other than just the operation block timestamps), then the memory access instructions for these operation blocks remain marked so as not to be used for making inferences during iterative backward / forward analysis. As indicated above, this can include marking only specific instructions or values within the marked operation blocks that correspond to specific memory locations, while enabling other instructions / values within the marked operation blocks to be used for making inferences. In some alternative embodiments, this involves marking an entire operation block or a collection of instructions within a block to prevent any of its instructions / values from being used for making analysis during backward / forward analysis.
[0097] From the foregoing it will be appreciated that the disclosed embodiments bring many substantial benefits to both how applications are debugged (particularly applications that have already been deployed) and how computer systems operate. More specifically, the embodiments improve debugging techniques because they can be used to resolve both memory aliasing problems, where write instructions are to unknown destination addresses (as a result of having only a limited amount of state information during time travel debugging), and concurrency problems, where lightweight hardware tracing data (e.g., control flow information) is collected for multiple different threads. Both the state values and control flow information of the state records corresponding to the previous execution of the application are obtained. By practicing the disclosed principles, developers are provided with substantially more information when debugging deployed applications. In addition, clients / customers will benefit because they will not need to install heavyweight tracing applications.
[0098] Because a greater amount of information is provided to developers, the operation of the underlying computer systems and applications will also be improved. For example, because the embodiments provide more robust debugging data, developers will be able to more accurately pinpoint program errors and resolve those program errors. Therefore, these operations directly and significantly improve how the computer system operates because developers will be able to better resolve application errors and other errors.
[0099] Example Computer System
[0100] Note that now the Fig.11 , Fig.11 The computer system 1100 that can be used to support the operations described herein is illustrated. The computer system 1100 can take a variety of different forms. For example, in Fig.11 , computer system 1100 may be embodied as a tablet, a desktop, a distributed system including one or more connected computing components / devices that communicate with computer system 1100, a laptop, a mobile phone, a server, a data center, and / or any other computer system.
[0101] In its most basic configuration, computer system 1100 includes a variety of different components. For example, Fig.11 Computer system 1100 is shown including at least one processor 1105 (aka “hardware processing unit”) and storage device 1110 .
[0102] Memory 1210 is shown as including executable code / instructions 1115 and tracking data 1120, which represents the tracking data discussed earlier. Storage device 1110 can be physical system memory, which can be volatile, non-volatile, or some combination of the two. The term "memory" may also be used herein to refer to a non-volatile mass storage device, such as a physical storage medium. If the computer system 1100 is distributed, the processing, memory and / or storage functions may also be distributed. As used herein, the terms "executable module", "executable component", or even "component" may refer to a software object, routine, or method that can be executed on the computer system 1100. The different components, modules, engines, and services described herein may be implemented as objects or processors executed on the computer system 1100 (e.g., as separate threads).
[0103] The disclosed embodiments may include or utilize a special purpose or general purpose computer, including computer hardware such as, for example, one or more processors such as processor 1105 and system memory such as storage device 1110, as discussed in more detail below. The embodiments also include physical and other computer-readable media for carrying or storing computer-executable instructions and / or data structures. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer system. Computer-readable media that store computer-executable instructions in the form of data are physical computer storage media. Computer-readable media that carry computer-executable instructions are transmission media. Thus, by way of example and not limitation, the present embodiments may include at least two distinct kinds of computer-readable media: computer storage media and transmission media.
[0104] Computer storage media are hardware storage devices such as RAM, ROM, EEPROM, CD-ROM, RAM-based solid-state drives (SSD), flash memory, phase-change memory (PCM), or other types of memory, or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other media that can be used to store desired code means in the form of computer-executable instructions, data or data structures and that can be accessed by a general or special purpose computer.
[0105] The computer system 1100 may be connected to (multiple) remote systems via one or more wired or wireless networks 1125, the remote system(s) being configured to perform any of the processes described with respect to the computer system 1100. A "network" is a network that is configured to perform any of the processes described with respect to the computer system 1100. Fig.11The network 1125 shown in is defined as one or more data links and / or data switches, which make it possible to transmit electronic data between computer systems, modules and / or other electronic devices. When information is transmitted or provided to a computer through a network (or hardwired, wireless, or a combination of hardwired and wireless), the computer will properly regard the connection as a transmission medium. Computer system 1100 will include one or more communication channels used to communicate with network 1125. Transmission media includes a network, which can be used to carry data or desired program code in the form of computer executable instructions or data structures. In addition, these computer executable instructions can be accessed by general or special computers. The above combination should also be included in the scope of computer-readable media.
[0106] In response to arriving at various computer system components, program code means in the form of computer readable instructions or data structures can be automatically transferred from transmission media to computer storage media (or vice versa). For example, computer readable instructions or data structures received over a network or data link can be buffered in RAM within a network interface module (e.g., a network interface card or "NIC") and then ultimately transferred to computer system RAM and / or less volatile computer storage media outside the computer system. Thus, it should be understood that computer storage media can be included in computer system components that also (or even primarily) utilize transmission media.
[0107] Computer executable (or computer interpretable) instructions include, for example, instructions that cause a general-purpose computer, a special-purpose computer, or a special-purpose processing device to perform a function or group of functions. Computer executable instructions can be, for example, binary, intermediate format instructions (such as assembly language), or even source code. Although the subject matter has been described in a language specific to structural features and / or method actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the features or actions described above. Instead, the described features and actions are disclosed as example forms of implementing the claims.
[0108] Those skilled in the art will appreciate that embodiments may be practiced in a network computing environment with many types of computer system configurations, including personal computers, desktop computers, laptop computers, message processors, handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile phones, PDAs, pagers, routers, switches, etc. Embodiments may also be practiced in a distributed system environment, in which local and remote computer systems linked through a network (or by a hardwired data link, a wireless data link, or a combination of a hardwired link and a wireless data link) each perform tasks (e.g., cloud computing, cloud services, etc.). In a distributed system environment, program modules may be located in both local and remote memory storage devices.
[0109] Additionally or alternatively, the functionality described herein may be performed at least in part by one or more hardware logic components, such as processor 1205. For example, but not limitation, illustrative types of hardware logic components that may be used include field programmable gate arrays (FPGAs), program-specific or application-specific integrated circuits (ASICs), program-specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), central processing units (CPUs), and other types of programmable hardware.
[0110] The present invention may be embodied in other specific forms without departing from the spirit or characteristics of the present invention. The described embodiments are considered to be illustrative and not restrictive in all respects. Therefore, the scope of the present invention is indicated by the appended claims rather than the foregoing description. All changes within the equivalent meaning and scope of the claims are included within their scope.
Claims
1. A computer system comprising: one or more processors; as well as one or more computer-readable hardware storage devices having computer-executable instructions stored thereon, the computer-executable instructions being executable by the one or more processors to cause the computer system to: Get a set of recorded state values corresponding to a previous execution of the application; identifying thin hardware trace data corresponding to the previous execution of the application, the thin hardware trace data comprising hardware trace data, the hardware trace data comprising: (1) control flow information for a plurality of operation blocks of processor instructions executed during the previous execution of the application; and (2) a corresponding operation block timestamp for each operation block included in the plurality of operation blocks, wherein at least some of the plurality of operation blocks are executed by different processor threads; generating a single merged sequence list of the plurality of operation blocks by sequentially sorting each operation block in the plurality of operation blocks based on a corresponding operation block timestamp of each operation block; and identifying, for each processor instruction of at least some of the processor instructions executed during the previous execution of the application, a particular program state at a corresponding execution time by performing at least backward and forward analysis of iterations of the processor instructions included in the single merged sequence list of the plurality of operation blocks; The sequential arrangement of the plurality of operation blocks comprises: At least two of the overlapping operation blocks that access the same specific memory location are identified, the overlapping operation blocks having overlapping execution time periods based on their corresponding operation block timestamps.
2. The computer system of claim 1 , wherein execution of the computer executable instructions further causes the computer system to: As part of sequentially sorting the plurality of operation blocks, identifying at least two overlapping operation blocks having overlapping execution time periods based on their corresponding operation block timestamps; and Within the merged sequence list, processor instructions for the overlapping operation blocks are arbitrarily ordered such that at least two processor instructions in the merged sequence list are ordered in a sequence different from a sequence in which the at least two processor instructions were actually executed during the previous execution of the application.
3. The computer system of claim 1 , wherein execution of the computer executable instructions further causes the computer system to: As part of sequentially sorting the plurality of operation blocks, identifying overlapping operation blocks having overlapping execution time periods based on their corresponding operation block timestamps; and In response to determining that at least two of the overlapping operation blocks access a same specific memory location and at least one of the at least two overlapping operation blocks includes a write operation, marking the specific memory location so that a value recovered from the specific memory location is not used to make inferences in backward and forward analysis of the iterations of the set of processor instructions executed during the previous execution of the application, the set of processor instructions being included in the single merged sequence list of the plurality of operation blocks.
4. The computer system according to claim 1, wherein one or more specific processor instructions included in a specific one of the multiple operation blocks are not provided with corresponding timestamps, but are grouped according to specific timestamps corresponding to the specific one of the operation blocks.
5. The computer system of claim 1, wherein processor instructions included in the same block of operations are all executed by the same thread.
6. The computer system of claim 1, wherein the single merged sequence list is scalable to accommodate any number of operation blocks.
7. The computer system of claim 1 , wherein the application is executing on a remote computer system and the set of recorded state values are received from the remote computer system, or alternatively, the application is executing on the computer system and the set of recorded state values are generated by the computer system.
8. A computer system according to claim 1, wherein a data inference graph is maintained as part of the iterative backward and forward analysis, the data inference graph being used to track how specific data values associated with specific processor instructions included in the processor instructions are inferred in both the forward direction and the backward direction of the iterative backward and forward analysis.
9. A computer system comprising: one or more processors; as well as one or more computer-readable hardware storage devices having computer-executable instructions stored thereon, the computer-executable instructions being executable by the one or more processors to cause the computer system to: Get a set of recorded state values corresponding to a previous execution of the application; identifying thin hardware trace data corresponding to the previous execution of the application, the thin hardware trace data comprising hardware trace data, the hardware trace data comprising: (1) control flow information for a plurality of operation blocks of processor instructions executed during the previous execution of the application; and (2) a corresponding operation block timestamp for each operation block included in the plurality of operation blocks, wherein at least some of the plurality of operation blocks are executed by different processor threads; generating a single merged sequence list of the plurality of operation blocks by sequentially sorting each operation block in the plurality of operation blocks based on a corresponding operation block timestamp of each operation block; As part of ordering the plurality of operation blocks: identifying overlapping operation blocks having overlapping execution time periods based on their corresponding operation block timestamps; and In response to determining that at least two of the overlapping operation blocks access the same specific memory location and at least one of the at least two overlapping operation blocks includes a write operation, the at least two overlapping operation blocks are marked.
10. The computer system of claim 9, wherein execution of the computer executable instructions further causes the computer system to: identifying the marked operation blocks, including the at least two overlapping operation blocks; and; Determine whether the ordering for those operation blocks that have been marked is deterministic or indeterminate.
11. The computer system of claim 10, wherein the ordering for those marked operation blocks is determined when other attributes of those marked operation blocks are used to order those marked operation blocks.
12. The computer system of claim 11, wherein the other attributes include additional timestamp information sufficient to determine the ordering for those marked operation blocks.
13. The computer system of claim 10, wherein execution of the computer executable instructions further causes the computer system to: For operation blocks that have been marked and whose ordering is uncertain, during backward and forward analysis of iterations of the processor instructions, using data values associated with those uncertain operation blocks to infer other data values is avoided.
14. The computer system of claim 13, wherein: As a result of avoiding the use of those data values to infer the other data values, those data values are locked from being used to infer the other data values.
Citation Information
Patent Citations
Debugging multithreaded code
CN102844744A
Runtime type identification of native heap allocations
CN103034484A
Historical control flow visualization in production diagnostics
CN107111544A
Methods and systems for first occurence debugging
US20080201613A1
Cache-based tracing for time travel debugging and analysis
US20180060215A1
