Loop Performance Measurement Accuracy via Inner Loop Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Performance measurement codes for inner loops can adversely affect the measurement accuracy of outer loops, leading to inflated performance measurement values due to the inclusion of measurement codes within the outer loop's processing time.

Innovation Solution

A compiling apparatus and method that determines the presence of inner loops and processing codes within loops, strategically adding performance measurement codes only when both an inner loop and processing code are present or when no inner loop is included, thereby minimizing the impact on outer loop measurements by controlling the TRGT flag to optimize code insertion.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If performance measurement codes are added to all loops including inner loops, then measurement coverage is improved, but measurement accuracy deteriorates due to inflated values from nested measurement codes

Engineering Contradiction:
Improveperformance measurement accuracyVSAvoidmeasurement value reliability
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent segments the loop structure analysis by identifying outer loops and inner loops separately. It adds performance measurement codes only to outer loops that do not contain inner loops, or to inner loops that are not contained within other loops. This segmentation prevents nested measurement codes from inflating each other's measurements, thereby resolving the contradiction between measurement coverage and measurement accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the performance measurement code addition logic from a blanket approach and applies it selectively. By extracting inner loops from the set of loops eligible for measurement code insertion, the patent avoids the problem of nested measurement codes affecting each other's accuracy, thus improving measurement reliability without sacrificing overall measurement coverage.

Inventive Principle:
Principle #2Taking out (Extraction)

2Measurement precision

If performance measurement codes are added to outer loops containing inner loops, then outer loop measurement coverage is improved, but measurement overhead increases due to multiple nested measurement codes

Engineering Contradiction:
Improveouter loop measurement coverageVSAvoidmeasurement overhead
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent extracts inner loops from the candidate set for measurement code insertion in outer loops. By removing the inner loop measurement codes from consideration when an outer loop already has measurement codes, the patent eliminates redundant nested measurements, thereby reducing measurement overhead and time loss while maintaining outer loop measurement coverage.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by selectively adding measurement codes only where necessary - specifically to outer loops without inner loops, or to inner loops that are not nested within other measured loops. This partial approach avoids the excessive action of adding measurement codes to all loops, thereby reducing unnecessary measurement overhead while maintaining adequate measurement coverage.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS10534691B2Apparatus and method to improve accuracy of performance measurement for loop processing in a program code
Publication Date: 2020.01.14 FUJITSU LTD
  • US10534691B2 patent drawing
  • US10534691B2 patent drawing
  • US10534691B2 patent drawing

AI summary

An apparatus, for a first loop included in a program code, determines whether an inner loop is included in the first loop. When the inner loop is included in the first loop, the apparatus determines whether a processing code other than the inner loop is included in the first loop. When both the inner loop and the processing code other than the inner loop are included in the first loop or when no inner loop is included in the first loop, the apparatus adds a performance measurement code for conducting performance measurement of the first loop to the program code.