Hierarchical Time Tree for Efficient Program Profiling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional profiling techniques require accessing and processing large volumes of call stack samples to generate profile reports, which can be inefficient and time-consuming, especially in multi-threaded applications where sampling occurs for each thread.

Innovation Solution

The construction and use of a hierarchical time tree that represents an execution time of a program, allowing for efficient evaluation and reporting by recursively populating nodes, where each node represents a time interval and includes only the most frequently occurring call stacks, reducing the need to access all call stack samples.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional profiling techniques access and process large volumes of call stack samples to generate profile reports, then the completeness and accuracy of profiling data is improved, but the time consumption and processing efficiency deteriorate

Engineering Contradiction:
Improveprofiling data accuracyVSAvoidreport generation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the call stack data by organizing it into a hierarchical tree structure where the root node represents the main program and child nodes represent called functions. This segmentation allows the system to process and present data in a structured manner, accessing only relevant portions of the call stack rather than processing all samples linearly, thus reducing time consumption while maintaining profiling accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary action by pre-processing call stack samples and organizing them into a hierarchical tree structure during the profiling execution. This pre-organization allows for rapid query and report generation later, as the data is already structured and indexed, eliminating the need to re-process raw samples when generating reports.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If call stacks are sampled at periodic intervals throughout program execution, then the coverage of profiling data is improved, but the volume of recorded data increases linearly

Engineering Contradiction:
Improveprofiling coverageVSAvoiddata volume
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent merges redundant call stack information by identifying common ancestral chains in the call stack tree. When multiple call stacks share common functions in their call chains, the patent represents these shared portions once in the hierarchical structure, merging duplicate data and significantly reducing the overall data volume while preserving complete profiling coverage.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent applies the nested doll principle by creating a hierarchical tree structure where child nodes (representing called functions) are nested within parent nodes (representing calling functions). This nesting allows the system to represent deeply nested call stacks in a compact form, where shared ancestral chains are represented once at higher levels, reducing data volume while maintaining full profiling coverage.

Inventive Principle:
Principle #7Nested doll (Nesting)

3Measurement precision

If the call stack tree is augmented by adding nodes for each unique call stack encountered, then the completeness of call stack representation is improved, but the complexity of data structure increases

Engineering Contradiction:
Improvecall stack representation completenessVSAvoiddata structure complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies universality by creating a multi-functional hierarchical tree structure that serves multiple purposes: it represents complete call stack information, enables efficient querying for different time periods, supports dynamic re-evaluation when time periods change, and provides a compact representation by merging common ancestral chains. This single structure fulfills multiple functions that would otherwise require separate data structures.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent transitions from a linear one-dimensional representation of call stacks to a hierarchical multi-dimensional tree structure. By organizing call stack data in hierarchical levels (root node representing main program, child nodes representing called functions), the system gains the ability to efficiently query and manipulate data based on different dimensions such as time period, function hierarchy, and call frequency, reducing structural complexity while maintaining completeness.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentEP2609501B1Dynamic calculation of sample profile reports
Publication Date: 2020.05.06 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2609501B1 patent drawingFigure 1
  • EP2609501B1 patent drawingFigure 2~3
  • EP2609501B1 patent drawingFigure 4

AI summary

The construction or use of a hierarchical time tree that represents an execution time of a program. To construct the hierarchical time tree, the time frame corresponding to the root node is the execution time during which the plurality of call stack samples were gathered from the program. Beginning at the root node, and proceeding recursively, each node is then populated in a manner that all of the call stacks for a given time period need not be accessed in order to provide a report regarding the given time period.