Compiled Query Execution With Two-Stage Debug Instrumentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing distributed computing systems face challenges in optimizing query processing time due to the trade-off between emphasizing program speed and diagnostic capabilities, such as debugging, which can interfere with fault diagnosis.
Innovation Solution
A two-stage compilation approach is employed, where a first version of the program is compiled for speed and size optimizations without instrumentation, and a second version is compiled with instrumentation for debugging, allowing initial requests to be processed quickly while subsequent requests benefit from diagnostic procedures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If executable programs are compiled with speed optimizations, then program execution speed is improved, but diagnostic capabilities deteriorate
Solution Approach 1:
The patent divides the compilation process into two separate stages: a fast initial compilation that generates optimized executable code without instrumentation, and a subsequent compilation that generates instrumented code for debugging. This segmentation allows each compilation to be optimized for its specific purpose, resolving the contradiction between execution speed and diagnostic capability.
Solution Approach 2:
The patent performs a preliminary compilation with speed optimizations before debugging is needed. This preliminary action establishes the performance-optimized executable, and only when debugging requirements arise does the system perform the second compilation with instrumentation, thus maintaining speed while enabling diagnostics when necessary.
2Difficulty of detecting and measuring
If executable programs include instrumentation for debugging, then diagnostic capabilities are improved, but program execution speed deteriorates
Solution Approach 1:
The patent implements a dynamic approach where the system can switch between two compiled versions of the program based on operational needs. The instrumented version is compiled and made available when debugging is required, while the optimized version remains available for normal operation, allowing the system to adapt its characteristics dynamically.
Solution Approach 2:
The patent creates a copy of the program source code and compiles it with different settings (instrumentation enabled) than the original performance-optimized version. This copying approach allows the instrumented version to be used solely for debugging purposes without affecting the performance of the primary executable.
3Device complexity
If a single compiled program is used for both performance and debugging, then device complexity is reduced, but both performance and diagnostic efficiency deteriorate
Solution Approach 1:
The patent segments the compilation system into two distinct compilation processes with different optimization goals. This segmentation, while slightly increasing system complexity, enables both the performance-optimized and debuggable versions to coexist, thereby improving overall query processing efficiency by allowing rapid execution of optimized code during normal operation.
Data Source
AI summary
A computing system may comprise a master computing node and a servant computing node. The master may compile a query to form a first version of a program that performs the query on the servant. The first version of the program may be compiled using a compiler configuration that excludes instrumentation, in order to reduce latency associated with the initial processing of the query. A second version of the program may be compiled with instrumentation, and may be executed in response to subsequent requests to process the query.


