samsung
play

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


  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 Softw are Center 1 SAMSUNG Agenda Introduction & Background I. Concept of SAAT II. III. Issues & Conclusion Softw are Center 2

  2. SAMSUNG I . I ntroduction & Background � Motivation � Challenge � Software Performance Model � Software Reverse Engineering Softw are Center 3 SAMSUNG Motivation � 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 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 o r o f S o f t w a r e A n a l y s i s R e q u e s t F i n d t h e b o t t l e n e c k o f S o f t w a r e P e r f o r m a n c e A n a l y s t I d e n t i f y t h e s o l u t i o n t o t h e p r o b l e m u s i n g a s i mu l a t i o n t o o l � W e decided to autom ate the process in order to shorten the tim e of the perform ance analysis Softw are Center 4

  3. SAMSUNG Challenge � 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. Softw are Center 5 SAMSUNG 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 D e v e l o p e r s a r e a l w a y s b u s y � Our position � Automation: the interview task � An analysis tool Softw are Center 6

  4. SAMSUNG 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. of 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) N o S t r u c t u r e & P e r f o r m a n c e I n f o r m a t i o n � Our position � Simulation Model: Execution Structure + Performance Information � Suitability: Java � C Softw are Center 7 SAMSUNG 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 Softw are Center 8

  5. SAMSUNG W hat is SAAT? � SAAT � A tool generating a sim ulation m odel from source code autom atically Behavior Model 1 2 3 SW Source Code SW Source Code Run I nstrum ent-API Creating Execution Tree Probe Code Probe Code Sim ulation Model Execution Model Creating Constructing Sim ulation Model SW Structural Graph Softw are Center 9 SAMSUNG 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(); Begin A node Time Start/Finish call C(); Point of A } Main start time of Main start flag Function A(parameter order) A start time of A start flag { a start time of a start flag if (order = first_sequence) End Point a finish time of a finish flag { of A b start time of b start flag call a(); b finish time of b finish flag call b(); A finish time of A finish flag } B start time of B start flag else B finish time of B finish flag { C start time of C start flag call c(); C finish time of C finish flag } Main finish time of Main finish flag } Function B() {} Function C() {} Softw are Center 10

  6. SAMSUNG 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 First Sequence Second Sequence Main A() a() Main A() c() b() B() B() C() Initial Structure Different structure !! C() of “A” => we need more than a (sequence of functions) sequence, i.e. Graph Softw are Center 11 SAMSUNG Execution Model � A com posite of several Behavior Models to represent the dynam ic structure of the softw are First Seq. of A Second Seq. of A Main() Begin A() Begin a() c() b() End B() C() End Softw are Center 12

  7. SAMSUNG Sim ulation Model � A m odel running in a sim ulation environm ent to dem onstrate architectural issues of the present system . Main() Transaction 7 8 9 Begin A() B() C() End 2 6 3 4 5 A() a() b() Begin End c() Softw are Center 13 SAMSUNG Structure of SAAT � 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 Commercial SAAT Program Tool � BM BM Handler � Creating a binary tree Input: representing one Reader Writer Trace TAU execution of softw are Data Tree EM � User Interface Behavior EM Handler � Creating a graph for Models representing softw are Output: Reader Writer run-tim e structure aiSee Graph List Execution � SM Models � Creating a m odel SM Output: Handler Mapper running sim ulation Simulation Workbench environm ent. Models Graph List Softw are Center 14

  8. SAMSUNG Using this tool in perform ance analysis � W e can insert the statistic data into each node from execution inform ation of Trace Data Softw are Center 15 SAMSUNG 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 Softw are Center 16

  9. SAMSUNG W hy to drop static analysis � Extracting m ore precise structural inform ation of � Needing Perform ance existing softw are inform ation I ncluding all structural � � Sim plifying the structure inform ation for analyzing of softw are in our focal the softw are aspect reducing the com plex � m anipulation of our tool Softw are Center 17 How to construct execution m odel from SAMSUNG behavior m odel � 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 F i n a l B e h a v i o r M o d e l H a s h T a b l e I n i t i a l E x e c u t i o n M o d e l o f F u n c t i o n s E x e c u t i o n M o d e l b e g i n S c a n n i n g b e g i n A a c A a b b r a n c h a B + c b C b A c a c e n d b e n d Softw are Center 18

  10. SAMSUNG 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 Softw are Center 19 SAMSUNG 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 o r m a n c e S A A T : R e v e r s e M o d e l O u r R e s e a r c h E n g i n e e r i n g Softw are Center 20

  11. SAMSUNG 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. Softw are Center 21

Recommend


More recommend