User Callstack Trace Generation for Parallel Programming Debugging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional tools fail to provide a callstack trace that aligns with user code logic, making it difficult for programmers to debug and profile high-level parallel programming languages due to differences between native and user callstacks caused by runtime libraries and threads.
Innovation Solution
A method to construct a user callstack trace by compiling user programs to generate executable code with artificial functions, executing these functions across multiple execution entities, and storing task records to recreate a user callstack that reflects the user's program logic, independent of outlined functions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional tools are used to generate callstack traces, then the trace includes all runtime library and thread functions, but the trace does not align with user code logic, making debugging difficult
Solution Approach 1:
The patent segments the callstack trace into two distinct parts: the user code portion and the runtime library portion. By separating these segments, the system can present a simplified user callstack that shows only the user's function calls in logical order, while the full native callstack retains all runtime details. This segmentation resolves the contradiction by providing both a clean view for debugging and complete information for analysis.
Solution Approach 2:
The patent introduces an intermediary layer (the user callstack mechanism) that sits between the native callstack and the programmer. This intermediary translates the complex native callstack containing runtime library functions into a simplified representation that shows only user code relationships. The intermediary filters out irrelevant runtime functions while preserving the logical caller-callee relationships in user code, thereby improving trace accuracy without losing essential information.
2Reliability
If the native callstack is used during concurrent execution, then all execution entities and runtime threads are captured, but the caller-callee relationships in user code become difficult to locate
Solution Approach 1:
The patent extracts the user code portion from the complete native callstack, separating it from the runtime library functions and thread management code. By taking out only the relevant user function calls and presenting them in a dedicated user callstack, the system maintains complete execution trace information while making it easy for programmers to locate and analyze caller-callee relationships in their own code without being distracted by runtime implementation details.
3Loss of information
If outlined functions are included in the callstack, then the complete execution path is recorded, but the user program logic becomes obscured by artificial functions
Solution Approach 1:
The patent creates a copy of the callstack information specifically tailored for user code analysis. Instead of presenting the raw native callstack with all its outlined functions and runtime artifacts, the system generates a user callstack that is a filtered copy showing only the user's original function calls. This copying approach preserves the essential execution information while eliminating the obscuring outlined functions, thereby maintaining code logic correspondence.
Data Source
AI summary
A system and method for constructing a user callstack trace in a computer to monitor a user defined Function of a user program in relation to one or more predetermined events is provided. The system and method provides generating a user callstack trace for display to the user from data in memory in relation to a predetermined event of interest to the user. The user callstack trace communicates information corresponding to the execution of the Function for the predetermined event independent of the plurality of outlined functions. The plurality of outlined functions are artificially generated in response to compiling the user program having the Function.


