Minimal instrumentation for software feature location
This presentation is the property of its rightful owner.
Sponsored Links
1 / 19

Minimal Instrumentation for Software Feature Location PowerPoint PPT Presentation


  • 81 Views
  • Uploaded on
  • Presentation posted in: General

Minimal Instrumentation for Software Feature Location. Sharon Simmons Dennis Edwards Norman Wilde Eric Daniels. Software Reconnaissance. Where in this program is feature X implemented?. 100’s KLOC, 10’s MLOC Modification required Interactions forgotten. Solution: track execution.

Download Presentation

Minimal Instrumentation for Software Feature Location

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


Minimal instrumentation for software feature location

Minimal Instrumentation for Software Feature Location

Sharon Simmons

Dennis Edwards

Norman Wilde

Eric Daniels


Software reconnaissance

Software Reconnaissance

Where in this program is feature X implemented?

100’s KLOC, 10’s MLOC

Modification required

Interactions forgotten

  • Solution: track execution

Feature is active

1. Run tests without the feature

2. Run tests with the feature

Feature is NOT active

  • 3. Compare what was executed

Components executed in the first group of tests, but not in the second group

Marker Components

Begin exploration here!

~Set difference

UWF - Simmons


Tracegraph 4

TraceGraph 4

Row

Instrumentation point

Column

test case

Col 1

without feature

Col 2+

with feature

Identifies “markers”

Gives big picture

Subroutine (En… 0 be_aas_bspq3.c /research/ope… 147

(demo of version 3) http://www.cs.uwf.edu/~recon/recon3/r3wDemo.htm

UWF - Simmons


Software recon status

Software Recon Status

  • Developed for several years at UWF

  • Stable, usable, and free

  • Published works enumerate benefits and limitations

  • Brief Benefits

  • Identifies a small number of marker components

  • Identifies good places to start efficient code exploration

  • Can decrease software maintenance time

UWF - Simmons


Instrumentation alternatives

Instrumentation Alternatives

Atom (Digital Equipment Corp)

  • Instrumentation at load time

    Pin (Intel Corp)

  • Instrumentation at dynamic link time

    CodeTEST (Freescale Semiconductor)

  • Instrumentation of preprocessed source code

    Recon (UWF)

  • Instrumentation of source code

    Gcov (GNU)

  • Instrumentation by (GNU) compiler

None completely successful

UWF - Simmons


Problems encountered

Problems Encountered

Newer systems time-sensitive

Deadlines must be met

Tracing can not be intrusive

Target must execute normally

Hard / soft real-time

Race conditions

Timing faults

Initialization was hours instead of minutes

Deadlines were not met

Tracing intrusive and prevented normal execution

UWF - Simmons


Our approach

Our Approach

  • Instrument preprocessed source

  • Efficient code coverage tracing

  • Build IDB prior to execution

  • Provide facilities to partition execution into intervals

  • Simplify installation and use

UWF - Simmons


Information flow

Information Flow

Source

During Compilation

During Execution

IDB

After Execution

Instrumenter

Trace Records

Target

Data Joiner

Test Cases

Driver

Interval Delimiter

Collection Engine

Bitstring Traces

UWF - Simmons


Mininst overview

MinInst Overview

Instrumentation point represented as bit

  • 1MB RAM ≈ 8.4M instrumentation points

    Ordered set of bits (bit string) represents code

  • Bit index identifies IDB record

  • Bit string cleared at interval start

  • Bit set when instrumentation point executed

    0  not executed; 1  executed

  • Execution order not retained

  • Execution frequency not retained

  • Bit string saved at interval end

UWF - Simmons


Mininst details

MinInst Details

Two bitstrings allocated in shared memory

  • Active (A): currently accessed by target

  • Passive (P): prepared for next interval

    Collection Engine

  • Started as first instruction in main()

  • Wait for signal (no overhead here)

  • Exchange A & P bitstrings (pointer swap)

  • Save P bitstring to trace file (I/O overhead)

  • Clear P bitstring for next interval

  • Go back to step 1

UWF - Simmons


Version a

Version A

  • Instruments C/C++

  • Linux platform

  • CodeTEST

    • Identifies instrumentation points

    • Builds IDB

  • MinInst

    • Inserts instrumentation code

    • Builds bit index  IDB map

  • Driver

    • Delimits trace intervals

    • Performs test cases

  • Collection Engine

    • Records bitstring trace at runtime

  • Joiner

    • Combines IDB, MAP and bitstring trace

    • Creates usable trace file

UWF - Simmons


Information flow1

Information Flow

Source

During Compilation

During Execution

IDB

After Execution

Instrumenter

CodeTEST

Map

MinInst

Trace Records

Target

Data Joiner

Test Cases

Driver

Interval Delimiter

Collection Engine

Bitstring Traces

UWF - Simmons


Test cases

Test Cases

Generated Code

  • 1 file, simple functions (5 stmts, 5 inst pts)

  • 15KLOC, 30KLOC, 45KLOC, 60KLOC

  • CodeTEST: +200%MinInst: +11%

    Apache web server (httpd)

  • 550 files, 300KLOC, multithreaded, multiprocess

  • CodeTEST: +717%MinInst: +1%

    Openarena & OpenGL

  • 1K files, 700KLOC, time sensitive, multiplayer, networked

  • CodeTEST: +9371%MinInst: +6%

UWF - Simmons


Shortcomings

Shortcomings

  • Complexity of use

  • Reliance on CodeTEST

  • CodeTEST failed some test cases

  • Execution differences between platforms

  • Licensed software

  • Unsupported for a while

UWF - Simmons


Version b

Version B

  • Prototype written in C for C/C++ source

    • Removed CodeTEST dependency

    • Tested in Linux

    • Windows port is pending

  • Simplified installation and use

    • Installation/removal scripts

    • Integrated into GCC/Make in Linux

    • Integrated into Visual Studio IDE

  • Interval options

    • Timed or user controlled

UWF - Simmons


Information flow2

Information Flow

Source

During Compilation

During Execution

IDB

After Execution

Instrumenter

MinInst

Trace Records

Target

Data Joiner

Test Cases

Driver

Interval Delimiter

Collection Engine

Bitstring Traces

UWF - Simmons


Summary

Summary

Version B status

  • Execution time unaltered from Version A

  • Linux and Windows XP

  • GCC and Visual Studio

  • Test cases in progress

    Next steps

  • Conclude test cases

  • Northrop Grumman large system testing

  • Complete distribution package

    Future Work

  • Modify TraceGraph for bit string operation

UWF - Simmons


Information flow3

Information Flow

Source

During Compilation

During Execution

IDB

After Execution

MinInst

Target

Test Cases

Driver

Interval Delimiter

Collection Engine

Bitstring Traces

UWF - Simmons


Contact information

Contact Information

Sharon [email protected]

Dennis [email protected]

Norman [email protected]

UWF - Simmons


  • Login