WO2002052411A9 - Computer software run-time analysis systems and methods - Google Patents

Computer software run-time analysis systems and methods

Info

Publication number
WO2002052411A9
WO2002052411A9 PCT/US2001/048019 US0148019W WO02052411A9 WO 2002052411 A9 WO2002052411 A9 WO 2002052411A9 US 0148019 W US0148019 W US 0148019W WO 02052411 A9 WO02052411 A9 WO 02052411A9
Authority
WO
WIPO (PCT)
Prior art keywords
frace
program
run
trace
function call
Prior art date
Application number
PCT/US2001/048019
Other languages
French (fr)
Other versions
WO2002052411A1 (en
Inventor
Britt Yenne
Dave Burton
Original Assignee
Veritas Operating Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Veritas Operating Corp filed Critical Veritas Operating Corp
Publication of WO2002052411A1 publication Critical patent/WO2002052411A1/en
Publication of WO2002052411A9 publication Critical patent/WO2002052411A9/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/348Circuit details, i.e. tracer hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/465Distributed object oriented systems

Definitions

  • the present invention generally relates to computers and software operating on computers and, more particularly, relates to systems and methods for tracing, including recording and analyzing, the execution of software programs in real-time, dynamic and runtime operations.
  • Debugging is typically a time consuming step in software development which is undertaken prior to wide release or use of the program.
  • the aim in debugging with conventional debug tools has been to detect and remedy errors before software has been distributed to end-users for use in applications.
  • bugs uncovered in release versions of programs are not remediable by the end-user of the program, particularly in software distributed only in object code or other run-time versions. Developers have relied on reproducing reported bugs in the lab and on end-user descriptions and explanations of bug incidences in order to understand and fix the bugs.
  • Run-time versions of software programs such as compiled and executable object code applications, have typically been equipped to provide only minimal run-time failure messages and identifiers.
  • a run-time fault in a common application program usually yields only an "error” or "exception” message that can, but does not necessarily, also include a classifier or indicator of the source or location at which the fault results.
  • These messages produced on fault of the typical run-time application are often not very helpful to the user or developer to analyze and determine the source of or reason for the fault.
  • the error messages merely indicate the point of the program at which the fault or bug causes the entire program to cease operations. This point may or may not be the true source of the bug or other fault, and it is often problematic and cumbersome to attempt to trace back through software code to determine the true source from the limited knowledge afforded by the run-time error message.
  • An embodiment of the invention is a pre-processor for processing a program that includes at least one function call.
  • the pre-processor includes a code expander for detecting the at least one function call of the program, at least one trace hook call, and an inserter, communicably connected with the code expander and the at least one trace hook call, for inserting the at least one trace hook call in the program relative to the at least one function call.
  • Another embodiment of the invention is a method of pre-processing a program that includes at least one function call.
  • the method includes detecting the at least one function call of the program and associating at least one trace hook call with the at least one function call.
  • Yet another embodiment of the invention is a run-time tracer.
  • the run-time tracer includes a data processor, a memory communicatively connected to the data processor, a software program operating on the data processor, having at least one trace hook call associated with at least one function call of the program, and a trace id stored in the memory, that identifies the at least one trace hook call, associated with the at least one function call of the program.
  • Another embodiment of the invention is a shared memory for run-time tracing.
  • the shared memory is communicatively connected to a dedicated memory.
  • An executable program includes a function call to a function routine.
  • the embodiment also includes a trace id corresponding to and identifying the function call.
  • An address of the shared memory corresponds to an offset of an address of the dedicated memory.
  • a state at the address of the shared memory is the same as a state at the address of the dedicated memory.
  • a further embodiment of the invention is a method of run-time tracing.
  • the method includes processing a data, storing the data in a first memory, programming the step of processing to perform a function routine, so that at least one frace hook call is associated with at least one function call of the function routine, and storing a trace id in a second memory, the frace id serving to identify the at least one trace hook call.
  • Another embodiment of the invention is a method of sharing memory for run-time tracing.
  • the method includes executing a program.
  • the program includes a function call to a function routine and a frace id corresponding to and identifying the function call.
  • the method also includes addressing the shared memory at an offset of an address of a dedicated memory and replicating a state of the dedicated memory in the shared memory as dictated by the step of addressing.
  • FIG. 1 illustrates a computer for creating an executable compiled program for runtime tracing, including a frace parser for incorporating trace points in a code of the program and in the executable compiled program, according to embodiments of the present invention
  • FIG. 2 illustrates a method of creating the executable compiled program via the computer of FIG. 1, according to embodiments of the present invention
  • FIG. 3 illustrates a computer for executing the executable compiled program and thereby performing the run-time tracing, according to embodiments of the present invention
  • FIG. 4 illustrates a method of executing the executable compiled program via the computer of FIG. 3, according to embodiments of the present invention
  • FIG. 5 illustrates a system including a trace database operating in conjunction with a frace compiler, a snap output, and a reporter, for reporting of trace information obtained in run-time execution of an executable compiled program having trace points, according to embodiments of the present invention
  • FIG. 6 illustrates a method of creating a frace database of trace information, including trace identifiers (id's) corresponding to frace points of an executable compiled program, the frace points invoke function routines of the code language of the program, according to embodiments of the present invention
  • FIG. 7 illustrates a run-time memory, including a dedicated memory and a shared memory, accessible by the executable compiled program of FIG. 3 in the method of FIG. 4, for capturing frace information during run-time of the program, according to embodiments of the present invention.
  • FIG. 8 illustrates the memory of FIG. 7, wherein there are multiple instances of runtime execution of the executable compiled program, and the operations therewith of the memory, both the dedicated memory and the shared memory, , according to embodiments of the present invention;
  • FIG. 9 illustrates a trace channel of a shared memory for run-time tracing during execution of an executable compiled program, configured as a circular buffer allowing overwrite of entries of the channel in a first in, first out arrangement, according to embodiments of the present invention; and
  • FIG. 10 illustrates a tracing system, including frace compile, frace database, compiled program execution, runtime frace confrol, frace channel sharing, snap of frace channel contents, and reporting of frace ids and frace information of occurrences at runtime via interrelatedness of the frace database and shared memory, according to embodiments of the present invention.
  • a tracer development system 100 includes a computer 102.
  • the computer 102 is, for example, a personal, laptop, workstation, or mainframe computer, a personal digital assistant, or other data processing device having a central processing unit (CPU) and memory access, and includes a frace compiler 104.
  • the frace compiler 104 is any hardware, software, or combination that is included in, or otherwise communicably connected to or operable by, the computer 102 to "compile" software code for run-time trace operations as described herein.
  • the terms "compile” and “compiler” have their typical meanings of a process and special computer program that processes statements written in a particular programming language (e.g., source code) and turns them into machine language (e.g., object code) that a computer's processor uses to process the compiled software application.
  • the tracer development system 100 includes the frace compiler 104, which has functions of the conventional compiler of pre-process parsing and object code building and linking, and additionally has the function of inserting trace points in the code for run-time frace operations. More particularly, the trace compiler 104 includes a pre-processor 106, a frace inserter 110 and a code builder 108.
  • the pre-processor 106 serves to first parse (i.e., analyze) all of the language statements, written in the particular programming language, syntactically, one after the other.
  • the code builder 108 in one or more successive stages (or "passes), builds output code that is the object code which a computer's processor can process in running the software application so compiled.
  • the builder 108 makes certain that statements that refer to other statements within the compiled software application are referenced correctly in the final output object code from the trace compiler 104.
  • the code builder 108 of the trace compiler 104 typically creates or invokes one or more look-up tables or databases which include the appropriate cross-referencing among the language statements of the program and which enable expedient and logical operations of the program in the form of the output object code.
  • the code builder 108 can also include, as is conventional, a linker that collects intermediate object files into a unitary binary file, resolving outstanding symbol references, and possibly also incorporating special startup code or external libraries.
  • the frace inserter 110 of the frace compiler 104 is communicably connected with the pre-processor 106 and the code builder 108 of the trace compiler 104, and is also included in, or otherwise communicably connected to or operable by, the computer 102, as are the other elements of the trace compiler 104.
  • the frace inserter 110 is a software, hardware or combination that pre-processes a language statement program (i.e., source code) to expand the code of the program at function entry and exit commands and points, and then inserts in the pre-processed language statement program various frace points.
  • a language statement program i.e., source code
  • the frace points serve to track, identify, analyze and report occurrences during running of the object code output version of the software program from the frace compiler 104. Because of the unique and inventive embodiments herein, there is not any performance or operational impact on the software during compilation with inserted frace points. Moreover, there is not any, or merely negligible, impact on the software run-time performance and operation.
  • a method 200 is performed by the frace compiler 104 on the computer 100.
  • a programming language software program is pre-processed.
  • the pre-process step 202 is a parse of the programming language software program to expand the program to determine function entry and exit calls and commands.
  • one or more frace points is inserted in the program in a step 204.
  • the frace inserter 110 of Fig. 1 performs the steps 202, 204. Additionally, the frace inserter 110 can allow a user to manually input frace points in the result from the pre- process step 202, as appropriate or desired by the user.
  • the compile step 206 includes parse and build procedures, substantially in accordance with conventional compiler operations of the pre-processor 106 and the code builder 108 of Fig. 1.
  • the resulting object code output from the method 200 is a compiled version of the input source code, but which source code also includes frace points as inserted in the steps 202, 204 and compiled in the step 206 together with and as inserted in the input source code.
  • a run-time frace system 300 includes a computer 302.
  • the computer 302 is, for example, a personal, laptop, workstation, or mainframe computer, a personal digital assistant, or other data processing device having a cenfral processing unit (CPU) and memory access.
  • the computer 302 can be the same computer 102 of Fig. 1, or some other computer or processing device capable of executing the object code output from the system 100 of Fig. 1 and the method 200 of Fig. 2.
  • the computer 302 includes a cenfral processing unit (CPU) 306 and memory 308.
  • the CPU 306 is communicably connected to the memory 308.
  • the computer 302 includes a compiled software application 304, which compiled software application 304 includes frace points inserted by the frace inserter 110 of Fig. 1 according to the method 200 of Fig. 2.
  • the compiled software application 304 can be implemented in software, hardware, or combinations, and can perform any of a wide variety and assortment of functions and applications as is commonly available.
  • the software application 304 can be any application performable via the computer 302, such as an operating system, an application, a communication feature, a confrol or driver function, a network manager or enabler, or other.
  • the application 304 is any available software, now or in the future, that is employed in a run-time environment and in which a tracing mechanism is useful to assess and fix faults.
  • a method 400 is performed on a computer or other processing device, such as the computer 302 of Fig. 3, in running an application program that includes frace points and tracing capabilities, as configured and described above.
  • a step 402 executes the application program having the incorporated trace points.
  • the application program so executed in the step 402 is a run-time version, such as object code, of the application program with included trace points and having been compiled as described above.
  • a step 404 of the method 400 the application program being run in the step 402 interacts with a frace confrol channel (later herein identified as 708 of Fig. 7) which dictates particular frace information as a frace channel (also later herein identified as 706 of Fig. 7).
  • This interaction in the step 404 is initiated in conjunction with the running of the application program, and can be dynamically defined or set on-the-fly manually by the computer operator, automatically by pre-set settings, or otherwise dynamically during or prior to program execution in the step 402.
  • the interaction and dictation of frace information in the step 404 enables detection of occurrences and gathering of trace information during program execution with respect to the frace points in the program and as dictated by settings for tracing.
  • the frace information gathered as a result of the step 404 is then collected for reporting in a step 406.
  • the collecting step 406 provides frace information in formats suitable to be output to or by the computer running the application program or otherwise, for
  • trace points incorporated in run-time versions of application programs provide frace information, in real time during program execution, without significant impact or effect on program performance, including veracity and timing of program execution.
  • a trace database 500 is created.
  • the frace database 500 comprises unique trace identifiers (id) associated with each distinct frace point of the compiled code.
  • the trace database 500 is a relational database that relates the unique frace ids with the particular frace points, and also includes relevant interpretive information regarding occurrences at trace points of the code during run-time execution. As shown in Fig.
  • the trace database 500 communicates with a reporter 502 and a snap output 504 of run-time occurrences at the frace points of the code, in order to relate appropriate frace identification and interpretive information of the database 500 uniquely to each of the trace points then included in the snap detection and the occurrences then encountered at the frace points at the instant of the snap detection.
  • the snap output 504 is collected via the running of the compiled application program 304 of Fig. 3.
  • a trace control channel 708 shown in Fig. 7 associated in a shared memory 704 (shown in Fig. 7) with the running of the compiled program 304 and the snap output 504 dictates the particular frace points for which frace information is collected in the run.
  • a snap (or capture) of trace point occurrences information is obtained for any select instance.
  • the snap output 504 from the snap is, via the frace database 500, associated by virtue of the frace ids corresponding to the frace points, with frace identification and interpretive information for the database 500.
  • the database 500 together with the output reporter 502 provides readable and understandable trace information for the applicable frace points.
  • the frace information in such form, is made available from the system by the reporter 502, such as, for example, a printer or display.
  • the reporter 502 for example, provides the useable frace information in text, HTML, or other format.
  • the pre-processed code with inserted frace points in the steps 202, 204 of the method 200 of Fig. 2 is further processed in a method 600, prior to the step of compilation 206 of Fig. 2, in order to create the frace database 500 of frace ids (i.e., trace identifiers) and interpretive information.
  • the pre-processed code with inserted frace points is hooked to a shared library of function calls in a step 602.
  • the hook to the shared library is achieved via the insertion of a hook or other coded call at a first line of the code.
  • the hook is inserted, for example, along with insertions of the frace points in the steps 202, 204.
  • the shared library is the conventional collection of library routines of the standard compiler for the particular source language of the application software, for example, C++ or other language. As is common, each function call appropriate to the particular source language of the program has a corresponding library routine that executes the function.
  • the shared library is the source of the routines corresponding to the function calls of the program.
  • the method 600 then proceeds with a step 604 in which a next line of the code (i.e., the pre-processed code with inserted frace points) is read.
  • a step 606 the line of code is assessed to determine if the line includes a function call.
  • a look-up operation is then performed in a step 608 for the function corresponding to the function call.
  • the look-up is performed in frace database 500 of Fig. 5 created by the method 600.
  • the trace database 500 associates a unique identifier (i.e., trace id) with each frace point within the code. If the method 600 has previously been performed for the code or a predecessor version of the code, then an existing frace database 500 could be available.
  • a step 612 modifies by adding to the trace database 500 if there has been any change to the source code then being handled by the method 600.
  • the method 600 Upon creation of the frace database 500, or otherwise after any applicable modification by adding to the trace database 500 because of changes to the source of the currently handled code, the method 600 returns to the step 604. Repetition of the steps 604, 606, 608, 612 continues until all lines of the code have been processed in the method 600. Shared Memory
  • a run-time memory 700 for executing the compiled application program 304 (also shown in Fig. 3) and collecting trace information includes one or more sources of a random access memory (RAM) or other memory of a computing device.
  • the run-time memory 700 comprises two types of memory used in executing a run-time frace according to the embodiments here; these are a a dedicated memory 702 and a shared memory 704.
  • a routine executes in a library maintained in the dedicated memory 702. The routine writes a record of the frace encounter into the shared memory 704.
  • the dedicated memory 702 and compiled program 304 are illustrated in Fig. 7 as occurring at a unique element or location indicated by the box 700a and the shared memory 704 is illustrated as a separate unique element or location, as can be the case where the compiled program 304 and dedicated memory 702 are included in a user computer connected to a network on which resides the shared memory 704.
  • the location and configuration of any number and arrangement of computing devices, connections, and memory is possible in keeping with the scope herein.
  • the dedicated memory 702 is employed in operations of the application program 304, and can include libraries and other routines and elements required in operation of the application program 304.
  • the program 304 will encounter the trace points compiled within the program 304.
  • a routine in the libraries of the dedicated memory 702 causes records related to occurrences of the encounter to be written into a trace channel 706 of the shared memory 704.
  • the application program 304 interacts with the shared memory 704 to write to the same frace channel 706 of the shared memory 704 in similar fashion.
  • the particular trace points for which detections and occurrences are written to the frace channel 706 of the shared memory 704 at each instant is dictated by a frace confrol channel 708 also contained in the shared memory 704.
  • the frace control channel 708 can be set or varied, on the fly and otherwise, during run-time or otherwise, in order to obtain desired frace records in the frace channel 706.
  • the frace control channel 708 and the trace channel 706 are each maintained in shared memory 704, all run-time occurrences of the compiled program 304 use and interact with the same information of the shared memory 704. Thus, at any instant, regardless the versions and number of independent executions of the compiled program 304, the frace channel 706 is dictated by the trace confrol channel 708 and the information of the trace channel 706 is the information then dictated by the state of the trace control channel 708.
  • an exemplary run-time operation 800 of the shared memory 704 of Fig. 7 is illustrated.
  • three instances of the compiled program 304 are concurrently running or in other manner overlap in execution.
  • the three instances generate frace information respectively illustrated as the information 304a, 304b, 304c.
  • the three instances of the information 304a, 304b, 304c are frace information relevant to trace points encountered and dictated by the trace confrol channel 708 of the shared memory 704 at the instant of the encounter.
  • the frace information 304a, 304b, 304c are respectively written to the shared memory 704 as the trace channel 704.
  • the writing of the trace information 304a, 304b, 304c, including its instance and occurrence for each frace point of each of the three instances of execution of the compiled program 304 evidenced by the information 304a, 304b, 304c, is dictated by the control channel 708 at the instant of the writing.
  • the frace channel 706 can be snapped (i.e., the information of the channel 706 captured or collected), providing the snap output 504 (also shown in Fig. 5).
  • the snap output 504 is associated with information in the trace database 500 set up, saved, and modified by additions at compilation of the compiled program 304 (and each respective compilation thereof, including all different version of the program 304).
  • the reporter 502 delivers or makes available useable information regarding the frace points (because of corresponding frace ids of the database 500) and occurrences thereat, for every instance of the information 304a, 304b, 304c, as well as all others.
  • the frace channel 706 can therefore be configured as a circular frace channel 900.
  • the circular frace channel 900 is a circular buffer or memory, in which the channel 900 includes a header 902, an identifier 904, and one or more frace records 906, which are successively replaced in an overwrite operation when the buffer is full.
  • the circular trace channel 900 serves to hold trace information related to trace points which are dictated for tracing (by virtue of the state of the confrol channel 708 of Fig. 7) in any particular run of the application program 304 from the method 400 of Fig. 4.
  • the information 304a, 304b, 304c for each run of the program 304 is collected for each frace point as dictated by the confrol channel 708.
  • Each trace point has a frace id of the frace database 500, which also corresponds to the data maintained in the frace database 500 (shown in Figs. 5 and 6).
  • the trace channel 900 includes certain formatting headers, the applicable frace points encountered and related to corresponding trace ids of the database 500, and applicable frace related records, such as, for example, values, occurrences, and states for the particular function call corresponding to the trace point.
  • An exemplary format of the trace channel 900 in Fig. 9 includes a header 902, an identifier 904, and one or more frace records 906.
  • the frace channel 900 is captured and maintained, for example, in the buffer, cache or similar memory previously mentioned.
  • the information of the frace channel 900 is available for reporting, assessment, analysis, manipulation, or other data processing effort.
  • Elements of a computing device which store or can otherwise access the frace channel 900 for example, the frace database 500 and the output reporter 502, can report the frace channel 900 information in formats, reports and other manners and displays desired by a user or other source, according to conventional interface programming and selections.
  • implementation of the frace channel 900 as a circular buffer is indicated by arrow A'.
  • Such circular buffer arrangement of the frace channel 900 operates to maintain frace records 906 of the frace channel 900 for only so long during program execution as the buffer is not full.
  • the buffer size is set, for example, the buffer size can be variable but would be set and fixed for any particular run.
  • the buffer which servers as the frace channel 900 can, then, on execution of the application program, capture and maintain the header 902 and identifier 904, and also capture and maintain trace records 906 corresponding to various trace points (e.g., the information 304a, 304b, 304c of Fig. 8, and so forth) until the buffer is filled.
  • next frace records 906 captured as the frace channel 900 begin to overwrite prior frace records, in a "first in first out" or other desired sequence.
  • the trace channel 900 together with the confrol channel 708 and use of the shared memory 704, permit on the fly choice or selection among trace points and trace information captured and available in runs of the application program 304. This is the case because the trace channel 900, operating as an independent storage source for trace records 906 gathered at run-time, will reflect choices dictated by the control channel 708 at each instance for the particular frace points and information which is the trace records 906.
  • a tracing system 1000 together with shared memory 704, employed in execution of the application program 304 compiled and executed in the methods 200, 400, 500 of Figs. 2, 4 and 5, respectively, is conceptually illustrated.
  • the conceptual illustration of the system 1000 is helpful to explain the relationships of the trace compile method 200, the run-time trace method 400, the trace database creation method 600, and the shared memory and snap output method 800.
  • the application program 304 is executing on a single end-user computer 300 in the example, multiple instances of the execution of the application program 304, on the same or any other communicably connected processing devices, can concurrently and in real time occur according to the system 1000 and the methods 200, 400, 600, 800.
  • a source code program 1002 for example, a C++ language software program or other compilable program, including, without limitation, a run-time compilable program, is compiled by the frace compiler 104.
  • the frace compiler 104 includes the pre-processor 106, the frace parser 110 for inserting frace points at function entry and exit points of the code, and the code builder 108 (which can include compiling and linking functions).
  • the frace parser 110 performs the frace database creation or modification method 600, by building or adding to the trace database 500 so that the database 500 includes frace ids corresponding to frace points of the code and also relevant information that corresponds to occurrences encoun tered at trace points during code execution in order to derive useable trace information.
  • the compiled program 304 from the trace compiler 104 is run on the computer 300.
  • the shared memory 704 is accessible to the compiled program 304, for example, over a network connected to the computer 300.
  • the trace channel control 708 maintained in the shared memory 704 interacts with the compiled program 304 during execution in order to cause frace information relevant to the dictated frace points and execution occurrences to be captured as the trace channel 706.
  • the trace channel 706 is maintained in the shared memory 704, which may or may not be the same physical memory as maintains the frace channel confrol 708.
  • the frace channel 706 can have the configuration of the circular buffer trace channel 900.
  • the data information of the trace channel 706 can be captured by snapping the information.
  • the snap and reporting are performed in conjunction with the frace database 500 in the method 800.
  • the reporter 502 communicates with the snap output 504 and the frace database 500, to report trace ids and run-time occurrences at the encounter of the frace points corresponding to the frace ids during execution of the compiled program 304.
  • the database 500 relates the frace information captured from the frace channel 706 to user- readable trace ids and occurrence information, and makes these available via the reporter 502 as output.
  • a user for example, a developer, an operator of the database 500, another program or application, or other source, can read and use the output report of trace ids and trace information.
  • the shared memory 704 can be centrally located or disparately located, and can be accessible by pluralities of users, devices, nodes, or other features, such as, for example, in the case of networked computers of an ente ⁇ rise or global network, public or private.
  • the terms “comprises, “comprising,” or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Abstract

A method of run-time tracing is performed on a computer (302) while running an executable software program. The method includes procesing data by the processor (306) of the computer, storing the data in a memory (308) of the computer, and controlling the step of processing data so that the step executes function routines of the language of the software program. Trace points are associated with the function calls of the program. The function calls execute the applicable function routines of the program language. The method also includes capturing trace information in memory. The method further includes associating that trace information with trace id's that uniquely identify each of the trace points of the program. The trace points are incorporated in executable versions of the program. The memory in which the trace information is captured is a shared memory (704) accessible to the computer and other connected devices.

Description

COMPUTER SOFTWARE RUN-TIME ANALYSIS SYSTEMS AND METHODS
Background of the Invention
The present invention generally relates to computers and software operating on computers and, more particularly, relates to systems and methods for tracing, including recording and analyzing, the execution of software programs in real-time, dynamic and runtime operations.
Software debugging is critical for proper operations of software. Debugging is typically a complex task, particularly in complex, multi-threaded, and distributed software program applications. Conventional debugging tools, such as debugger programs included with software compilers and others, are generally not adequate for debugging in many such instances. Moreover, run-time failures of software are often not easily analyzed and detected with enough specificity to allow bug detection and ascertainment with any specificity.
Software bugs fall into at least three different types or classes of errors. These types of bugs include: syntax errors, logical errors, and algorithmic error. Ralston, A. and Reilly, E., Encyclopedia of Computer Science, Third Ed., p.419. Although all of these types of bugs can be complex and hard to detect and fix, logical errors and algorithmic errors can be the most difficult. Conventional debugger software, sometimes referred to as symbolic debuggers and often supplied with compiler programs, is generally helpful with detecting and identifying points at which an executing program halts prematurely or emits wrong answers because of bugs. These conventional debuggers are used primarily by the program developer during software development and testing.
Debugging is typically a time consuming step in software development which is undertaken prior to wide release or use of the program. The aim in debugging with conventional debug tools has been to detect and remedy errors before software has been distributed to end-users for use in applications. Generally, bugs uncovered in release versions of programs are not remediable by the end-user of the program, particularly in software distributed only in object code or other run-time versions. Developers have relied on reproducing reported bugs in the lab and on end-user descriptions and explanations of bug incidences in order to understand and fix the bugs.
Run-time versions of software programs, such as compiled and executable object code applications, have typically been equipped to provide only minimal run-time failure messages and identifiers. For example, a run-time fault in a common application program usually yields only an "error" or "exception" message that can, but does not necessarily, also include a classifier or indicator of the source or location at which the fault results. These messages produced on fault of the typical run-time application are often not very helpful to the user or developer to analyze and determine the source of or reason for the fault. The error messages merely indicate the point of the program at which the fault or bug causes the entire program to cease operations. This point may or may not be the true source of the bug or other fault, and it is often problematic and cumbersome to attempt to trace back through software code to determine the true source from the limited knowledge afforded by the run-time error message.
The various mechanisms and procedures employed in the past to detect, analyze and remedy bugs in software programs have typically been employed only in the program development process. Debugging is not usually performed in distributed, run-time versions of programs, although debug information beyond the minimal run-time error messages, previously described, could be helpful to isolate and fix bugs that inevitably occur even in release and later versions of software applications. One reason that only the minimal runtime error messages have been included in run-time versions of programs has been the desire for speedy and efficient operations of those programs. Conventional debugger tools are typically complex and computing- and time-intensive to operate, and do not lend themselves to ready operation in run-time circumstances. Nonetheless, more extensive and comprehensive debug information could be helpful to remedy bugs in run-time software, if these problems of conventional debuggers are overcome. Moreover, prior debugging tools have not allowed on-the-fly choice among debug information from the debug steps during run-time execution of program software code being debugged. Conventional debugging tools are cumbersome and time-consuming to execute, therefore, run-time debugging has not been feasible in view of performance impacts to executing programs. Any run-time debugging has been very limited in capability and use, because of these and other problems.
It would be a significant improvement in the art and technology to provide debugging tools and capabilities to production software code, if the impact of those tools and capabilities does not impact or only negligibly impacts run-time performance or operation of the code. Summary of the Invention
An embodiment of the invention is a pre-processor for processing a program that includes at least one function call. The pre-processor includes a code expander for detecting the at least one function call of the program, at least one trace hook call, and an inserter, communicably connected with the code expander and the at least one trace hook call, for inserting the at least one trace hook call in the program relative to the at least one function call.
Another embodiment of the invention is a method of pre-processing a program that includes at least one function call. The method includes detecting the at least one function call of the program and associating at least one trace hook call with the at least one function call. Yet another embodiment of the invention is a run-time tracer. The run-time tracer includes a data processor, a memory communicatively connected to the data processor, a software program operating on the data processor, having at least one trace hook call associated with at least one function call of the program, and a trace id stored in the memory, that identifies the at least one trace hook call, associated with the at least one function call of the program.
Another embodiment of the invention is a shared memory for run-time tracing. The shared memory is communicatively connected to a dedicated memory. An executable program includes a function call to a function routine. The embodiment also includes a trace id corresponding to and identifying the function call. An address of the shared memory corresponds to an offset of an address of the dedicated memory. A state at the address of the shared memory is the same as a state at the address of the dedicated memory.
A further embodiment of the invention is a method of run-time tracing. The method includes processing a data, storing the data in a first memory, programming the step of processing to perform a function routine, so that at least one frace hook call is associated with at least one function call of the function routine, and storing a trace id in a second memory, the frace id serving to identify the at least one trace hook call.
Another embodiment of the invention is a method of sharing memory for run-time tracing. The method includes executing a program. The program includes a function call to a function routine and a frace id corresponding to and identifying the function call. The method also includes addressing the shared memory at an offset of an address of a dedicated memory and replicating a state of the dedicated memory in the shared memory as dictated by the step of addressing.
Brief Description of the Drawings The present invention is illustrated by way of example and not limitation in the accompanying figures, in which like references indicate similar elements, and in which:
FIG. 1 illustrates a computer for creating an executable compiled program for runtime tracing, including a frace parser for incorporating trace points in a code of the program and in the executable compiled program, according to embodiments of the present invention;
FIG. 2 illustrates a method of creating the executable compiled program via the computer of FIG. 1, according to embodiments of the present invention;
FIG. 3 illustrates a computer for executing the executable compiled program and thereby performing the run-time tracing, according to embodiments of the present invention;
FIG. 4 illustrates a method of executing the executable compiled program via the computer of FIG. 3, according to embodiments of the present invention;
FIG. 5 illustrates a system including a trace database operating in conjunction with a frace compiler, a snap output, and a reporter, for reporting of trace information obtained in run-time execution of an executable compiled program having trace points, according to embodiments of the present invention;
FIG. 6 illustrates a method of creating a frace database of trace information, including trace identifiers (id's) corresponding to frace points of an executable compiled program, the frace points invoke function routines of the code language of the program, according to embodiments of the present invention;
FIG. 7 illustrates a run-time memory, including a dedicated memory and a shared memory, accessible by the executable compiled program of FIG. 3 in the method of FIG. 4, for capturing frace information during run-time of the program, according to embodiments of the present invention. FIG. 8 illustrates the memory of FIG. 7, wherein there are multiple instances of runtime execution of the executable compiled program, and the operations therewith of the memory, both the dedicated memory and the shared memory, , according to embodiments of the present invention; FIG. 9 illustrates a trace channel of a shared memory for run-time tracing during execution of an executable compiled program, configured as a circular buffer allowing overwrite of entries of the channel in a first in, first out arrangement, according to embodiments of the present invention; and
FIG. 10 illustrates a tracing system, including frace compile, frace database, compiled program execution, runtime frace confrol, frace channel sharing, snap of frace channel contents, and reporting of frace ids and frace information of occurrences at runtime via interrelatedness of the frace database and shared memory, according to embodiments of the present invention.
Detailed Description of Preferred Embodiments Tracer Development
Referring to Fig. 1, a tracer development system 100 includes a computer 102. The computer 102 is, for example, a personal, laptop, workstation, or mainframe computer, a personal digital assistant, or other data processing device having a central processing unit (CPU) and memory access, and includes a frace compiler 104. The frace compiler 104 is any hardware, software, or combination that is included in, or otherwise communicably connected to or operable by, the computer 102 to "compile" software code for run-time trace operations as described herein. As used herein, the terms "compile" and "compiler" have their typical meanings of a process and special computer program that processes statements written in a particular programming language (e.g., source code) and turns them into machine language (e.g., object code) that a computer's processor uses to process the compiled software application. As will be detailed more fully, the tracer development system 100 includes the frace compiler 104, which has functions of the conventional compiler of pre-process parsing and object code building and linking, and additionally has the function of inserting trace points in the code for run-time frace operations. More particularly, the trace compiler 104 includes a pre-processor 106, a frace inserter 110 and a code builder 108. The pre-processor 106 serves to first parse (i.e., analyze) all of the language statements, written in the particular programming language, syntactically, one after the other. The code builder 108, in one or more successive stages (or "passes), builds output code that is the object code which a computer's processor can process in running the software application so compiled. The builder 108 makes certain that statements that refer to other statements within the compiled software application are referenced correctly in the final output object code from the trace compiler 104. In correctly referencing the statements in this manner, the code builder 108 of the trace compiler 104 typically creates or invokes one or more look-up tables or databases which include the appropriate cross-referencing among the language statements of the program and which enable expedient and logical operations of the program in the form of the output object code. The code builder 108 can also include, as is conventional, a linker that collects intermediate object files into a unitary binary file, resolving outstanding symbol references, and possibly also incorporating special startup code or external libraries. The frace inserter 110 of the frace compiler 104 is communicably connected with the pre-processor 106 and the code builder 108 of the trace compiler 104, and is also included in, or otherwise communicably connected to or operable by, the computer 102, as are the other elements of the trace compiler 104. The frace inserter 110 is a software, hardware or combination that pre-processes a language statement program (i.e., source code) to expand the code of the program at function entry and exit commands and points, and then inserts in the pre-processed language statement program various frace points. The frace points, as hereinafter more fully described, serve to track, identify, analyze and report occurrences during running of the object code output version of the software program from the frace compiler 104. Because of the unique and inventive embodiments herein, there is not any performance or operational impact on the software during compilation with inserted frace points. Moreover, there is not any, or merely negligible, impact on the software run-time performance and operation.
Referring to Fig. 2, a method 200 is performed by the frace compiler 104 on the computer 100. In a step 202, a programming language software program is pre-processed. The pre-process step 202 is a parse of the programming language software program to expand the program to determine function entry and exit calls and commands. At each entry and exit call and command, one or more frace points is inserted in the program in a step 204. The frace inserter 110 of Fig. 1 performs the steps 202, 204. Additionally, the frace inserter 110 can allow a user to manually input frace points in the result from the pre- process step 202, as appropriate or desired by the user.
After the steps 202, 204, the method 200 concludes with a compile procedure in a step 206. The compile step 206 includes parse and build procedures, substantially in accordance with conventional compiler operations of the pre-processor 106 and the code builder 108 of Fig. 1. In effect, the resulting object code output from the method 200 is a compiled version of the input source code, but which source code also includes frace points as inserted in the steps 202, 204 and compiled in the step 206 together with and as inserted in the input source code.
Run-Time TracerReferring to Fig. 3, a run-time frace system 300 includes a computer 302. The computer 302 is, for example, a personal, laptop, workstation, or mainframe computer, a personal digital assistant, or other data processing device having a cenfral processing unit (CPU) and memory access. The computer 302 can be the same computer 102 of Fig. 1, or some other computer or processing device capable of executing the object code output from the system 100 of Fig. 1 and the method 200 of Fig. 2.
The computer 302 includes a cenfral processing unit (CPU) 306 and memory 308. The CPU 306 is communicably connected to the memory 308. Additionally, the computer 302 includes a compiled software application 304, which compiled software application 304 includes frace points inserted by the frace inserter 110 of Fig. 1 according to the method 200 of Fig. 2. The compiled software application 304 can be implemented in software, hardware, or combinations, and can perform any of a wide variety and assortment of functions and applications as is commonly available. For example, the software application 304 can be any application performable via the computer 302, such as an operating system, an application, a communication feature, a confrol or driver function, a network manager or enabler, or other. The application 304 is any available software, now or in the future, that is employed in a run-time environment and in which a tracing mechanism is useful to assess and fix faults.
Referring to Fig. 4, a method 400 is performed on a computer or other processing device, such as the computer 302 of Fig. 3, in running an application program that includes frace points and tracing capabilities, as configured and described above. In the method 400, a step 402 executes the application program having the incorporated trace points. The application program so executed in the step 402 is a run-time version, such as object code, of the application program with included trace points and having been compiled as described above.
In a step 404 of the method 400, the application program being run in the step 402 interacts with a frace confrol channel (later herein identified as 708 of Fig. 7) which dictates particular frace information as a frace channel (also later herein identified as 706 of Fig. 7). This interaction in the step 404 is initiated in conjunction with the running of the application program, and can be dynamically defined or set on-the-fly manually by the computer operator, automatically by pre-set settings, or otherwise dynamically during or prior to program execution in the step 402. The interaction and dictation of frace information in the step 404 enables detection of occurrences and gathering of trace information during program execution with respect to the frace points in the program and as dictated by settings for tracing. The frace information gathered as a result of the step 404 is then collected for reporting in a step 406. The collecting step 406 provides frace information in formats suitable to be output to or by the computer running the application program or otherwise, for reporting or other purposes.
As has been generally described, the trace points incorporated in run-time versions of application programs provide frace information, in real time during program execution, without significant impact or effect on program performance, including veracity and timing of program execution. Trace ID Database Creation and Update
Referring to Fig. 5, during the frace compile procedure of the method 200 of Fig. 2, a trace database 500 is created. The frace database 500 comprises unique trace identifiers (id) associated with each distinct frace point of the compiled code. The trace database 500 is a relational database that relates the unique frace ids with the particular frace points, and also includes relevant interpretive information regarding occurrences at trace points of the code during run-time execution. As shown in Fig. 5, the trace database 500 communicates with a reporter 502 and a snap output 504 of run-time occurrences at the frace points of the code, in order to relate appropriate frace identification and interpretive information of the database 500 uniquely to each of the trace points then included in the snap detection and the occurrences then encountered at the frace points at the instant of the snap detection. The snap output 504 is collected via the running of the compiled application program 304 of Fig. 3. As later described, a trace control channel 708 (shown in Fig. 7) associated in a shared memory 704 (shown in Fig. 7) with the running of the compiled program 304 and the snap output 504 dictates the particular frace points for which frace information is collected in the run. For purposes of operations of the trace database 500, once the frace information from the running of the compiled program 304 is collected according to the particular confrol channel 708, a snap (or capture) of trace point occurrences information is obtained for any select instance. The snap output 504 from the snap is, via the frace database 500, associated by virtue of the frace ids corresponding to the frace points, with frace identification and interpretive information for the database 500. In this manner, the database 500 together with the output reporter 502 provides readable and understandable trace information for the applicable frace points. The frace information, in such form, is made available from the system by the reporter 502, such as, for example, a printer or display. The reporter 502, for example, provides the useable frace information in text, HTML, or other format.
Referring to Fig. 6, the pre-processed code with inserted frace points in the steps 202, 204 of the method 200 of Fig. 2 is further processed in a method 600, prior to the step of compilation 206 of Fig. 2, in order to create the frace database 500 of frace ids (i.e., trace identifiers) and interpretive information. In the method 600, the pre-processed code with inserted frace points is hooked to a shared library of function calls in a step 602. The hook to the shared library is achieved via the insertion of a hook or other coded call at a first line of the code. The hook is inserted, for example, along with insertions of the frace points in the steps 202, 204. The shared library is the conventional collection of library routines of the standard compiler for the particular source language of the application software, for example, C++ or other language. As is common, each function call appropriate to the particular source language of the program has a corresponding library routine that executes the function. The shared library is the source of the routines corresponding to the function calls of the program.
The method 600 then proceeds with a step 604 in which a next line of the code (i.e., the pre-processed code with inserted frace points) is read. In a step 606, the line of code is assessed to determine if the line includes a function call. A look-up operation is then performed in a step 608 for the function corresponding to the function call. The look-up is performed in frace database 500 of Fig. 5 created by the method 600. The trace database 500 associates a unique identifier (i.e., trace id) with each frace point within the code. If the method 600 has previously been performed for the code or a predecessor version of the code, then an existing frace database 500 could be available. Otherwise, the function will not be found in an existing frace database 500, and the method 600 proceeds to a step 610 of creating the frace database 500. If there is any existing frace database 500 of the code or predecessor versions which includes the function corresponding to the particular function call, then a step 612 modifies by adding to the trace database 500 if there has been any change to the source code then being handled by the method 600.
Upon creation of the frace database 500, or otherwise after any applicable modification by adding to the trace database 500 because of changes to the source of the currently handled code, the method 600 returns to the step 604. Repetition of the steps 604, 606, 608, 612 continues until all lines of the code have been processed in the method 600. Shared Memory
Referring to Fig. 7, a run-time memory 700 for executing the compiled application program 304 (also shown in Fig. 3) and collecting trace information, includes one or more sources of a random access memory (RAM) or other memory of a computing device. The run-time memory 700 comprises two types of memory used in executing a run-time frace according to the embodiments here; these are a a dedicated memory 702 and a shared memory 704. In running of the compiled program 304 of Fig. 3, according to the method 400 of Fig. 4, as each successive frace point of the compiled program 304 is encountered, a routine executes in a library maintained in the dedicated memory 702. The routine writes a record of the frace encounter into the shared memory 704. For example purposes, the dedicated memory 702 and compiled program 304 are illustrated in Fig. 7 as occurring at a unique element or location indicated by the box 700a and the shared memory 704 is illustrated as a separate unique element or location, as can be the case where the compiled program 304 and dedicated memory 702 are included in a user computer connected to a network on which resides the shared memory 704. Although illustrated for example purposes in this manner, the location and configuration of any number and arrangement of computing devices, connections, and memory is possible in keeping with the scope herein.
Continuing to refer to Fig. 7, the dedicated memory 702 is employed in operations of the application program 304, and can include libraries and other routines and elements required in operation of the application program 304. In execution of the application program 304 in this environment, the program 304 will encounter the trace points compiled within the program 304. As each frace point is encountered, a routine in the libraries of the dedicated memory 702 causes records related to occurrences of the encounter to be written into a trace channel 706 of the shared memory 704.
If more than one application program 304 is in execution, and even if different versions of the application program 304 are being concurrently run, the application program 304, and each of them, interacts with the shared memory 704 to write to the same frace channel 706 of the shared memory 704 in similar fashion. The particular trace points for which detections and occurrences are written to the frace channel 706 of the shared memory 704 at each instant is dictated by a frace confrol channel 708 also contained in the shared memory 704. The frace control channel 708 can be set or varied, on the fly and otherwise, during run-time or otherwise, in order to obtain desired frace records in the frace channel 706. Because the frace control channel 708 and the trace channel 706 are each maintained in shared memory 704, all run-time occurrences of the compiled program 304 use and interact with the same information of the shared memory 704. Thus, at any instant, regardless the versions and number of independent executions of the compiled program 304, the frace channel 706 is dictated by the trace confrol channel 708 and the information of the trace channel 706 is the information then dictated by the state of the trace control channel 708.
Referring to Fig. 8, an exemplary run-time operation 800 of the shared memory 704 of Fig. 7 is illustrated. In the operation 800, three instances of the compiled program 304 are concurrently running or in other manner overlap in execution. The three instances generate frace information respectively illustrated as the information 304a, 304b, 304c. The three instances of the information 304a, 304b, 304c are frace information relevant to trace points encountered and dictated by the trace confrol channel 708 of the shared memory 704 at the instant of the encounter. The frace information 304a, 304b, 304c are respectively written to the shared memory 704 as the trace channel 704. The writing of the trace information 304a, 304b, 304c, including its instance and occurrence for each frace point of each of the three instances of execution of the compiled program 304 evidenced by the information 304a, 304b, 304c, is dictated by the control channel 708 at the instant of the writing.
At any point in time, the frace channel 706 can be snapped (i.e., the information of the channel 706 captured or collected), providing the snap output 504 (also shown in Fig. 5). As previously described with respect to Fig. 5, the snap output 504 is associated with information in the trace database 500 set up, saved, and modified by additions at compilation of the compiled program 304 (and each respective compilation thereof, including all different version of the program 304). As so associated, the reporter 502 delivers or makes available useable information regarding the frace points (because of corresponding frace ids of the database 500) and occurrences thereat, for every instance of the information 304a, 304b, 304c, as well as all others. Trace Channel
Referring to Fig. 9, the information of the frace channel 706 at any instant is limited, because to not limit the information could result in too much information (e.g., dating back for all time, etc.) and memory overflows. The frace channel 706 can therefore be configured as a circular frace channel 900. The circular frace channel 900 is a circular buffer or memory, in which the channel 900 includes a header 902, an identifier 904, and one or more frace records 906, which are successively replaced in an overwrite operation when the buffer is full. The circular trace channel 900, such as a buffer, cache or other similar memory or storage source, serves to hold trace information related to trace points which are dictated for tracing (by virtue of the state of the confrol channel 708 of Fig. 7) in any particular run of the application program 304 from the method 400 of Fig. 4. The information 304a, 304b, 304c for each run of the program 304 is collected for each frace point as dictated by the confrol channel 708. Each trace point, of course, has a frace id of the frace database 500, which also corresponds to the data maintained in the frace database 500 (shown in Figs. 5 and 6). From the database 500, respective information 304a, 304b, 304c contained in the frace channel 706 at an instant of a snap of the channel 706 can be reported in useable format. For example, for each trace point traced and reported in any run of the application program 304, the trace channel 900 includes certain formatting headers, the applicable frace points encountered and related to corresponding trace ids of the database 500, and applicable frace related records, such as, for example, values, occurrences, and states for the particular function call corresponding to the trace point.
An exemplary format of the trace channel 900 in Fig. 9 includes a header 902, an identifier 904, and one or more frace records 906. In running of the application program, the frace channel 900 is captured and maintained, for example, in the buffer, cache or similar memory previously mentioned. For each such capture as the frace channel 900, the information of the frace channel 900 is available for reporting, assessment, analysis, manipulation, or other data processing effort. Elements of a computing device which store or can otherwise access the frace channel 900, for example, the frace database 500 and the output reporter 502, can report the frace channel 900 information in formats, reports and other manners and displays desired by a user or other source, according to conventional interface programming and selections.
Continuing to refer to Fig. 9, implementation of the frace channel 900 as a circular buffer is indicated by arrow A'. Such circular buffer arrangement of the frace channel 900 operates to maintain frace records 906 of the frace channel 900 for only so long during program execution as the buffer is not full. In the arrangement, the buffer size is set, for example, the buffer size can be variable but would be set and fixed for any particular run. The buffer which servers as the frace channel 900 can, then, on execution of the application program, capture and maintain the header 902 and identifier 904, and also capture and maintain trace records 906 corresponding to various trace points (e.g., the information 304a, 304b, 304c of Fig. 8, and so forth) until the buffer is filled. Once the buffer for the frace channel 900 is filled, next frace records 906 captured as the frace channel 900 begin to overwrite prior frace records, in a "first in first out" or other desired sequence. The trace channel 900, together with the confrol channel 708 and use of the shared memory 704, permit on the fly choice or selection among trace points and trace information captured and available in runs of the application program 304. This is the case because the trace channel 900, operating as an independent storage source for trace records 906 gathered at run-time, will reflect choices dictated by the control channel 708 at each instance for the particular frace points and information which is the trace records 906.
System Schema
Referring to Fig. 10, a tracing system 1000, together with shared memory 704, employed in execution of the application program 304 compiled and executed in the methods 200, 400, 500 of Figs. 2, 4 and 5, respectively, is conceptually illustrated. The conceptual illustration of the system 1000 is helpful to explain the relationships of the trace compile method 200, the run-time trace method 400, the trace database creation method 600, and the shared memory and snap output method 800. Although only a single instance of the application program 304 is executing on a single end-user computer 300 in the example, multiple instances of the execution of the application program 304, on the same or any other communicably connected processing devices, can concurrently and in real time occur according to the system 1000 and the methods 200, 400, 600, 800.
A source code program 1002, for example, a C++ language software program or other compilable program, including, without limitation, a run-time compilable program, is compiled by the frace compiler 104. As previously described, the frace compiler 104 includes the pre-processor 106, the frace parser 110 for inserting frace points at function entry and exit points of the code, and the code builder 108 (which can include compiling and linking functions). Also as previously described, the frace parser 110 performs the frace database creation or modification method 600, by building or adding to the trace database 500 so that the database 500 includes frace ids corresponding to frace points of the code and also relevant information that corresponds to occurrences encoun tered at trace points during code execution in order to derive useable trace information.
The compiled program 304 from the trace compiler 104 is run on the computer 300. During run-time, the shared memory 704 is accessible to the compiled program 304, for example, over a network connected to the computer 300. The trace channel control 708 maintained in the shared memory 704 interacts with the compiled program 304 during execution in order to cause frace information relevant to the dictated frace points and execution occurrences to be captured as the trace channel 706. Of course, as previously mentioned, the trace channel 706 is maintained in the shared memory 704, which may or may not be the same physical memory as maintains the frace channel confrol 708. The frace channel 706 can have the configuration of the circular buffer trace channel 900.
At any instant, during running of the compiled program 304 or otherwise, the data information of the trace channel 706 can be captured by snapping the information. The snap output 504, controllable by a user, automated, or otherwise, captures and makes available for reporting the information (i.e., at the state of the instant) of the trace channel 706. The snap and reporting are performed in conjunction with the frace database 500 in the method 800.
The reporter 502 communicates with the snap output 504 and the frace database 500, to report trace ids and run-time occurrences at the encounter of the frace points corresponding to the frace ids during execution of the compiled program 304. The database 500 relates the frace information captured from the frace channel 706 to user- readable trace ids and occurrence information, and makes these available via the reporter 502 as output. A user, for example, a developer, an operator of the database 500, another program or application, or other source, can read and use the output report of trace ids and trace information.
In operation of the foregoing systems and the methods, numerous alternative business and technical arrangements are possible. Although only particular devices and elements are specifically identified herein, any other devices and elements, incorporated together or otherwise communicably connected or associated, that perform the same or similar functions or capabilities are also included and covered. In certain embodiments, the shared memory 704 can be centrally located or disparately located, and can be accessible by pluralities of users, devices, nodes, or other features, such as, for example, in the case of networked computers of an enteφrise or global network, public or private. Furthermore, combinations of devices and elements, as well as other devices and elements, for communications, processing, storage, and otherwise, including, for example, pluralities of any, certain ones, all, and even additional or alternative devices and elements, and other combinations, are all possible in keeping with the scope of the embodiments herein. Moreover, although the source code described is of a compilable language that involves compiling prior to run-time execution, the same and similar functions and elements are involved in run-time compilable codes, such as Java or others, and can be implemented in accordance with the foregoing.
In the foregoing specification, the invention has been described with reference to specific embodiments. However, one of ordinary skill in the art appreciates that various modifications and changes can be made without departing from the scope of the present invention as set forth in the claims below. Accordingly, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of the present invention. Benefits, other advantages, and solutions to problems have been described above with regard to specific embodiments. However, the benefits, advantages, solutions to problems and any element(s) that may cause any benefit, advantage, or solution to occur or become more pronounced are not to be construed as a critical, required, or essential feature or element of any or all the claims. As used herein, the terms "comprises, "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims

Claims What is Claimed is:
1. A pre-processor for processing a program that includes at least one function call, comprising: a code expander for detecting the at least one function call of the program; at least one frace point; and an inserter, communicably connected with the code expander and the at least one frace point, for inserting the at least one frace point in the program relative to the at least one function call.
2. The pre-processor of claim 1 , wherein the at least one frace point invokes detection of a characteristic regarding the at least one function call, during runtime execution of the program.
3. The pre-processor of claim 1, further comprising: a function routine having a characteristic, operable upon execution of the program and encountering the at least one function call; wherein the relativeness of the insertion of the at least one frace point with respect to the at least one function call is dictated, at least in part, by the characteristic of the function routine.
4. A method of pre-processing a program that includes at least one function call, comprising the steps of: detecting the at least one function call of the program; and associating at least one frace point with the at least one function call.
5. The method of claim 4, wherein the step of associating includes: inserting the at least one frace point in the program relative to the at least one function call.
6. The method of claim 4, wherein the relativeness of insertion of the at least one frace point with respect to the at least one function call is dictated, at least in part, by a characteristic of a function routine corresponding to the at least one function call.
7. A run-time tracer, comprising: a data processor; a database communicatively connected to the data processor; a software program operating on the data processor, having at least one frace point associated with at least one function call of the program; and a trace id stored in the database, that corresponds to and identifies the at least one trace point, associated with the at least one function call of the program.
8. The run-time tracer of claim 7, wherein the software program is object code readable by the data processor.
9. The run-time tracer of claim 8, further comprising: a trace information dictated by occurrences at the at least one function call during execution of the program; and a shared memory for maintaining the frace information.
10. The run-time tracer of claim 9, wherein the database includes at least one frace id and relates the frace id with the at least one frace point.
11. The run-time tracer of claim 10, wherein the database maintains a human- readable information that corresponds to the frace information and the at least one frace id and relates the frace information and the at least one frace id to a portion of the human- readable information indicative of occurrences associated with the frace information during execution.
12. The run-time tracer of claim 10, wherein the shared memory is written to by and during multiple executions of the program.
13. The run-time tracer of claim 11 , further comprising: a snapper for instantaneously capturing data of at least a portion of the shared memory.
14. The run-time tracer of claim 13, wherein the associatedness of the trace id and the at least one function call of the program is achieved by the database relating the frace id to the frace point corresponding to the at least one function call, as captured by the snapper.
15. The run-time tracer of claim 7, further comprising: a function routine accessible to the data processor, corresponding to and called by the at least one function call; a characteristic of the function routine, wherein the characteristic is detectable via the data processor on execution of the function routine; a frace channel accessible to the data processor; and an identifier of the characteristic that is saved to the trace channel via operation of the data processor, upon detection of the characteristic.
16. The run-time tracer of claim 15, wherein the trace channel is a circular buffer written to by copy direct from the data processor.
17. A shared memory for run-time fracing, comprising: an executable program, including a function call to a function routine and a trace point corresponding to and identifying the function call; and an address of the shared memory wherein the executable program writes frace information associated with the frace point during program run-time. wherein the shared memory is simultaneously accessible at the address to multiple instances of the executable program during multiple runs.
18. The shared memory of claim 17, wherein the shared memory is selectively configured during execution of the executable program to capture select ones of the frace points, in order to permit fracing via the run-time fracing of only select ones of the frace points.
19. The shared memory of claim 18, further comprising a confrol channel of the shared memory, wherein a data in the control channeldictates the select ones of the frace points involved in the run-time fracing.
20. The shared memory of claim 17, wherein the shared memory is concurrently connected and accessible to a plurality of run-time instances of execution of the program.
21. The shared memory of claim 20, wherein the shared memory contains trace information related to frace points encountered in a most current run-time instance of execution of the program, as well as past instances.
22. A method of run-time fracing, comprising the steps of: processing a data; storing the data in a memory; programming the step of processing to perform a function routine, so that at least one trace point is associated with at least one function call of the function routine; and storing a trace id in a database, the frace id serving to uniquely identify the at least one frace point.
23. The method of claim 22, wherein the step of programming is performed via an object code readable in the step of processing, and wherein the object code includes the at least one frace point.
24. The method of claim 23, further comprising the step of: relating the frace id to the at least one frace point via the database.
25. The method of claim 25, wherein the memory is communicatively accessible and shared by a plurality of independent steps of processing.
26. The method of claim 22, further comprising the step of reporting a detected characteristic encountered in performance of the function routine, via identification by relation to the trace id.
27. A method of sharing memory for run-time tracing, comprising the steps of: executing a program, the program includes a function call to a function routine and a frace point corresponding to and identifying the function call; writing to a memory communicatively connected to other steps of executing; and capturing a state of the memory.
28. The method of claim 28, further comprising the step of selectively accessing the shared memory during the step of executing, in order to frace select ones of a plurality of unique ones of the frace points.
29. The method of claim 29, further comprising the step of controlling the program during the step of executing in order to effect the step of selectively accessing.
30. The method of claim 30, further comprising the steps of concurrently connecting to and accessing the shared memory by independent and plural steps of executing the program.
PCT/US2001/048019 2000-12-21 2001-12-10 Computer software run-time analysis systems and methods WO2002052411A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US25767100P 2000-12-21 2000-12-21
US60/257,671 2000-12-21
US10/014,107 US7058927B2 (en) 2000-12-21 2001-12-10 Computer software run-time analysis systems and methods
US10/014,107 2001-12-10

Publications (2)

Publication Number Publication Date
WO2002052411A1 WO2002052411A1 (en) 2002-07-04
WO2002052411A9 true WO2002052411A9 (en) 2003-09-18

Family

ID=26685667

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2001/048019 WO2002052411A1 (en) 2000-12-21 2001-12-10 Computer software run-time analysis systems and methods

Country Status (2)

Country Link
US (1) US7058927B2 (en)
WO (1) WO2002052411A1 (en)

Families Citing this family (60)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6813731B2 (en) * 2001-02-26 2004-11-02 Emc Corporation Methods and apparatus for accessing trace data
DE10119265A1 (en) * 2001-04-20 2002-10-31 Infineon Technologies Ag Program controlled unit
US7793233B1 (en) 2003-03-12 2010-09-07 Microsoft Corporation System and method for customizing note flags
US7340725B1 (en) * 2004-03-31 2008-03-04 Microsoft Corporation Smart test attributes and test case scenario in object oriented programming environment
JP2005346414A (en) * 2004-06-03 2005-12-15 Fujitsu Ltd Trace processing program, method, and device
US8214819B2 (en) * 2004-07-09 2012-07-03 Hewlett-Packard Development Company, L.P. Determining call counts in a program
US20060059146A1 (en) * 2004-09-16 2006-03-16 International Business Machines Corporation Method and system for tracing components of computer applications
DE102004046611A1 (en) * 2004-09-25 2006-03-30 Robert Bosch Gmbh Method for processing a computer program on a computer system
CN100442302C (en) * 2004-12-21 2008-12-10 国际商业机器公司 Method and system for metering usage of software products with fast run-time identification
US9152531B2 (en) * 2005-02-18 2015-10-06 Green Hills Sofware, Inc. Post-compile instrumentation of object code for generating execution trace data
US8266608B2 (en) * 2005-02-18 2012-09-11 Green Hills Software, Inc. Post-compile instrumentation of object code for generating execution trace data
US7849364B2 (en) * 2005-03-01 2010-12-07 Microsoft Corporation Kernel-mode in-flight recorder tracing mechanism
US7774760B2 (en) * 2005-12-23 2010-08-10 Microsoft Corporation Tracing errors in software
US20070245313A1 (en) * 2006-04-14 2007-10-18 Microsoft Corporation Failure tagging
GB0623354D0 (en) * 2006-11-23 2007-01-03 Ibm Software tracing
US8677194B2 (en) * 2006-11-29 2014-03-18 Red Hat, Inc. Method and system for site configurable error reporting
US7788540B2 (en) * 2007-01-31 2010-08-31 Microsoft Corporation Tracking down elusive intermittent failures
US7673178B2 (en) * 2007-01-31 2010-03-02 Microsoft Corporation Break and optional hold on failure
US8490073B2 (en) * 2007-03-30 2013-07-16 International Business Machines Corporation Controlling tracing within compiled code
US20090132860A1 (en) * 2007-11-21 2009-05-21 Inventec Corporation System and method for rapidly diagnosing bugs of system software
GB2458568B (en) * 2008-03-27 2012-09-19 Covertix Ltd System and method for dynamically enforcing security policies on electronic files
US7543187B1 (en) 2008-06-04 2009-06-02 International Business Machines Corporation Method to dynamically filter active system state (live dump) data
US8060783B2 (en) * 2009-02-20 2011-11-15 International Business Machines Corporation Distributed runtime diagnostics in hierarchical parallel environments
CN102073489A (en) * 2009-11-23 2011-05-25 新奥特(北京)视频技术有限公司 Method and device for generating debug log
US8850403B2 (en) * 2009-12-04 2014-09-30 Sap Ag Profiling data snapshots for software profilers
US8527960B2 (en) * 2009-12-04 2013-09-03 Sap Ag Combining method parameter traces with other traces
US8584098B2 (en) * 2009-12-04 2013-11-12 Sap Ag Component statistics for application profiling
US9129056B2 (en) * 2009-12-04 2015-09-08 Sap Se Tracing values of method parameters
US9367418B2 (en) * 2012-02-28 2016-06-14 Tata Consultancy Services Limited Application monitoring
JP6036089B2 (en) * 2012-09-25 2016-11-30 日本電気株式会社 Data transition trace device, data transition trace method, and data transition trace program
US8954546B2 (en) 2013-01-25 2015-02-10 Concurix Corporation Tracing with a workload distributor
US8924941B2 (en) 2013-02-12 2014-12-30 Concurix Corporation Optimization analysis using similar frequencies
US20130283281A1 (en) * 2013-02-12 2013-10-24 Concurix Corporation Deploying Trace Objectives using Cost Analyses
US8997063B2 (en) 2013-02-12 2015-03-31 Concurix Corporation Periodicity optimization in an automated tracing system
US20130227529A1 (en) 2013-03-15 2013-08-29 Concurix Corporation Runtime Memory Settings Derived from Trace Data
WO2014171982A1 (en) * 2013-04-20 2014-10-23 Concurix Corporation Tracer list for automatically controlling tracer behavior
US8978016B2 (en) 2013-04-20 2015-03-10 Concurix Corporation Error list and bug report analysis for configuring an application tracer
US20140317604A1 (en) * 2013-04-20 2014-10-23 Concurix Corporation Real Time Analysis of Tracer Summaries to Change Tracer Behavior
US8966452B2 (en) 2013-04-20 2015-02-24 Concurix Corporation User interaction analysis of tracer data for configuring an application tracer
US9575874B2 (en) 2013-04-20 2017-02-21 Microsoft Technology Licensing, Llc Error list and bug report analysis for configuring an application tracer
US9021445B2 (en) 2013-04-20 2015-04-28 Concurix Corporation Tracer list for automatically controlling tracer behavior
US20140317603A1 (en) * 2013-04-20 2014-10-23 Concurix Corporation Multiple Tracer Configurations Applied on a Function-by-Function Level
US8990777B2 (en) 2013-05-21 2015-03-24 Concurix Corporation Interactive graph for navigating and monitoring execution of application code
US9734040B2 (en) 2013-05-21 2017-08-15 Microsoft Technology Licensing, Llc Animated highlights in a graph representing an application
US9280841B2 (en) 2013-07-24 2016-03-08 Microsoft Technology Licensing, Llc Event chain visualization of performance data
US9292415B2 (en) 2013-09-04 2016-03-22 Microsoft Technology Licensing, Llc Module specific tracing in a shared module environment
US9672134B2 (en) * 2013-10-11 2017-06-06 Red Hat, Inc. Scripted multiprocess probing without system privilege
CN105765560B (en) 2013-11-13 2019-11-05 微软技术许可有限责任公司 The component software executed based on multiple tracking is recommended
EP3069241B1 (en) 2013-11-13 2018-08-15 Microsoft Technology Licensing, LLC Application execution path tracing with configurable origin definition
US10289411B2 (en) * 2013-11-18 2019-05-14 Microsoft Technology Licensing, Llc Diagnosing production applications
US10049027B2 (en) * 2013-12-23 2018-08-14 International Business Machines Corporation Creating trace data from recent software output and activity
WO2015132637A1 (en) * 2014-03-05 2015-09-11 Concurix Corporation N-gram analysis of software behavior in production and testing environments
US9355016B2 (en) 2014-03-05 2016-05-31 Microsoft Technology Licensing, Llc Automated regression testing for software applications
US9329980B2 (en) 2014-03-05 2016-05-03 Microsoft Technology Licensing, Llc Security alerting using n-gram analysis of program execution data
US9594665B2 (en) 2014-03-05 2017-03-14 Microsoft Technology Licensing, Llc Regression evaluation using behavior models of software applications
US9880915B2 (en) 2014-03-05 2018-01-30 Microsoft Technology Licensing, Llc N-gram analysis of inputs to a software application
US9983918B2 (en) * 2015-10-30 2018-05-29 Oracle International Corporation Continuous capture of replayable database system workload
CN105550104B (en) * 2015-12-08 2018-04-20 北京奇虎科技有限公司 Application program capacity test method and device
US10534692B2 (en) 2016-03-31 2020-01-14 Microsoft Technology Licensing, Llc Tagged tracing, logging and performance measurements
US10891326B2 (en) * 2017-01-05 2021-01-12 International Business Machines Corporation Representation of a data analysis using a flow graph

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729676A (en) * 1993-12-10 1998-03-17 Nec Corporation Method of generating data for evaluating programs
US5581696A (en) * 1995-05-09 1996-12-03 Parasoft Corporation Method using a computer for automatically instrumenting a computer program for dynamic debugging
US5842017A (en) * 1996-01-29 1998-11-24 Digital Equipment Corporation Method and apparatus for forming a translation unit
US6202199B1 (en) * 1997-07-31 2001-03-13 Mutek Solutions, Ltd. System and method for remotely analyzing the execution of computer programs
US6311327B1 (en) * 1998-03-02 2001-10-30 Applied Microsystems Corp. Method and apparatus for analyzing software in a language-independent manner
US5968188A (en) * 1998-03-10 1999-10-19 Grammar Engine System for providing real-time code coverage
US6249907B1 (en) * 1998-03-24 2001-06-19 International Business Machines Corporation Method system and article of manufacture for debugging a computer program by encoding user specified breakpoint types at multiple locations in the computer program
US6164841A (en) * 1998-05-04 2000-12-26 Hewlett-Packard Company Method, apparatus, and product for dynamic software code translation system
US6381735B1 (en) * 1998-10-02 2002-04-30 Microsoft Corporation Dynamic classification of sections of software
US6499137B1 (en) * 1998-10-02 2002-12-24 Microsoft Corporation Reversible load-time dynamic linking

Also Published As

Publication number Publication date
US20020138788A1 (en) 2002-09-26
WO2002052411A1 (en) 2002-07-04
US7058927B2 (en) 2006-06-06

Similar Documents

Publication Publication Date Title
US7058927B2 (en) Computer software run-time analysis systems and methods
US7877642B2 (en) Automatic software fault diagnosis by exploiting application signatures
US8732673B2 (en) Automated debugging system and method
US10380350B1 (en) Efficient and comprehensive source code fuzzing
US8051409B1 (en) Monitoring memory accesses for multiple computer processes
US7509632B2 (en) Method and apparatus for analyzing call history data derived from execution of a computer program
US7316005B2 (en) Data race detection using sequential program analysis
US7353427B2 (en) Method and apparatus for breakpoint analysis of computer programming code using unexpected code path conditions
US7698691B2 (en) Server application state
US20170132119A1 (en) Method and device for retrieving test case based on code coverage
US7908590B1 (en) System and method for automatically creating test cases through a remote client
US7900198B2 (en) Method and system for parameter profile compiling
US7882495B2 (en) Bounded program failure analysis and correction
US9146831B2 (en) Sampling based runtime optimizer for efficient debugging of applications
US20070006037A1 (en) Automated test case result analyzer
US20080313208A1 (en) Apparatus, system, and method for automated context-sensitive message organization
US7096339B2 (en) System and method for detecting memory management programming errors
WO2017044069A1 (en) Automatic regression identification
WO2017164856A1 (en) Comparable user interface object identifications
CN112765032A (en) Program debugging method, device, equipment and storage medium
Ding et al. Automatic Software Fault Diagnosis by Exploiting Application Signatures.
US9032372B2 (en) Runtime environment and method for non-invasive monitoring of software applications
Ren et al. Relational Debugging---Pinpointing Root Causes of Performance Problems
Yuning A study of object creators in JavaScript
Umukoro et al. Automated Debugging System

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ PL PT RO RU SD SE SG SI SK SL TJ TM TR TT TZ UA UG UZ VN YU ZA ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
COP Corrected version of pamphlet

Free format text: PAGES 1/8-6/8 AND 8/8, DRAWINGS, REPLACED BY NEW PAGES 1/8-6/8 AND 8/8; DUE TO LATE TRANSMITTAL BY THE RECEIVING OFFICE

REG Reference to national code

Ref country code: DE

Ref legal event code: 8642

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP

WWW Wipo information: withdrawn in national office

Country of ref document: JP

DPE2 Request for preliminary examination filed before expiration of 19th month from priority date (pct application filed from 20040101)