Sibling Call Context Management via Dynamic Stub Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveeffectiveness of sibling callsVSAvoidcontext information management
Core Design Contradiction:
ProductivityVSDevice complexity

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.

Inventive Principle:
Principle #15Dynamics

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.

Inventive Principle:
Principle #3Local quality

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

Engineering Contradiction:
Improvecall execution speedVSAvoidcontext restoration correctness
Core Design Contradiction:
SpeedVSReliability

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.

Inventive Principle:
Principle #15Dynamics

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.

Inventive Principle:
Principle #3Local quality

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

Engineering Contradiction:
Improveexternal sibcall correctnessVSAvoidunnecessary store operations
Core Design Contradiction:
ReliabilityVSLoss of energy

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.

Inventive Principle:
Principle #3Local quality

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.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10949221B2Executing instructions to store context information based on routine to be executed
Publication Date: 2021.03.16 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10949221B2 patent drawing
  • US10949221B2 patent drawing
  • US10949221B2 patent drawing

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.