Subroutine Call Tree Pruning for Software Diagnostics
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Software diagnostics tools face challenges in efficiently collecting detailed data during subroutine execution in production environments, leading to increased latency and resource overhead, as existing methods require altering source code and processing data post-execution.
Innovation Solution
A method and apparatus that monitor and collect subroutine call information, pruning the subroutine call tree to include only selected calls and their parent calls for detailed data recording, reducing resource usage by filtering out uninteresting branches during execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If detailed subroutine call data is collected during execution, then problem diagnosis capability is improved, but system latency and resource overhead increase
Solution Approach 1:
The patent extracts only the necessary subroutine call data for problem diagnosis while leaving out unnecessary data. By selectively collecting data only for subroutines that are ancestors of error-throwing subroutines, the system achieves precise problem diagnosis without the overhead of collecting data from all subroutines, thus resolving the contradiction between measurement precision and time loss.
Solution Approach 2:
The patent segments the subroutine call tree into relevant and irrelevant portions. By identifying and isolating only the ancestor subroutines of error-throwing subroutines, the system divides the data collection task into manageable segments, collecting detailed information only where needed while skipping other portions, thereby reducing overall latency while maintaining diagnostic capability.
2Measurement precision
If comprehensive subroutine data is recorded, then root cause identification is improved, but system resource consumption increases
Solution Approach 1:
The patent extracts only the essential data from the subroutine call tree - specifically data from ancestor subroutines of error-throwing subroutines. This extraction approach ensures comprehensive root cause identification is achieved by capturing all relevant information in the call chain, while avoiding the resource consumption of collecting data from unrelated subroutines.
Solution Approach 2:
The patent applies partial action by collecting data from a subset of subroutines rather than all subroutines. By focusing data collection only on ancestor subroutines that are necessary for root cause identification, the system achieves sufficient diagnostic information without the excessive resource consumption of comprehensive data collection from the entire subroutine call tree.
3Measurement precision
If source code is altered for data collection, then data accuracy is improved, but ease of deployment worsens
Solution Approach 1:
The patent introduces an intermediary mechanism that collects subroutine call data without directly altering the source code. By using a separate data collection layer that intercepts and records calls to ancestor subroutines, the system maintains data accuracy while avoiding source code modification, thus improving ease of deployment compared to methods requiring code changes.
4Loss of information
If all subroutine calls are monitored, then complete execution trace is obtained, but processing overhead increases
Solution Approach 1:
The patent extracts only the necessary portion of the execution trace by collecting data from ancestor subroutines of error-throwing subroutines. This extraction maintains sufficient execution trace completeness for problem diagnosis while eliminating the processing overhead of monitoring and storing data from all subroutine calls in the system.
Solution Approach 2:
The patent segments the execution trace collection into relevant ancestor subroutines and irrelevant other subroutines. By dividing the monitoring task and focusing only on the segmented portion that contains error-related information, the system achieves adequate execution trace completeness for root cause analysis while significantly improving processing efficiency by skipping unnecessary monitoring.
Data Source
AI summary
According to one general aspect, a method may include monitoring the execution of at least a portion of a software application. The method may also include collecting subroutine call information regarding a plurality of subroutine calls included by the portion of the software application, wherein one or more of the subroutine calls is selected for detailed data recording. The method may further include pruning, as the software application is being executed, a subroutine call tree to include only the subroutine calls selected for detailed data recording and one or more parent subroutine calls of each subroutine calls selected for detailed data recording.


