SAMSUNG SAAT: Reverse Engineering for Perform ance Analysis - - PDF document

samsung
SMART_READER_LITE
LIVE PREVIEW

SAMSUNG SAAT: Reverse Engineering for Perform ance Analysis - - PDF document

SAMSUNG SAAT: Reverse Engineering for Perform ance Analysis 2004.05.25. Seon-Ah Lee, Seung-Mo Cho, Sung-Kwan Heo Mobile Solution Group Software Center Samsung Electronics salee@samsung.com Softw are Center 1 SAMSUNG Agenda Introduction


slide-1
SLIDE 1

Softw are Center

1

SAMSUNG

SAAT: Reverse Engineering for Perform ance Analysis

2004.05.25. Seon-Ah Lee, Seung-Mo Cho, Sung-Kwan Heo Mobile Solution Group Software Center Samsung Electronics salee@samsung.com

SAMSUNG

2

Softw are Center

Agenda

I.

Introduction & Background

II.

Concept of SAAT

  • III. Issues & Conclusion
slide-2
SLIDE 2

SAMSUNG

3

Softw are Center

I . I ntroduction & Background

Motivation Challenge Software Performance

Model

Software Reverse

Engineering

SAMSUNG

4

Softw are Center

For perform ance analysis at our research center

W e hoped to provide the result of perform ance analysis as

quickly as possible to stakeholders

W e decided to autom ate the process in order to shorten the

tim e of the perform ance analysis

Motivation

P e r f

  • r

m a n c e A n a l y s t A n a l y s i s R e q u e s t U n d e r s t a n d S t r u c t u r e & B e h a v i

  • r
  • f

S

  • f

t w a r e F i n d t h e b

  • t

t l e n e c k

  • f

S

  • f

t w a r e I d e n t i f y t h e s

  • l

u t i

  • n

t

  • t

h e p r

  • b

l e m u s i n g a s i mu l a t i

  • n

t

  • l
slide-3
SLIDE 3

SAMSUNG

5

Softw are Center

There is no tool show ing softw are execution structure

w ith perform ance inform ation

Performance Analysis Tool ≠

> Software Behavior

Tools such as gprof, Vtune and Quantify show call graphs and

bottleneck candidates, but does not show the execution flow, so we cannot use the call graphs for understanding system’s behavior.

Reverse Engineering Tool ≠

> Performance information

Static analysis tools such as Source Insight and aiCall show a

software structure, but it is different from a dynamic structure.

Imagix show both static structure and call graphs, but it is only the

combination of upper tools.

Challenge

SAMSUNG

6

Softw are Center

Softw are Perform ance Model

Research trends

Researchers in performance engineering are studying how to

integrate software architecture with performance information

The representative w orks

C.U. Smith and L.G. Williams, Performance Solutions: A Practical

Guide to Creating Responsive, Scalable Software, Addison-Wesley,

  • Sept. 2001.

Performance model & PASA methodology: extracting architecture

information from developer interviews and work products

Our position

Automation: the interview task An analysis tool

D e v e l

  • p

e r s a r e a l w a y s b u s y

slide-4
SLIDE 4

SAMSUNG

7

Softw are Center

Softw are Reverse Engineering

Research Trends

Dynamic reverse engineering to extract software execution models

from existing systems is also being tried

The representative w orks

  • T. Systa, "Understanding the Behavior of Java Programs", In Proc.
  • f the 7th Working Conference on Reverse Engineering, pp. 214-

223, Brisbane, Australia, November 2000.

Shimba tool: producing sequence diagrams using trace information

at runtime (Java)

Our position

Simulation Model: Execution Structure + Performance Information Suitability: Java C

N

  • S

t r u c t u r e & P e r f

  • r

m a n c e I n f

  • r

m a t i

  • n

SAMSUNG

8

Softw are Center

I I . Concept of SAAT

What is SAAT? Trace Data Behavior Model Execution Model Simulation Model Structure of SAAT Using this tool in

performance analysis

slide-5
SLIDE 5

SAMSUNG

9

Softw are Center

W hat is SAAT?

SAAT

A tool generating a sim ulation m odel from source code

autom atically

SW Source Code SW Source Code Probe Code Probe Code I nstrum ent-API Behavior Model Execution Model Sim ulation Model 1 2 3 Creating Execution Tree Constructing SW Structural Graph Creating Sim ulation Model Run

SAMSUNG

10

Softw are Center

Trace Data

A record of the interaction betw een the softw are

m odules ( Using TAU, generating Softw are Trace Data)

Function Main(parameter seq) { call A(seq); call B(); call C(); } Function A(parameter order) { if (order = first_sequence) { call a(); call b(); } else { call c(); } } Function B() {} Function C() {} A node Time Start/Finish Main start time of Main start flag A start time of A start flag a start time of a start flag a finish time of a finish flag b start time of b start flag b finish time of b finish flag A finish time of A finish flag B start time of B start flag B finish time of B finish flag C start time of C start flag C finish time of C finish flag Main finish time of Main finish flag

Begin Point of A End Point

  • f A
slide-6
SLIDE 6

SAMSUNG

11

Softw are Center

Behavior Model

A diagram representing Softw are Trace Data as nodes

and edges

  • Node: a function
  • An edge directing left: call-relationship betw een tw o functions
  • An edge directing below : execution order betw een tw o functions

Main A() a() B() C() Main A() c() B() C() b() First Sequence Second Sequence Initial Structure

  • f “A”

(sequence of functions) Different structure !! => we need more than a sequence, i.e. Graph

SAMSUNG

12

Softw are Center

Execution Model

A com posite of several Behavior Models to represent the

dynam ic structure of the softw are

Main() A() End Begin a() c() b() B() C() Begin End

First Seq. of A Second Seq. of A

slide-7
SLIDE 7

SAMSUNG

13

Softw are Center

A()

Sim ulation Model

A m odel running in a sim ulation environm ent to

dem onstrate architectural issues of the present system .

Main() End Begin a() c() b() B() C() Begin End A() Transaction 7 8 9 2 3 4 5 6

SAMSUNG

14

Softw are Center

Structure of SAAT

  • BM
  • Creating a binary tree

representing one execution of softw are

  • EM
  • Creating a graph for

representing softw are run-tim e structure

  • SM
  • Creating a m odel

running sim ulation environm ent.

Simulation Models Execution Models Behavior Models Commercial Tool Input: TAU Output: aiSee Output: Workbench BM EM SM Trace Data SAAT Program Tree Reader Writer Handler Graph List Reader Writer Handler Graph List Handler Mapper User Interface

SAAT is related to existing com m ercial tools.

TAU: Generating Trace Data aiSee: Presenting Trees and Graphs W orkbench: Providing Sim ulation Environm ent

slide-8
SLIDE 8

SAMSUNG

15

Softw are Center

W e can insert the statistic data into each node from

execution inform ation of Trace Data

Using this tool in perform ance analysis

SAMSUNG

16

Softw are Center

I I I . I ssues & Conclusion

Why to drop static

analysis

How to construct

execution model from behavior model

Fail or Succeed Contribution Future Works

slide-9
SLIDE 9

SAMSUNG

17

Softw are Center

W hy to drop static analysis

  • Extracting m ore precise

structural inform ation of existing softw are

  • I ncluding all structural

inform ation for analyzing the softw are

  • Needing Perform ance

inform ation

  • Sim plifying the structure
  • f softw are in our focal

aspect

  • reducing the com plex

m anipulation of our tool

SAMSUNG

18

Softw are Center

Conditions

A function w ith tw o or m ore invocation sequences the sub-sequences of A function are different

the function should have loops or branches

How to construct execution m odel from behavior m odel

A A a c b B e h a v i

  • r

M

  • d

e l S c a n n i n g H a s h T a b l e

  • f

F u n c t i

  • n

s A B C a c b I n i t i a l E x e c u t i

  • n

M

  • d

e l b e g i n a b e n d c + F i n a l E x e c u t i

  • n

M

  • d

e l b r a n c h a b e n d c b e g i n

slide-10
SLIDE 10

SAMSUNG

19

Softw are Center

Fail or Succeed

This tool m ight fail?

The trace and behavior m odels can get large, so the

com putation of an execution m odel gets com plex

The result to generate sim ulation m odel is rough, so user

m ediate part should be appended to the tool

This tool m ight succeed?

This tool w as used to discover the pattern of softw are

execution and useful to find problem atic part already

This tool is the first trial to extract sim ulation m odel from

the existing softw are autom atically

SAMSUNG

20

Softw are Center

Contribution

Benefits

Acquiring the m ethodology facilitating the understanding of

existing softw are

Developing a suitable tool to analyze our em bedded

softw are im plem ented in c language

Pioneering the w ay to create a m odel running a sim ulation

environm ent from existing softw are autom atically

Academ ic interest

Bridging the gap betw een perform ance analysis and reverse

engineering.

P e r f

  • r

m a n c e M

  • d

e l R e v e r s e E n g i n e e r i n g S A A T : O u r R e s e a r c h

slide-11
SLIDE 11

SAMSUNG

21

Softw are Center

Future W orks

Grouping functions

The w ay to bind the corresponding com ponent User intervention parts / Com ponent-declaring parts Precedence: Dali W orkbench tool m ade by Kazm an

More refined Models

Additional rules for converting Behavior Models to an

Execution Model

Options to m odify the Sim ulation m odel for user tastes

Various Model Environm ents

Adapting this tool to several m odeling environm ents.