SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr 2007 - 1 Jonas M. Larsen Memory debugging Recipe profiling.

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
Source Code Optimization and Profiling of Energy Consumption in Embedded System Simunic, T.; Benini, L.; De Micheli, G.; Hans, M.; Proceedings on The 13th.
Disassembly תרגול 9 ניתוח קוד. How to - Disassembly of code Compilation of code:  gcc code.c  We get the file: a.out Disassembly:  objdump -d a.out.
CS503: First Lecture, Fall 2008 Michael Barnathan.
Performance Improvement
1 Performance Measurement CSE, POSTECH 2 2 Program Performance Recall that the program performance is the amount of computer memory and time needed to.
1 1 Profiling & Optimization David Geldreich (DREAM)
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Chocolate Bar! luqili. Milestone 3 Speed 11% of final mark 7%: path quality and speed –Some cleverness required for full marks –Implement some A* techniques.
CIS*2450 Seminar I Makefiles Debugging/Design Approaches Exception Handling Library Revision Control Designed by: Terry Moreland Updated by: Tom Crabtree.
GNU gcov (1/4) [from Wikipedia] gcov is a source code coverage analysis and statement- by-statement profiling tool. gcov generates exact counts of the.
SDD/DFS L.K.Lundin VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Pipeline Test methods Lars Kr. Lundin - CPL developer - NACO and VISIR.
Programming Tools gcc make utility Open Source code Static and Shared Libraries gdb Memory debugging tools.
Timing and Profiling ECE 454 Computer Systems Programming Topics: Measuring and Profiling Cristiana Amza.
SDD/DFS R. Hook. VLT 2 nd Generation Instrumentation Pipelines, 18 Apr Richard Hook Sampo & ESO Reflex background, status and plans.
SDD/DFS Y. Jung VLT 2 nd Generation Instrumentation Pipelines, 19 Apr General Introduction Yves Jung.
1 Components of the Virtual Memory System  Arrows indicate what happens on a lw virtual address data physical address TLB page table memory cache disk.
CSE 303 Concepts and Tools for Software Development Richard C. Davis UW CSE – 12/6/2006 Lecture 24 – Profilers.
Debugging and Profiling With some help from Software Carpentry resources.
Adv. UNIX: Profile/151 Advanced UNIX v Objectives –introduce profiling based on execution times and line counts Special Topics in Comp.
SDD/DFS H. Lorch & M. Kiekebusch VLT 2 nd Generation Instrumentation Pipelines, 18 Apr Henning Lorch & Mario Kiekebusch et. al. The CLIP.
1 SEEM3460 Tutorial Compiling and Debugging C programs.
SDD/DFS A. Modigliani VLT 2 nd Generation Instrumentation Pipelines, 19 Apr ACCEPTANCE TESTS Andrea Modigliani.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 11 – gdb and Debugging.
Adjusting Recipes Sometimes recipes are created in the right amount for the number of people you are serving. Sometimes recipes don’t make enough for the.
Matlab for Engineers Gari Clifford © Centre for Doctoral Training in Healthcare Innovation Institute of Biomedical Engineering Department of.
Debugging 1/6/2016. Debugging 1/6/2016 Debugging  Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a program.
MP-PIPE for Soybean Proteome Brad Barnes 27/11/15 COMP 5704.
1 Performance Issues CIS*2450 Advanced Programming Concepts.
Revision Mid 2, Cache Prof. Sin-Min Lee Department of Computer Science.
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
Copyright 2014 – Noah Mendelsohn Performance Analysis Tools Noah Mendelsohn Tufts University Web:
Aarul Jain CSE520, Advanced Computer Architecture Fall 2007.
Performance* Objective: To learn when and how to optimize the performance of a program. “ The first principle of optimization is don ’ t. ” –Knowing how.
Debugging: Tips and Tools Also, Aloha Recitation Wednesday, February 7th, 2007.
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
Analysis experience at GSIAF Marian Ivanov. HEP data analysis ● Typical HEP data analysis (physic analysis, calibration, alignment) and any statistical.
KAI-GCC Transition Status Report 11 March 2004 Marc Paterno.
Language Translation Compilation vs. interpretation Compilation diagram Step 1: compile Step 2: run program Compiled program compiler input output Compiled.
July 10, 2016ISA's, Compilers, and Assembly1 CS232 roadmap In the first 3 quarters of the class, we have covered 1.Understanding the relationship between.
1 CS 192 Lecture 4 Winter 2003 December 8-9, 2003 Dr. Shafay Shamail.
Two notions of performance
a.k.a how we test Your code
Address – 32 bits WRITE Write Cache Write Main Byte Offset Tag Index Valid Tag Data 16K entries 16.
Measuring Where CPU Time Goes
Debugging Memory Issues
Speeding Ticket Speeding Ticket Speeding Ticket 3-3-3
Programming Tips GS540 January 10, 2011.
CSE 351 Section 1: HW 0 + Intro to C
Agenda Why simulation Simulation and model Instruction Set model
CMSC 611: Advanced Computer Architecture
GNU gcov (1/4) [from Wikipedia]
PPT9: Asserting expectations
CSc 352: Testing and Code Coverage
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science
DEBUGGING CS2110.
CSE 373 Data Structures and Algorithms
a.k.a how we test Your code
GNU gcov gcov is a test coverage program running with gcc.
Multithreading Why & How.
CMSC 611: Advanced Computer Architecture
GNU gcov (1/4) [from Wikipedia]
Min Heap Update E.g. remove smallest item 1. Pop off top (smallest) 3
CISC 7120X Programming Languages and Compilers
CSE 303 Concepts and Tools for Software Development
Debugging.
C. M. Overstreet Old Dominion University Fall 2005
Makefiles, GDB, Valgrind
CSc 352 Performance Tuning
Presentation transcript:

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Jonas M. Larsen Memory debugging Recipe profiling

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Memory debugging valgrind > valgrind a.out

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Memory debugging valgrind Memory errors sometimes make programs crash. Other times they don't! Use a memory debugger regularly (valgrind, gdb,...)

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Profiling Reasons to optimize The pipeline must process at about the same speed as observations are performed Trade-off: Science quality vs. execution speed Reasons not to optimize “slow” can be “fast enough” Trade-off: CPU cycles vs. human brain cycles Trade-off: Design vs. speed Measure before you optimize!

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Profiling profile_build > profile_build -qfitssrc=~/qfits cplsrc=~/cpl esorexsrc=~/esorex iiinstrumentsrc=~/xshp -builddir=~/BUILD - iiinstrumentlib=xsh xsh_mbias > ~/BUILD/bin/esorex xsh_mbias xsh_mbias.sof > gprof ~/BUILD/bin/esorex > gcov my_source_file.c

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Profiling GCC gprof GCC gprof

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Profiling GCC gcov Use profiling tools (gprof, gcov, Shark,...) GCC gcov

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Profiling Asymptotic time complexity Example: Looping through a FITS header O(n^3) O(n^2) O(n)

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Profiling Constant factor optimization Measure before you optimize!

SDD/DFS Jonas M. Larsen VLT 2 nd Generation Instrumentation Pipelines, 19 Apr Profiling If n is large, be careful about... Reference: