Profiler Framework - Object Oriented Design - Project I | CSE 687, Study Guides, Projects, Research of Engineering

Material Type: Project; Professor: Fawcett; Class: Object Oriented Design; Subject: Computer Engineering; University: Syracuse University; Term: Spring 2008;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/09/2009

koofers-user-w5u-1
koofers-user-w5u-1 🇺🇸

9 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE687 - Object Oriented Design
Spring 2008
Project #1 – Profiler Framework due
Monday, Feb 11
Purpose:
This project requires you to develop a C++ program to analyze the code coverage and performance of other
C++ programs. A profileWriter modifies source files to be profiled by declaring a profiler object at the
beginning of each function, and declaring a profile manager object in the program’s executive’s main
function. We describe this process profiler annotation. You are expected to support several roles for
profiling, including: code coverage, function timing, and capturing of a history of function input parameter
values.
The profiler object will take some initial action, appropriate for its role, when it is constructed at the
beginning of an annotated function, and takes concluding actions when it is destroyed as it goes out of
scope when the thread of execution leaves the annotated function. For performance analysis, for example,
it turns on a high resolution timer 1 when constructed, and stops and reads the timer in its destructor.
Before leaving its destructor, it communi cates results to the profile manager.
The goal of this project is to develop a simple profiling framework that can be useful for testing, debugging,
and performance analysis. The framework should be extensible. That is, a developer should be able to
define a new profiler type and, with no other changes, use the new profiler in C++ programs that know
nothing of the profiling activities, other than suffering annotations with the profiler objects. You have three
things to develop: (1) a profilerWriter that creates modified source files from original source, (2) three
profiler classes that i mplement call coverage, function timing, and parameter history, respectively, and (3)
a profileManager class that accepts text information from its profiler objects, and dis plays the profiling
results at the end of the program’s execution.
Requirements:
Your Profiler Framework:
1. shall use standard C++ 2 and the standard library, compile and link from the command line, using VC+
+ 9.0, as provided in the ECS clusters and operate in the environment provided there 3.
2. shall use services of the C++ iostream library for all input and output to and from the user’s console 4
and C++ operator new and delete for all dynamic memory management, if you use any.
3. shall provide a profileWriter , that generates modified source code files by inserting profiler object
declarations at the beginning of each function 5. The code modifications are limited to that described in
the Purpose section. Note that the modifications are particularly simple to implement, as they simply
provide new declarations for a profiler at the beginning of each annotated function and a profileManager
at the beginning of the executive’s main function.
4. shall provide an extensible profiling library 6 that provides coverage, performance, and parameter
tracking profile classes and a profile manager class. It is expected that all communicati on between
profilers and profile manager will usually be via text messages, however, your design can accommodate
more than this if you wish.
1 You will find a high resolution timer module in Handouts\CSE687\HiResTimerNativeCpp.
2 This means, for example that you may not use the .Net managed extensions to C++.
3 VC++ version 9.0 is provided by Visual Studio .Net 2008, and is available in all the ECS clusters.
4 You may use a WinForm interface, but are not required to do so.
5 Do this for both global functions and member functions of each class.
6 By “extensible profiling library” we mean that a new profiler and/or profile manager can be added simply by creating the
NewProfiler.h and NewProfiler.cpp files that are compiled with the profiled source code. The annotation program,
profileWriter, should not have to change. You enter profiler type name as a command line argument. Extensibility also
requires that a new profiler can communicate with an already know profile manager and a new profile manger can
communicate with an already know profiler. Note that you can accomplish both these things using only the extension
techniques already discussed in class. Note that the type of information sent from profiler to profile manager may vary from
profiler to profiler. You can accommodate that by techniques already discussed in class.
pf2

Partial preview of the text

Download Profiler Framework - Object Oriented Design - Project I | CSE 687 and more Study Guides, Projects, Research Engineering in PDF only on Docsity!

CSE687 - Object Oriented Design

Spring 2008

Project #1 – Profiler Framework due

Monday, Feb 11

Purpose:

This project requires you to develop a C++ program to analyze the code coverage and performance of other C++ programs. A profileWriter modifies source files to be profiled by declaring a profiler object at the beginning of each function, and declaring a profile manager object in the program’s executive’s main function. We describe this process profiler annotation. You are expected to support several roles for profiling, including: code coverage, function timing, and capturing of a history of function input parameter values. The profiler object will take some initial action, appropriate for its role, when it is constructed at the beginning of an annotated function, and takes concluding actions when it is destroyed as it goes out of scope when the thread of execution leaves the annotated function. For performance analysis, for example, it turns on a high resolution timer^1 when constructed, and stops and reads the timer in its destructor. Before leaving its destructor, it communicates results to the profile manager. The goal of this project is to develop a simple profiling framework that can be useful for testing, debugging, and performance analysis. The framework should be extensible. That is, a developer should be able to define a new profiler type and, with no other changes, use the new profiler in C++ programs that know nothing of the profiling activities, other than suffering annotations with the profiler objects. You have three things to develop: (1) a profilerWriter that creates modified source files from original source, (2) three profiler classes that implement call coverage, function timing, and parameter history, respectively, and (3) a profileManager class that accepts text information from its profiler objects, and displays the profiling results at the end of the program’s execution.

Requirements:

Your Profiler Framework:

  1. shall use standard C++^2 and the standard library, compile and link from the command line, using VC+
    • 9.0, as provided in the ECS clusters and operate in the environment provided there^3.
  2. shall use services of the C++ iostream library for all input and output to and from the user’s console^4 and C++ operator new and delete for all dynamic memory management, if you use any.
  3. shall provide a profileWriter, that generates modified source code files by inserting profiler object declarations at the beginning of each function^5. The code modifications are limited to that described in the Purpose section. Note that the modifications are particularly simple to implement, as they simply provide new declarations for a profiler at the beginning of each annotated function and a profileManager at the beginning of the executive’s main function.
  4. shall provide an extensible profiling library^6 that provides coverage, performance, and parameter tracking profile classes and a profile manager class. It is expected that all communication between profilers and profile manager will usually be via text messages, however, your design can accommodate more than this if you wish. (^1) You will find a high resolution timer module in Handouts\CSE687\HiResTimerNativeCpp. (^2) This means, for example that you may not use the .Net managed extensions to C++. (^3) VC++ version 9.0 is provided by Visual Studio .Net 2008, and is available in all the ECS clusters. (^4) You may use a WinForm interface, but are not required to do so. (^5) Do this for both global functions and member functions of each class. (^6) By “extensible profiling library” we mean that a new profiler and/or profile manager can be added simply by creating the NewProfiler.h and NewProfiler.cpp files that are compiled with the profiled source code. The annotation program, profileWriter, should not have to change. You enter profiler type name as a command line argument. Extensibility also requires that a new profiler can communicate with an already know profile manager and a new profile manger can communicate with an already know profiler. Note that you can accomplish both these things using only the extension techniques already discussed in class. Note that the type of information sent from profiler to profile manager may vary from profiler to profiler. You can accommodate that by techniques already discussed in class.

CSE687 - Object Oriented Design

Spring 2008

  1. shall provide a command line interface that accepts a path, a set of file patterns, and a switch that indicates which of the supplied profiling activities is to be carried out.
  2. shall demonstrate the use of this facility by profiling some of its own source code, or a stand-alone module. Can you think of other profiler objects that might be useful? Note that there is no requirement to provide a graphical user interface. If you do so, you should also provide a command line interface, as required in #5. Please demonstrate that you meet all of the requirements, stated above.