Home

User Manual for the Free Software Tools-Based Flow for

image

Contents

1. Edit gt 465 void UseHuffman int code int size Bookmarks gt E 466 Folding gt Fold all 474 475 void mainVLE const TBlocks blocks TPackets strei Format this file AStyle Unfold all 547 Toggle all 548 include Video out h Add Todo item 549 550 void mainVideoOut const THeaderInfo HeaderInfo c Split view gt Fold current black 551 P Unfold current block Configure editor Toggle current block Properties Remove file from project Scripting console Q Search results Debugger Build log Build messages elcome to the script console 7 a FilesExtensionHandler OpenFilesList Running startup script Script function edit_startup_script script registered under menu amp Settings Edit startup script Opening home heapdemouser projects mjpeg_par mjpeg_par cbp done home heapdemouser projects mjpeg_par mjpeg_par c UTF 8 Line 431 Column 37 Insert Read Write default O2 PEO GBWRight ctr e update the visualizer HEAP_D3 4_V1 4_20120123 Page 18 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial r3 ZGRViewer tmp zgrviewerDotFile3462248229219253419 gv File View Help The nodes still visible are the function arguments 4 New Project Creati
2. Parallelism in the Program Execution User Manual and Tutorial e g best fit of the graph on screen e use the mouse wheel to zoom in out To further facilitate the exploration of the data dependencies the graph nodes can be folded by fold ing in the IDE the lines corresponding to the nodes source lines For instance by folding all blocks in the IDE we obtain the dependency view between the functions e fold all the blocks in the IDE Machine View Devices Help Applications Places System J mjpeg_par c mjpeg _ LEZ 420 C Sun Sep 18 18 24 H mjpeg _par c mjpeg_par Code Blocks 10 05 gt a l File Edit View Search Project Build Debug Tools Plugins Settings Help HEAP ec eae amp 2 a AiG gt So Build target Debug SBEL ETO EA Management Projects Symbols omm v ii mjpeg_par gt B Sources mjpeg_par c 5 382 of the codes found to the Huffman package 383 t 384 void EncodeAC int matrix 385 426 427 428 EncodeDC encodes the input coefficient to the stream using the 429 currently installed DC Huffman table 430 t 431 void EncodeDC int coef int LastD 432 q q Toggle breakpoint 453 E Run to cursor 454 EncodeHuffman places the Huffman code for the 455 void EncodeHuffman int value Gre Insert gt 459 S head 460 fputv puts n bits from b onto the writer stre wap header source 461 void fputv int n int b El
3. int input Y1 pixel DCTShift Shift ReferenceDct int input 1l pixel output Y1 ary f DCT BoundDctMatrix output 1 pixel DCTBound Bound 1 imit lv lE PreshiTtDctMatrix dint input Y2 pixel DCTShift Shift ReferenceDct int input 2 pixel output 2 pixel DCT BoundDctMatrix output 2 pixel DCTBound Bound Limit U1 Refarencedct iat ineut Ul pixel output U1 DCT BoundDctMatrix output U1 pixel DCTBound ound Limit elcome to the script console FilesExtensionHandler OpenFilesList Running startup script Script function edit_startup_script script registered under menu amp Settings Edit startup script Opening home heapdemouser projects mjpeg_par mjpeg_par cbp ry home heapdemouser projects mjpeg_par mjpeg_par c UTF 8 Line 233 Column 23 Insert Read Write default O 2 P AO O E hRight ctr HEAP_D3 4_V1 4_20120123 Page 12 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Now start the visualization program by clicking on the HEAP entry of the top menu and then on Run The ZGRViewer visualizer window will open Machine View Devices Help File View Help 2 POL O E Right ctr Arrange the IDE and the ZGRV windows on the screen to have a clear view of both If you have two monitors attached
4. W Release HEAP_D3 4_V1 4_20120123 Page 24 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial 6 2 2 Adding a pre existing file Click Project gt Add files to open a file browser Here you may select one or multiple files using combinations of Ctrl and Shift The option Project gt Add files recursively will search through all the subdirectories in the given folder selecting the relevant files for inclusion Click Open to bring up a dialogue requesting to which build targets the file s should belong For this example select both targets Multiple selection E Debug W Release Selected 2 Note if the current project has only one build target this dialogue will be skipped 6 2 3 Removing a file Using the above steps add a new C source file useless cpp to the project Removing this un needed file from the project is straightforward Simply right click on useless cpp in the Projects tab of the Management pane and select Remove file from project a q Projects Symbols Files P 1 Workspace ee HelloWorld Sources ven hello cpp oe main cpp useless cpp ii i H Save useless cpp Close useless cpp Open with Remove file from project HEAP_D3 4_V1 4_20120123 Page 25 of 25
5. as this is the most common for general purposes and click Go New from template Projects Build targets Files Custom User templates lt All categories gt ARM Project AVR Project Code Blocks Console plugin application D application Dynamic Link Empty project Library FLTK project Fortran DLL Fortran Fortran library application GLUT Tr Conn rie Liet GLFW project GLUT project GTK project Irrlicht project TIP Try right dicking an item 1 Select a wizard type first on the left 2 Select a specific wizard from the main window filter by categories if needed 3 Press Go View as Large icons List The console application wizard will appear next Continue through the menus selecting C when prompted for a language In the next screen give the project a name and type or select a destination folder As seen below Code Blocks will generate the remaining entries from these two HEAP_D3 4_V1 4_20120123 Page 22 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial ____ Console application Please select the folder where you want the new project iA Co nso le to be created as well as its title Project title HelloWorld Folder to create HelloWorld chp Resulting flename C HelloWorld HelloWorld cbp Finally the wizard will ask if this project should use the defau
6. 1 Load the Demo Project Click on the Code Blocks button ist to start the IDE https secure wikimedia org wikipedia en wiki Linux http www virtualbox org HEAP_D3 4_V1 4_20120123 Page 10 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Machine View Devices Help Applications Places system E WY 21 C sun Sep 18 16 42 z Start here Code Blocks 10 05 File Edit View Search Project Build Debug Tools Plugins Settings Help HEAP BOB p b gt Qa gt amp GB Build target oE Beet pge gol Oo i Start here amp Projects Symbols Oma Code Blocks The open source cross platform IDE Atip www codeblocks org Release 10 05 rev 0 unknown date gcc 4 5 1 Linux unicode 32 bit Create a new project amp Open an existing project Visit the Code Blocks forums Report a buq Request a new feature Recent projects No recent projects Logs amp others Scripting console FilesExtensionHandler OpenFilesList Welcome to Code Blocks default O2 PAL OE Right ctr 9 Select File from the top menu then click on Open In the file chooser window that opens navigate to heapdemouser projects mjpeg_par select mjpeg_par cbp and click on Open HEAP_D3 4_V1 4_20120123 Page 11 of 25 FP7 ICT 24
7. Blocks Documentation on Creation of a New Project sscsssssees 22 Oecd PVC OIC OR WUC E E A E 22 0 2 Changing Jile Compos ON wrascrespacscradiosapushonasseancaceanteosareuodsaientonsapuideatansaeeieateenessoutuectananieaasannians Zo Ca A oA art aera EE E E E E 23 6 22 RAGING a pre existing Tile sssrinin ra EEE AEE ER E E nainis 25 02 RO a a E A E E E 25 HEAP_D3 4_V1 4_20120123 Page 5 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Abbreviations HEAP_D3 4_V1 4_20120123 Page 6 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial 1 Introduction The open source flow for the visualization of the execution parallelism provides e an IDE for the development of C language based software projects e a graphical visualization program that displays and allows the exploration of data dependen cies with automated cross references to the source code in the IDE The companion tools for data dependency profiling are reported in D3 2 e a program to analyse the developer C source code and to generate a functional model in strumented with code for data collection during program execution e a library to analyse the data gathered during program execution at run time and to generate a compact representation of the data depend
8. the Program Execution User Manual and Tutorial A provide the block folding information for all project files to the viewer to collapse the corresponding nodes A send the viewer the refresh command upon developer click on the update item in the HEAP menu e ability to end the viewer process and remove the communication pipes upon developer com mand using the HEAP menu e interact with the IDE graphical elements such as main and context menus Most of these functionalities and graphical items of the HEAP plug in are presented in detail in the following sections 3 Demo Virtual Machine A Linux VirtualBox virtual machine VM was configured to reliably support the functionality of the tool chain Its installation is described in D3 2 where the reader is now referred The users defined on the virtual machine are e root with the password Demo11HEAP This login can be used to perform administration tasks on the VM if required e heapdemouser with the password Demoll1HEAP This login is used for all tool chain related activities Demo Project The buttons to launch the applications of interest are exposed for convenience on the top panel of the workspace right next to Fedora menus J Applications Places System ie T e From left to right they are e opens a terminal window Me opens Code Blocks IDE e Me discards a hanged instance of the Code Blocks IDE e 5 displays the user manual of the distribution 3
9. 7615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Name o Size Modified ey Search E barbaral28x128 U 8 0 KB 07 05 2011 ES Recently Used E barbaral 28x128 VW 8 0 KB 07 05 2011 a heapdemouser barbaral2 8x128 16 0 KB 07 05 2011 E File System csize h 1 0 KB 06 14 2011 3 DCT h 3 9 KB 06 14 2011 markerh 704 bytes 06 14 2011 mjpeg_func h 504 bytes 06 21 2011 mjpeg_par c 13 2 KB Thursday mjpeg parcbp 04 20 2011 mjpeg_par cil c 121 2 KB Yesterday at 20 14 Open file j mjpeg parlayout 246 bytes Yesterday at 20 11 i mjpeg _par xml 169 9 KB Yesterday at 20 15 param h 1 3 KB 06 14 2011 Oh 1 1 KB 06 14 2011 tables h 3 6 KB 06 14 2011 4 tracer 73 1 KB Yesterday at 20 14 Add Remove The mypeg_par project will open Machine View Devices Help E Applications Places System 4 amp 21 C sun sep 18 16 49 PEEP ST OC Projects Symbols void BoundDctMatrix int matrix int Bound Bf Vv Workspace int mptr v il mjpeg_par E for mptr matrix mptr lt matrix BLOCKSIZE mptr gt B Sources if tog lt 0 mptr Bound aise if Pag Bound gt 0 mptr Bound void mainDCT const TBlocks input TBlocks output int DCTBound DCTSHift DCTBound DataPrecision 16383 1024 DCTShift DataPrecision 2048 128 Y1 PreshiftDctMatrix
10. CTI PT mayne OF m pi x OD lt La oe nm Vy uw or ee e pa a i a Pe ea E aa A A tale apn alpen PoP IAES II Pren m o rph rph Each ellipse represents a program instruction that was executed The ellipse colour can vary from white seldom executed to intense red most executed Each directed arch that connects two ellipses represents a data dependency between the two instruc tions The arch colour can vary from light cyan for seldom occurring dependencies to intense red for most occurring dependencies and at the same time the arch width is modulated by the same factor the widest for the most occurring The visualizer implements a few handy short cuts e c with the cursor on a node display the source code of the node with 5 context lines HEAP_D3 4_V1 4_20120123 Page 16 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial e C with the cursor on a node display the source code of the node with 10 context lines e e with the cursor on a node move the IDE editor cursor on the source line corresponding to the node e m with the cursor on an arch display the unabridged list of data dependencies repre sented by the arch HEAP_D3 4_V1 4_20120123 Page 17 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the
11. GRViewer project is unexpanded under the net claribole zgrviewer and net claribole zgrviewer dot packages The external ZGR Viewer libraries and utilities are located under the Other Sources and Libraries folders HEAP_D3 4_V1 4_20120123 Page 20 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help AAF fans T BD amp Pro 1 x Files Services ia ZGRViewer v _S5ource Packages R H q y o gt r ae o VF Ea IDE IPC Integer hits Integer parseInt attr E G lies ff Create and record a new edge B Ipelnput java ii with the given attributes ES IpcOUTput java ie Er BHIDE IPC CB a EE CBContext java fi CBDisplay java GNode to getNodeForNamelsinkNodeId CBFold java assert to null CBQuit java jf Assume all edges are directed for CBsimstats java GEdge edge new GEdgelfrom to addr lpcCallback java IpcCallbacks java from addEdqe edqe F to addEdgeledgel E E E E Be ee Be v fA DE util 4 RGB java v EaDE graph ges E Display iava Annotate the lt transfers gt tag contents aie Per of an IDE provided simulation results DisplayDOT java i Fold java t param transfers Ej Folds java j lt transfers gt tag to annotate a S kf E GEdge java private void annotateProj
12. Information and Communication Technologies ICT Programme Project N FP7 ICT 247615 HEAP Deliverable D3 4 Data dependency visualization tool User Manual and Tutorial Author s Status Version Date Distribution Confidentiality Code Mihai T Lazarescu PoliTo Joeri van Ruth ACE V1 4 23 January 2012 Public HEAP_D3 4_V1 4_20120123 Abstract In this deliverable there is a description of the data dependency visualization sub toolset Copyright by the HEAP Consortium FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Disclaimer This document contains material which is the copyright of certain HEAP contractors and may not be reproduced or copied without permission All HEAP consortium partners have agreed to the full pub lication of this document The commercial use of any information contained in this document may require a license from the proprietor of that information The HEAP Consortium consists of the following companies short name STM T HEAP_D3 4_V1 4_20120123 Page 3 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Document Revision History ae iee toro Summary otmen neer woa 2012 01 21 1 4 Mihai T Lazarescu Dependency viewer and analysis tools detail
13. NIX pipes Consequently the plug in had to be written in C The plug in implements all the functionality needed to integrate the ZGRViewer based graph viewer into customized for HEAP in the Code Blocks IDE to offer the designer a single interface for con trolling the development and optimisation of the project To this end the plug in extends the IDE functionality with e ability to create the communication pipes and to spawn the viewer process upon the devel oper command using a specific HEAP menu e automatically connect to the viewer process using the pipes to establish the first contact with the viewer after its initialization e implement the IPC listener and transmitter and the IPC protocol for exchanging commands and data with the viewer e implementing the interaction with the IDE elements e g the editors the menus the project information necessary to provide the developer the needed visual feedbacks such as A open and select the line requested by the developer through the viewer interface for in stance to display the line represented by a graph node A retrieve and send to the viewer the number required of context lines for a given source code line that are used to display on the graph the source code context for a given node http www codeblocks org http www wxwidgets org HEAP_D3 4_V1 4_20120123 Page 9 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in
14. Z GR Viewer e define a flexible format for the transfer of the data output by the tracer at the end of the anno tated program execution An XML template was defined such way to allow for easy data structure creation in the viewer and also be flexible enough to easily accommodate future ex tensions or other modifications e define a bidirectional Inter Process Communication subsystem to allow the communication of commands and data between the viewer and the IDE The IPC is based on UNIX pipes and ASCII commands and data It allows an easy integration with almost any IDE that is able to implement the other end of the IPC reducing to a bare minimum the compatibility require ments between the viewer and the IDE http zvtm sourceforge net zgrviewer news html http zvtm sourceforge net HEAP_D3 4_V1 4_20120123 Page 8 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial e a powerful graph driver for the GraphViz dot layout engine that generates an easy to un derstand dependency graph colourisation and a suitable node and arch layout in most cases e an efficient cross reference mechanism between the source code in the IDE and the nodes of the data dependency graph including pop up windows with data and keyboard short cuts to facilitate and speed up the graph exploration e an efficient internal data representation of the graph able t
15. aph visual izer implemented in Java and based upon the Zoomable Visual Transformation Machine ZGRViewer is specifically aimed at displaying graphs expressed using the DOT language from AT amp T GraphViz and processed by programs dot neato or others such as twopi It is designed to handle large graphs and offers a zoomable user interface ZUI which enables smooth zooming and easy navigation in the visualized structure In the latest version it can provide e overview detail views e focus context magnification with Sigma Lenses views e graphical fish eye focus context distortion views e navigation along graph edges with Link Sliding e navigation from node to node with Bring amp Go The tool chain includes the latest stable release version 0 8 2 thus the features may differ from the latest development version Several classes were developed to integrate ZGRViewer with the HEAP tool chain Its code and op eration were analysed thoroughly to find the best way to integrate it to the HEAP flow to both sim plify the integration the debug and maintenance of the integration as well as of the whole tool chain Special attention was given to the following objectives e limit as much as possible the changes to the original ZGR Viewer code both as entity as well as number All changes to the original code were well tagged and documented to simplify fu ture updates of the ZGRViewer code from the project porting to newer versions of
16. ar c is the name of the source file to analyse HEAP_D3 4_V1 4_20120123 Page 14 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial SE E heapdemouser demoheap projects mjpeq par File Edit View Search Terminal Help heapdemouser demoheap cd projects mjpeg_par a heapdemouser demoheap mjpeg_par ls barbaral28x128 U DCT h mjpeg par cbp param h types h barbaral28x128 V marker h mjpeg par cil c Q h Video in h barbaral28x128 Y mjpeg func h mjpeg par layout tables h Video out h csize h mjpeg par c mjpeg _par xml tracer VLE h heapdemouser demoheap mjpeg_par tracer sh mjpeg_par c home heapdemouser projects tracer cil 1 4 0 bin cilly save temps noWrap noPrintLn dooneRet dosimplify dolmarw c mjpeg_par c gcc D GNUCC E DCIL 1 mjpeg_par c o mjpeg par 1 home heapdemouser projects tracer cil 1 4 6 ob 86 LINUX cilly asm exe out mjpeq par cil c noWrap noPrintLn dooneRet dosimplity dolmarw mjpeq_ par i gcc D GNUCC E mjpeg_par cil c o mjpeg_par cil 1 gcc D GNUCC c o mjpeg par o mjpeg_par cil 1 rm f mpeg par 1 mjpeg par o mjpeg par cil 1 gcc mjpeg par cil c lawl lLxml2 lheap o tracer rm f mpeg par cil o tracer W no arg 1 for instruction 19 main W no arg 2 for instruction 20 main test s model xml test model xml mjpeg_par xml
17. e analysis and instrumentation module was written for the HEAP project Some suitable existing CIL modules were merged and extended to implement the required functionality for code analysis and annotation 2 2 Run Time Data Dependency Tracer Library The tracer library was written first in Perl to allow fast prototyping of data structures and algorithms for analysis Once the structure was consolidated it was fully rewritten in C to reduce the run time http sourceforge net projects cil http caml inria fr ocaml http www perl org HEAP_D3 4_V1 4_20120123 Page 7 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial about 16x speed increase with respect to the Perl version and about 450x slower than the normal application run The tracer library is linked with the instrumented application program under analysis to obtain an executable program To perform the execution analysis this program should be run using the same inputs as the normal not annotated application program Data dependency is collected during pro gram execution and at the end a summary file 1s generated that contains all the data needed to repre sent graphically the dependencies and the cross references with the source program in the IDE 2 3 Data Dependency Visualization This tool chain component is based on the free software program ZGRViewer It is a gr
18. ectTransfersIri N GEdgeStats java Ej GNode java assert transfers null GNodestats java for Node node getFirst transtfers 1f node getNodeNamel equalsIgqno i NodeXRef java annotateProjectTransfersTrans E ToolTip java ff Silently ignore anything else Ej XRef java gt EA net claribole zgrviewer fet gt Fa net claribole zqrviewer dot Annotate the lt project gt tag contents acher Egura of an IDE provided simulation results X ces antlr param project Libraries lt project gt tag to annotate f Project Files private void annotateProjectIri Node proje assert project null G lUsages DB Output balTasks QJJava Call Hierarchy Search Results HEAP_D3 4_V1 4_20120123 Page 21 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial 6 Excerpts of Code Blocks Documentation on Crea tion of a New Project This section is a guide to many of the beginning and some intermediate features of the creation and modification of a Code Blocks project If this is your first experience with Code Blocks here is a good starting point 6 1 The project wizard Launch the Project Wizard through File gt New gt Project to start a new project Here there are many pre configured templates for various types of projects including the option to create custom templates Select Console application
19. encies between program instructions A free software virtual machine was configured with the whole chain as a means to achieve a consis tent distribution able to demonstrate the tool functionality and receive valuable feedback for its fur ther development 2 Tool Chain The tool chain and the virtual machine make use only of free software tools The changes to the tools as well as the virtual machine configuration provided are considered a beta release Please provide feedback to improve it 2 1 Source Code Analysis and Instrumentation The source code analysis and instrumentation tool is based on the CIL platform C Intermediate Language CIL is written in ocaml and provides a high level representation along with a set of tools that facilitate the analysis and the source to source transformations of C programs CIL is both lower level than abstract syntax trees by clarifying ambiguous constructs and removing redundant ones and also higher level than typical intermediate languages designed for compilation by maintaining types and a close relationship with the source program The main advantage of CIL is that it compiles all valid C programs into a few core constructs with a very clean semantics Also CIL has a syntax directed type system that makes it easy to analyse and manipulate C programs Further more the CIL front end is able to process not only ANSI C programs but also those using Microsoft C or GNU C extensions A new cod
20. lt compiler normally GCC and the two default builds Debug and Release All of these settings are fine Press finish and the project will be generated The main window will turn gray but that is not a problem the source file needs only to be opened In the Projects tab of the Management pane on the left expand the folders and double click on the source file main cpp to open it in the editor Management bai q Projects Symbols Files P ee a Workspace d HelloWorld F Sources _ This file contains some default code 6 2 Changing file composition A single source file is of little uses in programs of any useful complexity In order to handle this Code Blocks has several very simple methods of adding additional files to the project 6 2 1 Adding a blank file To add the new file to the project bring up the file template wizard through either File gt New gt File orMain Toolbar gt New file button gt File HEAP_D3 4_V1 4_20120123 Page 23 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial File cpp CodeBlocks svn build File cpp Code Blocks svn build Edit View Search Project Build Debug womith Tools Plugins DoxyBlocks Settings File Edit View Search Project Build Debug wi mith O yi cishitN ORAS AA Open zg TE Empty file Ctrl Shift N l Open with hex editor Project Mana Clas
21. mw model xml mjpeg _par xml heapdemouser demoheap mjpeg par where e home heapdemouser projects tracer cil 1 4 0 bin cilly is the starting command for CIL compilation e the three gec compilations that follow are part of the cilly run and generate the instrumented model of the user program mjpeg_par cil c e rm f mjpeg_par i mjpeg_par o mjpeg_par cil i cleans the temporary files from the di rectory e the next gec run compiles the CIL model mjpeg_par cil c and links it with the data depend ency tracer library libheap and other system libraries libxml2 libavl e the rm command cleans the temporary files from the directory e the data dependency tracer is then run It actually runs the user program instrumented for data dependency tracing together with the data dependency tracer e finally the mv command renames the file with the generated data to the name expected by the ZGR Viewer based visualizer 3 3 Run the Data Dependency Visualization After each operation that can affect the visualization e g change the folding in the IDE editor up date the visualizer data the visualizer should be informed on the update Access the HEAP menu on the top menu of the IDE and click on the Update entry HEAP_D3 4_V1 4_20120123 Page 15 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial File View Help
22. ng a new project for data dependency analysis requires the following steps 1 create a new project under the IDE and populate it with the project source files please refer to the Code Blocks documentation for detailed explanation and to annex 6 Unless you are going to use Code Blocks for development importing a project for data de pendency analysis is usually just a matter of copying the project file tree under the project di rectory using standard GUI or command line tools 2 make sure the project compiles well with the native compiler gcc runs and produces the proper results 3 apply the data dependency analysis as described in section 3 2 4 visualize the data dependency results as described in section 3 3 An important aspect to consider when creating a new IDE project is its location If the project direc tory is set on the VM virtual disk it can be lost with the next updates of the VM It is safer to create the project on the host file system that is accessible to the host OS using the shared folders configura tion in section 3 es http wiki codeblocks org index php title Creating_a_new_project HEAP_D3 4_V1 4_20120123 Page 19 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Annexes 5 NetBeans Project for HEAP extensions and ZGRViewer The HEAP specific classes are expanded in the left panel The Z
23. o both deal with a large number of nodes and edges and also to simplify the graph transformation algorithms The HEAP specific code was grouped under the IDE package with sub packages for generic IPC classes Code Blocks specific IPC classes graph and IR classes and utility classes Both the ZGR Viewer project and the HEAP additions make up a single project under the NetBeans IDE see annex 5 Most of the functions and graphic interface are presented in detail in the following sections 2 4 IDE The IDE functionality is provided by Code Blocks Code Blocks is a well established cross platform IDE that supports projects in C C D languages It runs on Linux OS X and Windows platforms providing by design a consistent look feel and operation mode It is written in C using the wxWidgets library and is designed to be very extensible and fully configurable The IDE functionality was extended to suit the specific requests of the HEAP project in particular the interface with the graph viewer based on the Java project ZGR Viewer The recommended way to extend the functionality of the IDE is by writing plug ins The plug ins can be written either in an IDE specific scripting language or in C like its core To decide what lan guage to use it was considered that writing a script requires less time than writing C code but the scripting interface did not allow to spawn threads feature needed to handle the IPC with the view via U
24. s 2012 01 23 Document edit and final review HEAP_D3 4_V1 4_20120123 Page 4 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial Table of contents De TCE OA MCOION sssivssiecaestsessasrictaumsstanewestedessesacseusevendaueesdessiexseaveuesenedaseseuasesensadesausssdeseasassessustuiasencadessueedies 7 2s POOCH A sistas casssdnscssicas A E EE E EE E E E 7 2 1 Source Code Analysis and Instrumentation s eeennnnnnnnnssennnssssseenssssseresssseresssseersssssseeresssserens 7 2 2 Run Time Data Dependency Tracer LAD ry c ccccccccsssecccccecseeeeeeceee ee eeeeeeeeeseeeeeeeeaaaeeeeeeeaaaeeeeeeas 7 2 3 Data Dependency VISUGLIZALION wrcicsesesdnansvastinvseseceus suossensasidbiesdanavaraebedee dou badvasenadeabstaddMvacdeanben tides S Dh TIE a A E E A Patneasanetiauenuaneaseees 9 3 Demo Virtaal Machine siasicccasasaccasavececanasiaadscadenenaasosesansecuscascsesesanssddeessddccsccnecsssesedessseseesesstentasesesces 10 el LOGU ED ECMO TIO CC eisie E E ues enaasesaniatanwneepsiseentnnaoas 10 Do MUTI TI CIO E ISVS EE E E E E E A 13 3 3 Run the Data Dependency Visualization xcasciserscardenisatrsniacetaurreadaveradebevmnsebaswi need iedssenasnsacadaewacatas 15 Ma INOW PrO E cnn suse susietecessaseaseies 18 5 NetBeans Project for HEAP extensions and ZGR Viewer csssscsssccccssssssssssccccscssscssssssees 20 6 Excerpts of Code
25. s Open workspace Build target afi Project Ja he G4 Buildtarget Recent files j Custom File Import project From template Custom Nassi Shneiderman diagram From template E Save file as i Nassi Shneiderman diagram Save al files Ctrl Shift 5 Select C C source and click Go Continue through the following dialogues very much like the original project creation selecting C when prompted for a language On the final page you will be presented with several options The first box will determine the new file name and location as noted the full path is required You may optionally use the corresponding button to bring up a file browser window to save the file s location Checking Add file to active project will store the file name in the Sources folder of the Projects tab of the Management panel Checking any of the build targets will alert Code Blocks that the file should be compiled and linked into the selected target s This can be useful if for example the file contains debug specific code as it will allow the inclusion or exclu sion from the appropriate build target In this example however the hello function is of key impor tance and is required in each target so select all the boxes and click Finish to generate the file C C source Please enter the file s location and name and oS cyc FILE N A Filename with full path C HelloWorld hello cpp Add file to active project In build target s
26. to the host machine you may wish to move the ZGRV window on the second monitor of the VM and then move this VM second monitor window on the second physical monitor of the host 3 2 Run the Demo Analysis The analysis tool chain is run from the command line A script is provided that loosely glues together the whole chain Note the instrumented program runs about 450 times slower than the native run Open a terminal window by clicking on the icon in the top panel of the workspace and go into the directory of the mjpeg_par project of the IDE HEAP_D3 4_V1 4_20120123 Page 13 of 25 FP7 ICT 247615 HEAP Free Software Based Flow for the Visualization of the Parallelism in the Program Execution User Manual and Tutorial heapdemouseragdemoheap projects mjpeq par File Edit View Search Terminal Help heapdemousertdemoheap cd projects mjpeg par tracer VisPlugin zgrv heapdemouseredemoheap cd projects mjpeg par heapdemousertdemoheap mjpeg par ls barbaral2sx128 U DBCT h mjpeg par cbp paramh types h barbaral28x128 V marker h mjpeg par cil c Q h Video in h barbaral26x126 mjpeg Tunc h mjpeg par layout tables h Video out h csize h mjpeg par c mjpeg par xml tracer VLE h heapdemouserfdemoheap mjpeq par In this directory run the tracer sh script with arguments tracer sh mjpeg_par c where e double dash ends the command line options that are passed to the compiler and linker e mjpeg_p

Download Pdf Manuals

image

Related Search

Related Contents

Technical support and firmware or software updates: www.avocent  Installation & Operation Manual  Weslo 700 WETL26805.1 User's Manual  Weber Performer Original  ENGRAIS ANTIMOUSSE GAZON  WL400 Quick Start Guide  User Manual - Jive Communications, Inc.    PORTACOOL - MANUAL DEL PROPIETARIO  Super Brain 989  

Copyright © All rights reserved.
Failed to retrieve file