A FRAMEWORK FOR REDUCING THE COST OF INSTRUMENTED CODE Known from - - PowerPoint PPT Presentation

a framework for reducing the cost of instrumented code
SMART_READER_LITE
LIVE PREVIEW

A FRAMEWORK FOR REDUCING THE COST OF INSTRUMENTED CODE Known from - - PowerPoint PPT Presentation

A FRAMEWORK FOR REDUCING THE COST OF INSTRUMENTED CODE Known from Continuous Path and Edge Profiling Bug Isolation via Remote Program Sampling Low-overhead Memory Leak Detection using Adaptive Statistical Profiling (SWAT)


slide-1
SLIDE 1

A FRAMEWORK FOR REDUCING THE COST OF INSTRUMENTED CODE

slide-2
SLIDE 2

Known from…

Continuous Path and Edge Profiling Bug Isolation via Remote Program Sampling Low-overhead Memory Leak Detection using

Adaptive Statistical Profiling (SWAT) Adaptive Statistical Profiling (SWAT)

Accurate, Efficient, and Adaptive Calling Context

Profiling

slide-3
SLIDE 3

Problem

JIT compilers need run-time sampling to make

decisions

Sampling code is expensive, sometimes reaching

30% to 10000% 30% to 10000%

How to switch profiling on and off?

slide-4
SLIDE 4

Wishlist

Toggle instrumentation at any point in the lifecycle

  • f the program

Dynamically adjust the trade-off between accuracy

and performance and performance

Adapt to different instrumentations Portability Deterministic behavior

slide-5
SLIDE 5

Sampling Framework

slide-6
SLIDE 6

How to trigger instrumentation?

Samples should be statistically accurate –

reproducibility would be even better

Hardware / OS interrupts are not fine grained

enough enough

Operations following expensive ops are more likely

to be sampled

slide-7
SLIDE 7

Compiler-inserted counters

Each nth check leads to a sample The program maintains a global counter Maintaining the counter is reasonably cheap What if the resetValue is equal to the number of

loop iterations?

slide-8
SLIDE 8

Compiler-inserted counters

slide-9
SLIDE 9

Space Optimizations

Keeping a second (instrumented) copy of the code

can be expensive and is often unnecessary

Non-instructed nodes do not have to be

duplicated: duplicated:

slide-10
SLIDE 10

Space Optimizations

Violates Invariant 1:

Number of checks in the code is not influenced by the

instrumentation being executed

slide-11
SLIDE 11

Space Optimization

Variation-1 (maintains invariant)

slide-12
SLIDE 12

Space Optimization

Variation-2 (violates invariant)

slide-13
SLIDE 13

Evaluation

Using Jalapeno VM Call-Edge instrumentation Field-Access instrumentation

slide-14
SLIDE 14

Evaluation

slide-15
SLIDE 15

Evaluation

slide-16
SLIDE 16

Summary

Arnold-Ryder Framework gives good results while

drastically reducing the performance overhead

As seen in other papers, there are some drawbacks

which can be addressed by modifying the which can be addressed by modifying the framework