Sibling Call Context Management via Dynamic Stub Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing environments restrict sibling calls to local callees, limiting their effectiveness due to the inability to generate context information for external function calls, as the linker assumes all calls are local and omits restoration of context information like the Global Offset Table (GOT) pointer.
Innovation Solution
The solution involves marking sibcaller routines that may call external sibling routines, allowing the linker to generate call sequences that store and restore context information, such as the GOT pointer, enabling efficient execution of external sibcalls by inserting appropriate stubs and relocation entries to handle potential external calls.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If sibling calls are restricted to local callees only, then the linker can omit storing context information like GOT pointer, but this limits the effectiveness of sibling calls and prevents external sibling calls
Solution Approach 1:
The linker generates a first stub when the sibcaller is local to the caller routine, and a second stub when the sibcaller is external to the caller routine. This dynamic stub generation resolves the contradiction by adapting the context information handling to the specific call scenario.
Solution Approach 2:
The first stub includes a store instruction to store context information including information to restore an indicator to a global offset table, while the second stub is absent such code. This local quality approach resolves the contradiction by tailoring the stub implementation to the specific call type.
2Speed
If the linker assumes all calls are local and omits context restoration, then code is simpler and faster, but external function calls fail to restore context information like GOT pointer
Solution Approach 1:
The linker determines whether the sibcaller is local or external to the caller routine and generates the appropriate stub type accordingly. This dynamic approach ensures that context restoration is performed only when necessary, maintaining both speed and reliability.
Solution Approach 2:
The first stub includes code to store context information while the second stub is absent such code. This local quality approach ensures that context restoration is performed only when necessary for external calls, resolving the contradiction between speed and reliability.
3Reliability
If stubs include code to store context information for all sibcalls, then external sibling calls work correctly, but local sibling calls incur unnecessary overhead
Solution Approach 1:
The first stub includes a store instruction to store context information, while the second stub is absent such code. This local quality approach ensures that context restoration is performed only when necessary for external calls, resolving the contradiction between reliability and energy efficiency.
Solution Approach 2:
The linker determines whether the sibcaller is local or external to the caller routine and generates the appropriate stub type accordingly. This dynamic approach ensures that context restoration is performed only when necessary, resolving the contradiction between reliability and energy efficiency.
Data Source
AI summary
Optimizations are provided for sibling calls. A sibling caller is marked to indicate that it may call a sibling routine or that it may call an external sibling routine. Based on the marking, certain processing is performed to facilitate use of sibling calls, particularly when the sibling routine being called is external to the caller.


