# US 9,436,589 B2 · Increasing performance at runtime from trace data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,436,589 B2
- Document ID: US9436589B2
- Status: Granted
- Kind: B2
- Application number: 13/853,769
- Filed: 2013-03-29
- Published: 2013-08-29
- Granted: 2016-09-06
- Earliest claimed: 2013-03-15
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Ying Li; Alexander G. Gounares; Charles D. Garrett; Russell S. Krajec
- Web page: https://patentgrep.com/patent/US9436589B2

## CPC

- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 8/443: {Optimisation}
- G06F 8/70: Software maintenance or management
- G06F 9/46: Multiprogramming arrangements
- G06F 9/505: {considering the load}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 11/323: {Visualisation of programs or trace data}
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/3495: {for systems}
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 11/3636: {by tracing the execution of the program}
- H04L 43/00: Arrangements for monitoring or testing data switching networks
- G06F 11/3409: {for performance assessment}
- G06F 11/3414: {Workload generation, e.g. scripts, playback}
- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F 2201/805: Real-time
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F 2201/865: Monitoring of software
- G06F 2201/88: Monitoring involving counting
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

An analysis system may perform network analysis on data gathered from an executing application. The analysis system may identify relationships between code elements and use tracer data to quantify and classify various code elements. In some cases, the analysis system may operate with only data gathered while tracing an application, while other cases may combine static analysis data with tracing data. The network analysis may identify groups of related code elements through cluster analysis, as well as identify bottlenecks from one to many and many to one relationships. The analysis system may generate visualizations showing the interconnections or relationships within the executing code, along with highlighted elements that may be limiting performance.

## Claims

### Claim 1

A computer-implemented method for optimizing runtime execution of an application based on tracer data, the computer-implemented method being performed by one or more processors executing computer executable instructions for the computer-implemented method, and the computer-implemented method comprising:
tracing an application and gathering performance data for identifying a plurality of code elements related to said application;
gathering and storing tracer data for the plurality of code elements, the tracer data comprising:
performance data for one or more of the identified plurality of code elements; and
relationship data for one or more of the identified plurality of code elements;
based on the stored tracer data, generating a network representation for the plurality of code elements, the network representation comprising:
nodes representing code elements; and
edges that connect the plurality of nodes in various ways, the edges representing relationships between connected code elements;
analyzing said network representation and identifying as a result of the analysis one or more node patterns of a set of pre-determined node patterns in which at least three or more code elements interact with one another, wherein the identified node patterns indicate specific classifications for their constituent code elements of the identified node patterns, and wherein the specific classification indicates which of various optimization algorithms to apply to a given code element of interest;
applying the indicated algorithms to the respective code elements of interest to generate a runtime configuration that applies runtime setting to the code elements;
storing the runtime configuration; and
using the runtime configuration for the application when running the application in a runtime environment.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the gathered and stored tracer data that comprises performance data further comprises any or any combination of the following:
identifying one or both of wait states and locks;
identifying memory usage;
identifying message passing relationships; and
identifying shared memory relationships.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein at least one identified message passing relationship or shared memory relationship is directional.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein directionality of an identified shared memory relationship is indicated when one code element depends on another code element.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the performance data comprises resource consumption data.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein the resource consumption data comprises processor utilization.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein at least one of the optimization algorithms identified comprise a set of processor settings, and wherein:
said set of processor settings comprise a first set of settings for a first instance of a first code element of interest, and second set of settings for a second instance of the first code element of interest; and
said first instance of the first code element of interest is defined by a first set of input parameters and said second instance of the first code element of interest is defined by a second set of input parameter.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, wherein gathering and storing tracer data that comprises relationship data further comprises:
collecting operational data;
summarizing the collected operational data; and
using the summarized operational data that is collected to characterize the relationship data.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, wherein one or more of the gathered and stored tracer data that comprises performance data and relationship data is, prior to generating and analyzing the network representation, used to classify one or more code elements or one or more relationships between code elements, or both.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein one or more relationships between code elements is classified as one of the following:
a strong relationship which represents large amounts of shared data or many messages being passed between code elements connected by the strong relationship; and
a weak relationship which represents little shared data or few messages being passed between code elements connected by the weak relationship.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, wherein the one or more identified node patterns and the particular node pattern on which the one or more identified optimizations is based comprise any or any combination of the following:
a pipeline node pattern;
a parallel node pattern;
a cluster node pattern; and
a star node pattern.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein for one or more node patterns or one or more code elements of a node pattern, or both, the following is performed for each identified optimization:
identifying process allocation and scheduler settings;
identifying memory allocation settings; and
storing the identified process allocation, scheduler and memory settings in a runtime configuration.

### Claim 13

A computer program product comprising a computer storage device containing computer-executable instructions for a computer-implemented method for optimizing runtime execution of an application based on tracer data, the computer- implemented method being performed by one or more processors executing the computer executable instructions, and wherein the computer-implemented method comprises:
tracing an application and identifying a plurality of code elements related to said application;
gathering and storing tracer data for the plurality of code elements, the tracer data comprising:
performance data for one or more of the identified plurality of code elements; and
relationship data for one or more of the identified plurality of code elements;
based on the stored tracer data, generating a network representation for the plurality of code elements, the network representation comprising:
nodes representing code elements; and
edges that connect the plurality of nodes in various ways, the edges representing relationships between connected code elements;
analyzing said network representation and identifying as a result of the analysis one or more node patterns of a set of pre-determined node patterns in which at least three or more code elements interact with one another, and wherein the identified node patterns indicate specific classifications for constituent code elements of the identified node patterns, and wherein the specific classification indicates which of various optimization algorithms to apply to a given code element of interest;
applying the indicated algorithms to the each respective code element of interest to generate a runtime configuration that applies runtime settings to the code elements;
storing the runtime configuration; and
using the runtime configuration for the application when running the application in a runtime environment.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the gathered and stored tracer data that comprises performance data further comprises any or any combination of the following:
identifying one or both of wait states and locks;
identifying memory usage;
identifying message passing relationships; and
identifying shared memory relationships.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein at least one identified message passing relationship or shared memory relationship is directional.

### Claim 16 (depends on 15)

The computer program product of claim 15 wherein directionality of an identified shared memory relationship is indicated when one code element depends on another code element.

### Claim 17 (depends on 13)

The computer program product of claim 13, wherein the performance data comprises resource consumption data.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the resource consumption data comprises processor utilization.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein at least one of the optimization algorithms identified comprise a set of processor settings, and wherein:
said set of processor settings comprise a first set of settings for a first instance of a first code element of interest, and second set of settings for a second instance of the first code element of interest; and
said first instance of the first code element of interest is defined by a first set of input parameters and said second instance of the first code element of interest is defined by a second set of input parameter.

### Claim 20 (depends on 13)

The computer program product of claim 13, wherein gathering and storing tracer data that comprises relationship data further comprises:
collecting operational data;
summarizing the collected operational data; and
using the summarized operational data that is collected to characterize the relationship data.

### Claim 21 (depends on 13)

The computer program product of claim 13, wherein one or more of the gathered and stored tracer data that comprises performance data and relationship data is, prior to generating and analyzing the network representation, used to classify one or more code elements or one or more relationships between code elements, or both.

### Claim 22 (depends on 21)

The computer program product of claim 21, wherein one or more relationships between code elements is classified as one of the following:
a strong relationship which represents large amounts of shared data or many messages being passed between code elements connected by the strong relationship; and
a weak relationship which represents little shared data or few messages being passed between code elements connected by the weak relationship.

### Claim 23

A computer computing system comprising:
one or more processors;
a computer memory device containing computer-executable instructions for a computer-implemented method for optimizing runtime execution of an application based on tracer data, the computer-implemented method being performed by one or more processors executing the computer executable instructions, and wherein the computer-implemented method comprises:
tracing an application and identifying a plurality of code elements related to said application;
gathering and storing tracer data for the plurality of code elements, the tracer data comprising:
performance data for one or more of the identified plurality of code elements; and
relationship data for one or more of the identified plurality of code elements;
based on the stored tracer data, generating a network representation for the plurality of code elements, the network representation comprising:
nodes representing code elements; and
edges that connect the plurality of nodes in various ways, the edges representing relationships between connected code elements;
analyzing said network representation and identifying as a result of the analysis one or more node patterns of a set of pre-determined node patterns in which at least three or more code elements interact with one another, and wherein the identified patterns indicate specific classifications for constituent code elements of the identified node patterns, and wherein the specific classification indicates which of various optimization algorithms to apply to a given code element of interest;
applying the indicated algorithms to each respective code element of interest to generate a runtime configuration that applies runtime settings to the code elements;
storing the runtime configuration; and
using the runtime configuration for the application when running the application in a runtime environment.

### Claim 24 (depends on 23)

The computer system of claim 23, wherein the gathered and stored tracer data that comprises performance data further comprises any or any combination of the following:
identifying one or both of wait states and locks;
identifying memory usage;
identifying message passing relationships; and
identifying shared memory relationships.

### Claim 25 (depends on 24)

The computer system claim 24, wherein at least one identified message passing relationship or shared memory relationship is directional.

### Claim 26 (depends on 25)

The computer system claim 25, wherein directionality of an identified shared memory relationship is indicated when one code element depends on another code element.

### Claim 27 (depends on 23)

The computer system claim 23, wherein the performance data comprises resource consumption data.

### Claim 28 (depends on 27)

The computer system claim 27, wherein the resource consumption data comprises processor utilization.

### Claim 29 (depends on 28)

The computer system claim 28, wherein at least one of the optimization algorithms identified comprise a set of processor settings, and wherein:
said set of processor settings comprise a first set of settings for a first instance of a first code element of interest, and second set of settings for a second instance of the first code element of interest; and
said first instance of the first code element of interest is defined by a first set of input parameters and said second instance of the first code element of interest is defined by a second set of input parameter.

### Claim 30 (depends on 23)

The computer system claim 23, wherein gathering and storing tracer data that comprises relationship data further comprises:
collecting operational data;
summarizing the collected operational data; and
using the summarized operational data that is collected to characterize the relationship data.

### Claim 31 (depends on 23)

The computer system of claim 23, wherein one or more of the gathered and stored tracer data that comprises performance data and relationship data is, prior to generating and analyzing the network representation, used to classify one or more code elements or one or more relationships between code elements, or both.

### Claim 32 (depends on 31)

The computer system of claim 31, wherein one or more relationships between code elements is classified as one of the following:
a strong relationship which represents large amounts of shared data or many messages being passed between code elements connected by the strong relationship; and
a weak relationship which represents little shared data or few messages being passed between code elements connected by the weak relationship.
