Patent ID: 7620940

Claim:
A method of monitoring an execution of a program comprising the steps of: maintaining a program execution event database comprising a plurality of runtime data tables, each runtime data table comprising one or more records, each of the plurality of runtime data tables corresponding to a respective method or object such that the records within a given runtime data table represent respective invocations of the corresponding method or respective allocations of the corresponding object; constructing at least one relational query, wherein the at least one relational query correlates at least one record within each of two or more of the plurality of runtime data tables; compiling the at least one relational query into a program instrumentation; incorporating the program instrumentation into the program, wherein the program is in an executable form; obtaining one or more query results based on the at least one relational query and the program execution event database; and outputting one or more query results from the program as the program executes; wherein at least the maintaining, compiling, incorporating, obtaining and outputting steps are performed by one or more processors operatively coupled to one or more memories for storing the program execution event database and the program; and wherein the step of maintaining a program execution event database comprising a plurality of runtime data tables comprises the steps of: filtering one or more instrumentation sites that violate a static predicate of the query; filtering one or more records of at least one evaluated predicate of a query having a single record; preventing the recording of irrelevant events at the runtime data tables; and discarding records from the one or more runtime data tables that are no longer relevant from the runtime data tables.