Exploring Software Architectures with Linux Tools and Call Graphs

csce 742 software architectures n.w
1 / 19
Embed
Share

Delve into the world of software architectures through the lens of Linux tools and call graphs. Learn about virtual machines, regular expressions, environment variables, SSH, secure copy, logging in remotely, and more. Explore the intricacies of static vs. dynamic call graphs and tools like gprof, KCachegrind, and OpenPAT. Enhance your understanding of software systems with valuable insights from CSCE 742 lectures.

  • Software Architectures
  • Linux Tools
  • Call Graphs
  • Virtual Machines
  • CSCE 742

Uploaded on | 1 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. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

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.

E N D

Presentation Transcript


  1. CSCE 742 Software Architectures Lecture 5z Linux Tools Call graphs Virtual Machines Topics Call graphs Regular expressions May 22, 2017

  2. Call Graph Links 1. Wikipedia https://en.wikipedia.org/wiki/Call_graph 2. Java Call graph https://github.com/gousiosg/java-callgraph 2 CSCE 742 Summer 2017

  3. Environment Variable SHELL, PATH, HOME, JAVA_HOME, CLASS_PATH ?? What is the PATH anyway? export PATH= ~/bin:$PATH //add ~/bin to the front of the PATH 3 CSCE 742 Summer 2017

  4. .bashrc ls a 4 CSCE 742 Summer 2017

  5. Virtual Machines 5 CSCE 742 Summer 2017

  6. ssh Secure Shell 6 CSCE 742 Summer 2017

  7. scp Secure copy 7 CSCE 742 Summer 2017

  8. Logging in Remotely to CSE machines 8 CSCE 742 Summer 2017

  9. Core Duo 9 CSCE 742 Summer 2017

  10. Doxygen 10 http://gustavoseabra-qtp.blogspot.com/2012_01_01_archive.html CSCE 742 Summer 2017

  11. Static vs Dynamic Call Graphs 11 CSCE 742 Summer 2017

  12. http://stackoverflow.com/questions/8576226/get-full-app-call-graph-in-kcachegrindhttp://stackoverflow.com/questions/8576226/get-full-app-call-graph-in-kcachegrind 12 CSCE 742 Summer 2017

  13. Dynamic Call Graphs - Run-time call-graph Most profilers with callgraph functionality gprof : included in BSD or part of the GNU Binary Utilities KCachegrind : powerful tool to generate and analyze call graphs based on data generated by Valgrind's callgrind tool. Mac OS X Activity Monitor : Apple GUI process monitor Activity Monitor has a built-in call graph generator that can sample processes and return a call graph. OpenPAT : includes the control_flow tool which automatically creates a Graphviz call-graph picture from runtime measurements. pprof, open source tool for visualization and analysis of profile data, to be used in conjunction with gperftools. CodeAnalyst from AMD (released under GPL) makeppgraph is a dependency graph generator (at module level) for builds performed with makepp. 13 CSCE 742 Summer 2017 Intel(R) Single Event API (free, open-source)

  14. Static Call Graph Tools (for C) doxygen : Uses graphviz to generate static call/inheritance diagrams cflow : GNU cflow is able to generate the direct and inverted call graph of a C program egypt : a small Perl script that uses gcc and Graphviz to generate the static call graph of a C program. CCTree : Native Vim plugin that can display static call graphs by reading a cscope database. Works for C programs. codeviz : a static call graph generator (the program is not run). Implemented as a patch to gcc; works for C and C++ programs. calltree.sh : Bash shell functions that glue together cscope, graphviz, and a sampling of dot-rendering tools to display "caller" and "callee" relationships above, below, and/or between the C functions you specify. tceetree : like calltree.sh, it connects Cscope and Graphviz, but it is an executable rather than a bash script. 14 CSCE 742 Summer 2017

  15. PHP, Perl and Python Devel::NYTProf : a perl performance analyzer and call chart generator phpCallGraph : a call graph generator for PHP programs that uses Graphviz. It is written in PHP and requires at least PHP 5.2. pycallgraph : a call graph generator for Python programs that uses Graphviz. gprof2dot : A call graph generator written in Python that converts profiling data for many languages/runtimes to a Graphviz callgraph. code2flow: A call graph generator for Python and Javascript programs that uses Graphviz 15 CSCE 742 Summer 2017

  16. java-callgraph: Java Call Graph Utilities A suite of programs for generating static and dynamic call graphs in Java. javacg-static: Reads classes from a jar file, walks down the method bodies and prints a table of caller- caller relationships. javacg-dynamic: Runs as a Java agent and instruments the methods of a user-defined set of classes in order to track their invocations. At JVM exit, prints a table of caller-callee relationships, along with a number of calls Download or clone 16 CSCE 742 Summer 2017 https://github.com/gousiosg/java-callgraph

  17. Compile Compile - The java-callgraph package is built with maven. Install maven and do: mvn install This will produce a target directory with the following three jars: javacg-0.1-SNAPSHOT.jar: This is the standard maven packaged jar with static and dynamic call graph generator classes javacg-0.1-SNAPSHOT-static.jar: This is an executable jar which includes the static call graph generator javacg-0.1-SNAPSHOT-dycg-agent.jar: This is an executable jar which includes the dynamic call graph generator 17 CSCE 742 Summer 2017 https://github.com/gousiosg/java-callgraph

  18. Running Static Call Graph Generator javacg-static accepts as arguments the jars to analyze. java -jar javacg-0.1-SNAPSHOT-static.jar lib1.jar lib2.jar... javacg-static produces combined output in the following format: For methods M:class1:<method1>(arg_types) (typeofcall)class2:<method2>(arg_types) The line means that method1 of class1 called method2 of class2. The type of call can have one of the following values (refer to the JVM specification for the meaning of the calls): M for invokevirtual call I for invoke interface call O for invokespecial calls S for invokestatic calls D for invokedynamic calls 18 CSCE 742 Summer 2017 https://github.com/gousiosg/java-callgraph

  19. Instrumentation 19 CSCE 742 Summer 2017

Related


More Related Content