Profiling Multi-Threaded Applications Using Inter-Thread Probes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Multi-threaded applications executing on multi-core CPUs often experience slow execution times due to inefficient thread communication and sequential execution designs, lacking a convenient method to analyze performance issues, especially in cross-platform applications.

Innovation Solution

A system and method for visualizing and profiling multi-threaded applications using a portable inter-thread communication mechanism, profiling module, and external interpretation application to monitor and measure thread communications, log information, and create graphic representations of execution metrics, including a timing probe class, dispatch probe class, and timing probe context binder to illustrate thread execution and message traffic.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If multi-threaded applications are designed to execute on multi-core CPUs, then application functionality and parallel processing capability are improved, but execution time remains slow due to inefficient thread communication and sequential execution patterns

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidexecution time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent introduces a profiling system with probe modules as intermediaries between the application threads and the analysis tool. These probes intercept and measure inter-thread communication events, allowing the system to identify bottlenecks in thread coordination without disrupting the application's parallel execution. The profiler acts as a mediator that collects timing information from multiple threads simultaneously, revealing where sequential patterns are causing performance degradation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If applications use numerous computations in one thread while other threads remain idle, then computational accuracy is improved, but CPU utilization decreases to 1/N where N is the number of CPU cores

Engineering Contradiction:
Improvecomputational accuracyVSAvoidCPU utilization
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The profiling system provides feedback by measuring and recording the timing of thread execution and communication events. The graphical user interface displays this feedback information, showing developers exactly when threads are idle versus when they are computing. This feedback loop enables developers to identify patterns where one thread performs computations while others wait, allowing them to restructure the application for better load balancing and CPU utilization.

Inventive Principle:
Principle #23Feedback

3Ease of operation

If applications are designed to execute sequentially with threads passing information one to another, then program simplicity is improved, but execution time increases and multi-core CPU capability is underutilized

Engineering Contradiction:
Improveprogram simplicityVSAvoidexecution time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent applies partial action by profiling only the specific inter-thread communication events that are relevant to performance analysis, rather than monitoring every aspect of thread execution. The probe modules selectively intercept messages passed between threads, focusing measurement efforts on the critical path of communication that causes sequential bottlenecks. This selective profiling maintains program simplicity while identifying opportunities for parallel optimization.

Inventive Principle:
Principle #16Partial or excessive action

4Measurement precision

If profiling tools are introduced to monitor thread execution, then performance analysis capability is improved, but system overhead and complexity increase

Engineering Contradiction:
Improveperformance analysis capabilityVSAvoidsystem overhead
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The profiling system is designed with universal probe modules that can monitor multiple threading models and inter-thread communication mechanisms across different platforms. The same probe infrastructure handles various message passing styles, synchronization primitives, and thread coordination patterns. This multi-functionality reduces the overall system complexity by providing a unified profiling approach rather than requiring separate tools for different threading scenarios.

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

Data Source

PatentUS9552221B1Monitoring application execution using probe and profiling modules to collect timing and dependency information
Publication Date: 2017.01.24 GOOGLE LLC
  • US9552221B1 patent drawing
  • US9552221B1 patent drawing
  • US9552221B1 patent drawing

AI summary

A system and method for analyzing application execution of multi-threaded applications is disclosed. An exemplary system includes a portable inter-thread communication mechanism; a profiling module; and an external interpretation application. A communication mechanism may be used to implement communication among a plurality of application threads. Responsive to an indication that an application should be monitored, a profiling module may profile at least one of a plurality of application threads to monitor and measure the thread's communications. Profiling information may be logged and the log may be provided to the external interpretation application. The external interpretation application may then parse the log and produce a graphic representation of execution metrics based on the information parsed from the log. The graphic representation may allow an end-user to acquire information and determine several statistics regarding the application's execution.