Trampoline Function Code for Dynamic Native Instrumentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Monitoring distributed web applications is challenging due to their complex topology and dynamic nature, making it difficult to instrument them without introducing latency and performance issues.

Innovation Solution

The implementation of code trampolining techniques generates custom trampoline functions that match the signature of native functions, allowing seamless operation between the source and destination functions, enabling monitoring and modification of distributed business transactions without requiring application recompilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If applications are modified to monitor distributed web applications, then monitoring capability is improved, but latency and performance issues worsen

Engineering Contradiction:
Improvemonitoring capabilityVSAvoidlatency
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent introduces trampoline functions as intermediary components between the original application code and the monitoring system. These trampoline functions act as mediators that enable monitoring capabilities while minimizing direct modification impact on application performance, thereby reducing latency introduced by instrumentation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The monitoring system is segmented into separate trampoline function modules that can be dynamically loaded and configured. This segmentation allows the monitoring logic to be isolated from the main application flow, enabling selective instrumentation of specific functions without uniformly impacting the entire application's performance.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If applications are modified to monitor distributed web applications, then monitoring capability is improved, but device complexity worsens

Engineering Contradiction:
Improvemonitoring capabilityVSAvoidapplication complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

Trampoline functions serve as intermediary layers that abstract the complexity of monitoring integration from the main application. The application only needs to call these standardized trampoline functions, while the complex monitoring logic is encapsulated within the trampoline implementation, thus reducing apparent application complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The trampoline function mechanism provides a universal interface for monitoring that can be applied across multiple functions and services in the distributed system. This multi-functional approach allows a single trampoline framework to handle diverse monitoring requirements, reducing the need for separate complex instrumentation code for each monitored element.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10203970B2Dynamic configuration of native functions to intercept
Publication Date: 2019.02.12 CISCO TECHNOLOGY INC
  • US10203970B2 patent drawing
  • US10203970B2 patent drawing
  • US10203970B2 patent drawing

AI summary

A system implements code trampolining techniques by generating custom trampoline functions, compiling the functions, and executing the compiled functions directly from a library when the corresponding native function is called. The native functions may be binary functions, such as functions in C++ code, or other languages. A code generator may read a set of functions to be implemented and generate code, such as binary code, for the destination function. In doing so, the code generator may generate code which matches the source function signature. The generated code may then be compiled into a shared library which is loaded by the process being instrumented. When the library is initiated upon subsequent calls for the native function, the trampoline mechanisms will be set up between the source function and the generated destination function to operate seamlessly with matching signatures.