Lecture 5z Linux Tools – Call graphs Virtual Machines

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming Lecture 4 Writing Java Applications, Java Development Tools.
Advertisements

Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Chap 2 System Structures.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
Using the Class Dependency Analyzer for OODT By Joshua Garcia.
Reproducible Environment for Scientific Applications (Lab session) Tak-Lon (Stephen) Wu.
Amazon EC2 Quick Start adapted from EC2_GetStarted.html.
Julie McEnery1 Installing the ScienceTools The release manager automatically compiles each release of the Science Tools, it creates a set of wrapper scripts.
Doxygen: Source Code Documentation Generator John Tully.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Building a Cross Compiler, Assembler and Linker Designed by Prof. Peng-Sheng Chen.
Intro to PHP Introduction to server-side scripts (It’s all good :D) © TAFE NSW
UNIX ™ /Linux Overview Unix/IP Preparation Course June 9, 2013 Lusaka, Zambia.
LINUX System : Lecture 3 Vmware, Cygwin, LINUX installation Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Java Virtual Machine Java Virtual Machine A Java Virtual Machine (JVM) is a set of computer software programs and data structures that use.
LING 408/508: Programming for Linguists Lecture 3 August 31 st.
Internet of Things with Intel Edison Compiling and running Pierre Collet Intel Software.
WEB API: WHY THEY MATTER ECOL 453/ Nirav Merchant
CSC 215 : Procedural Programming with C C Compilers.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
CSCE 2013L: Lab 1 Overview  Java Basics The JVM Anatomy of a Java Program  Object-Oriented Programming Overview  Example: Payroll.java JDK Tools and.
Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running.
UNIX ™ /Linux Overview Unix/IP Preparation Course May 25, 2014 Djibouti.
UNIX/LINUX SHELLS.  “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and.
Software Architecture in Practice Practical Exercise in Performance Engineering.
Test Specifications A Specification System for Multi-Platform Test Suite Configuration, Build, and Execution Greg Cooksey.
22-July-2002cse142-13B-Development © 2002 University of Washington1 Development Tools CSE 142, Summer 2002 Computer Programming 1
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
 Programming - the process of creating computer programs.
introductory lecture on java programming
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
E Copyright © 2006, Oracle. All rights reserved. Using SQL Developer.
 CSC 215 : Procedural Programming with C C Compilers.
Solvency II Tripartite template V2 and V3 Presentation of the conversion tools proposed by FundsXML France.
Code Documentation & Doxygen Issa Mahasneh servit Open Source Solutions
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
CS-140 Dick Steflik Lecture 3. Java C++ Interpreted optimized for the internet Runs on virtual ized machine Derived from C++ Good object model Widely.
Review Why do we use protection levels? Why do we use constructors?
Computer System Structures
CSC 215 : Procedural Programming with C
Useful Tools for Testing
Development Environment Basics
CSCE 742 Software Architectures
Install external command line softwares
File System Implementation
FTP Lecture supp.
CASE STUDY 1: Linux and Android
PVS-Studio static analyzer: advanced features
Introduction to Programming the WWW I
Lecture 1 Runtime environments.
PHP / MySQL Introduction
2.1. Compilers and Interpreters
Chapter 2: Operating-System Structures
slides borrowed and adapted from Alex Mariakis and CSE 390a
J2EE Application Development
CSE 390a Lecture 1 introduction to Linux/Unix environment
Chapter 2: System Structures
CSE 303 Lecture 1 introduction to Linux/Unix environment
Chapter 2: The Linux System Part 1
Introduction to Algorithm Design
MySQL Migration Toolkit
An introduction to the Linux environment v
Intro to PHP.
Lecture 1 Runtime environments.
Web Application Development Using PHP
Plug-In Architecture Pattern
Presentation transcript:

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

Call Graph Links Wikipedia – Java Call graph – https://en.wikipedia.org/wiki/Call_graph Java Call graph – https://github.com/gousiosg/java-callgraph

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

.bashrc ls –a

Virtual Machines

ssh – Secure Shell

scp – Secure copy

Logging in Remotely to CSE machines

Core Duo

Doxygen http://gustavoseabra-qtp.blogspot.com/2012_01_01_archive.html

Static vs Dynamic Call Graphs

http://stackoverflow.com/questions/8576226/get-full-app-call-graph-in-kcachegrind

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. Intel(R) Single Event API (free, open-source)

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.

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

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 https://github.com/gousiosg/java-callgraph

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 https://github.com/gousiosg/java-callgraph

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 https://github.com/gousiosg/java-callgraph

Instrumentation