persisting information across application executions n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Persisting Information Across Application Executions PowerPoint Presentation
Download Presentation
Persisting Information Across Application Executions

Loading in 2 Seconds...

play fullscreen
1 / 17

Persisting Information Across Application Executions - PowerPoint PPT Presentation


  • 91 Views
  • Uploaded on

Persisting Information Across Application Executions. Derek Bruening Determina, Inc. Dynamic vs. Static Program Analysis. Dynamic analysis has advantages: Access to entire app: libraries, generated code Visibility on exact use cases (data used and control flow followed)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

Persisting Information Across Application Executions


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
dynamic vs static program analysis
Dynamic vs. Static Program Analysis
  • Dynamic analysis has advantages:
    • Access to entire app: libraries, generated code
    • Visibility on exact use cases (data used and control flow followed)
    • Applicable to any binary
  • But…costly to do
    • Analysis cost is part of the runtime of the app
    • Analysis is applied every time the app is run
analysis challenges
Analysis Challenges
  • Monitoring values of application variables is performance-intensive
    • Transparent instrumentation expensive on x86
    • May need to monitor more than just function parameters
  • Difficult to obtain enough data from short-lived applications
solution persistent data
Solution: Persistent Data
  • Store results from prior application executions on disk
  • Instrument different part of application in each run to keep costs down
  • Combine results of each new run with stored data
  • Once have enough data for analysis, send to central server
common persistence infrastructure
Common Persistence Infrastructure
  • Underlying execution engine can also benefit from persistence
  • Can share the same validation and consistency models to ensure persisted state corresponds to current application code and behavior
managed program execution engine
Managed Program Execution Engine
  • Manipulate, at runtime, every instruction an arbitrary application executes, with:
    • Minimal performance penalty
    • Full transparency
  • Exports interface for building custom tools
  • No modifications to the hardware, operating system, or application
  • Foundation of Determina Memory Firewall
native execution
Native Execution

APPLICATION

executable

library A

library B

hardware platform

execute from code cache
Execute From Code Cache

APPLICATION

executable

library A

library B

EXECUTION ENGINE

code cache

hardware platform

managed program execution engine1
Managed Program Execution Engine

trace selector

basic block builder

START

dispatch

context switch

BASIC BLOCK CACHE

TRACE CACHE

indirect branch lookup

non-control-flow instructions

non-control-flow instructions

indirect branch stays on trace?

non amortized overhead
Non-Amortized Overhead
  • In steady-state, overhead is amortized
  • Overhead does show up in non-steady-state:
    • Application start-up
    • Short-lived applications
    • Extensive new code execution
  • Not an issue on servers (long-running apps)
  • A major issue on desktops
    • Startup time is directly visible and perceived as a slowdown
traces
Traces
  • Combine frequently executed sequences of basic blocks into traces
    • Superior code layout
    • Eliminate indirect branches
  • Traces provide ~10% performance boost on longer-running applications
  • Will they help startup performance, with its once-executed code?
solution persistent code cache
Solution: Persistent Code Cache
  • Goals:
    • Improve start-up performance
    • Support process-shared code caches
  • Challenges:
    • Re-design data structures to support persistence
    • Efficiently validate persisted files
    • Safely allow persistent file updates
prototype implementation
Prototype Implementation
  • Supports both no-traces mode and trace building mode
  • Persists at end of run to application-specific files, loaded in for the next run
  • Does not support relocation
  • Validates only the module base
per module caches
Per-Module Caches

APPLICATION

executable

library A

library B

EXECUTION ENGINE

cache exe

cache libA

cache libB

hardware platform

persistent caches
Persistent Caches

APPLICATION

executable

library A

library B

PERSISTED CACHES

cache exe

EXECUTION ENGINE

cache exe

cache libA

cache libB

cache libA

cache libB

hardware platform

persistent caches1
Persistent Caches

APPLICATION

executable

library A

library B

PERSISTED CACHES

cache exe

EXECUTION ENGINE

cache exe

cache libA

cache libB

cache libA

cache libB

hardware platform

summary
Summary
  • Persisting information across application executions has many advantages
    • Reduce overhead
    • Enable inter-process sharing
    • Enable accumulation of data from multiple runs for broader view of application with less instrumentation or in presence of varying workloads
  • Many challenges remain