Selective Execution Tracing System for Asynchronous Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current debugging techniques face challenges in efficiently tracing and recording execution paths across multiple threads, particularly in production environments, leading to performance slowdowns and large trace file sizes, which hinder the identification and remediation of software bugs.

Innovation Solution

A selective execution tracing system that uses a tracing disablement distance variable to control tracing, enabling tracing only when necessary, thereby reducing computational and storage costs, and focuses on tracing user code while excluding non-user code like kernel, compiler, or garbage collector code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If full execution tracing is performed to capture all state information for debugging, then debugging information completeness is improved, but system performance deteriorates due to execution slowdown

Engineering Contradiction:
Improvedebugging information completenessVSAvoidsystem execution speed
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The patent segments the execution trace into multiple threads of execution, allowing the tracing system to process and record state information in parallel. This segmentation enables the system to maintain complete debugging information while distributing the tracing workload across multiple execution contexts, thereby reducing the performance impact on any single thread.

Inventive Principle:
Principle #1Segmentation

2Loss of information

If comprehensive execution tracing is performed across all code, then debugging coverage is improved, but trace file size increases excessively

Engineering Contradiction:
Improvedebugging coverageVSAvoidtrace file size
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The patent extracts and records only the essential state information needed for debugging purposes, rather than capturing all possible execution data. By selectively extracting relevant state information from the full execution context, the system maintains comprehensive debugging coverage while significantly reducing the volume of trace data that needs to be stored and processed.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If tracing is enabled continuously to capture all execution paths, then bug detection capability is improved, but computational overhead increases

Engineering Contradiction:
Improvebug detection capabilityVSAvoidcomputational overhead
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent implements periodic sampling of execution state information rather than continuous tracing. By periodically capturing state information at strategic points in the execution flow, the system maintains effective bug detection capability while significantly reducing the computational overhead associated with constant tracing operations.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentEP3785125B1Selectively tracing portions of computer process execution
Publication Date: 2023.08.16 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3785125B1 patent drawingFigure 1~3
  • EP3785125B1 patent drawingFigure 4~6
  • EP3785125B1 patent drawingFigure 7~8

AI summary

Described technologies support selectively tracing a process's execution, with some extra tracing done beyond the code the developer wanted traced, but with significantly reduced computational cost, by reducing the number of trace enablement and disablement operations. A trace controller uses a tracing disablement distance variable whose values indicate the computational distance from trace disablement. A distance variable modifier automatically moves the distance variable closer to a stop-tracing value as the process executes. A create task function is modified to include the setting of an indicator that a newly created task is to be traced if a current task or thread is being traced. An execute task function is modified to request the tracing of the newly created task when it is executed based on the indicator, thereby enabling selective tracing that operates across process boundaries and traces asynchronous code execution.