Comparison Between Static and Dynamic Program Instrumentation

EXERCISE #26
1
PROGRAM INSTRUMENTATION REVIEW
Write your name and answer the following on a piece of paper
What is the difference between static and dynamic program instrumentation?
ADMINISTRIVIA
AND
ANNOUNCEMENTS
 
STATIC
INSTRUMENTATION
EECS 677: Software Security Evaluation
Drew Davidson
WHERE WE’RE AT
EXPLORING PROGRAM INSTRUMENTATION
4
An approach to dynamic analysis
5
PREVIOUSLY: PROGRAM INSTRUMENTATION
REVIEW: LAST LECTURE
I
NSERTING
 
MEASUREMENT
 
PROBES
INTO
 
A
 
PROGRAM
Lint
 – The original analysis tool
Splint – 
Security analysis tool
N
OTABLE
 
ANALYSIS
 
TOOLS
6
THIS LESSON: STATIC INSTRUMENTATION
REVIEW: LAST LECTURE
I
NSERTING
 
MEASUREMENT
 
PROBES
INTO
 
A
 
PROGRAM
 B
EFORE
 
IT
 
IS
 
RUN
More closely associated with proactive
software evaluation
 – (why?)
7
PATH FREQUENCY
REVIEW: THE PROBLEM
8
STATIC INSTRUMENTATION TOOLS
PROGRAM INSTRUMENTATION: APPROACH
 
O
FTEN
 
BUILT
 
RIGHT
 
INTO
 
COMPILER
 
LLVM Coverage tools
 
GCC Coverage tools
 
Google’s closure compiler
 
S
OMETIMES
 
BUILT
 
UPON
 
OPTIMIZER
 
https://github.com/google/closure-compiler
9
EXAMPLE: LLVM COVERAGE INSTRUMENTATION
PROGRAM INSTRUMENTATION: APPROACH
B
IG
 I
DEA
: I
NJECT
 B
ASIC
 B
LOCK
 C
OUNTERS
LLVM Coverage tools
10
EXAMPLE: LLVM COVERAGE INSTRUMENTATION
PROGRAM INSTRUMENTATION: APPROACH
L
ET
S
 
TAKE
 
IT
 
TO
 
THE
 
TERMINAL
!
11
CUSTOM INSTRUMENTATION
PROGRAM INSTRUMENTATION: APPROACH
T
HE
 P
REVIOUS
 E
XAMPLE
 
TOOK
 
ADVANTAGE
 
OF
 
PRE
-
EXISTING
INSTRUMENTATION
What if we wanted to make our own custom
instrumentation?
12
CUSTOM INSTRUMENTATION
PROGRAM INSTRUMENTATION: APPROACH
G
ETTING
 
STARTED
1) Reference the LLVM API
2) Build our own (trivial) analysis pass
3) Hook into the LLVM opt infrastructure
4) Run our analysis pass
G
OING
 F
URTHER
Insert more full-featured functionality
(
https://llvm.org/doxygen/classllvm_1_1IRBuilder.html
)
13
TUTORIAL: CUSTOM LLVM INSTRUMENTATION
PROGRAM INSTRUMENTATION: APPROACH
L
ET
S
 
TAKE
 
IT
 
TO
 
THE
 
TERMINAL
!
WRAP-UP
WE’VE DESCRIBED 2 FORMS OF
ALTERING THE PROGRAM
14
More heuristic by nature
Slide Note
Embed
Share

The difference between static and dynamic program instrumentation lies in when the analysis or measurement probes are inserted into a program. Static instrumentation occurs before the program is run and is more closely associated with proactive software evaluation. Dynamic instrumentation, on the other hand, inserts probes during program execution.

  • Program Instrumentation
  • Static vs Dynamic
  • Software Evaluation
  • Dynamic Analysis

Uploaded on Apr 19, 2024 | 5 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. EXERCISE #26 PROGRAM INSTRUMENTATION REVIEW Write your name and answer the following on a piece of paper What is the difference between static and dynamic program instrumentation? 1

  2. ADMINISTRIVIA AND ANNOUNCEMENTS

  3. STATIC INSTRUMENTATION EECS 677: Software Security Evaluation Drew Davidson

  4. 4 WHERE WE RE AT EXPLORING PROGRAM INSTRUMENTATION An approach to dynamic analysis

  5. 5 PREVIOUSLY: PROGRAM INSTRUMENTATION REVIEW: LAST LECTURE INSERTINGMEASUREMENTPROBES INTOAPROGRAM NOTABLEANALYSISTOOLS Lint The original analysis tool Splint Security analysis tool

  6. 6 THIS LESSON: STATIC INSTRUMENTATION REVIEW: LAST LECTURE INSERTINGMEASUREMENTPROBES INTOAPROGRAM BEFOREITISRUN More closely associated with proactive software evaluation (why?)

  7. 7 PATH FREQUENCY REVIEW: THE PROBLEM

  8. 8 STATIC INSTRUMENTATION TOOLS PROGRAM INSTRUMENTATION: APPROACH OFTENBUILTRIGHTINTOCOMPILER LLVM Coverage tools GCC Coverage tools SOMETIMESBUILTUPONOPTIMIZER Google s closure compiler https://github.com/google/closure-compiler

  9. 9 EXAMPLE: LLVM COVERAGE INSTRUMENTATION PROGRAM INSTRUMENTATION: APPROACH BIG IDEA: INJECT BASIC BLOCK COUNTERS LLVM Coverage tools

  10. 10 EXAMPLE: LLVM COVERAGE INSTRUMENTATION PROGRAM INSTRUMENTATION: APPROACH LET STAKEITTOTHETERMINAL!

  11. 11 CUSTOM INSTRUMENTATION PROGRAM INSTRUMENTATION: APPROACH THE PREVIOUS EXAMPLETOOKADVANTAGEOFPRE-EXISTING INSTRUMENTATION What if we wanted to make our own custom instrumentation?

  12. 12 CUSTOM INSTRUMENTATION PROGRAM INSTRUMENTATION: APPROACH GETTINGSTARTED 1) Reference the LLVM API 2) Build our own (trivial) analysis pass 3) Hook into the LLVM opt infrastructure 4) Run our analysis pass GOING FURTHER Insert more full-featured functionality (https://llvm.org/doxygen/classllvm_1_1IRBuilder.html)

  13. 13 TUTORIAL: CUSTOM LLVM INSTRUMENTATION PROGRAM INSTRUMENTATION: APPROACH LET STAKEITTOTHETERMINAL!

  14. 14 WRAP-UP WE VE DESCRIBED 2 FORMS OF ALTERING THE PROGRAM More heuristic by nature

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#