run time component memory analysis
Download
Skip this Video
Download Presentation
Run-time Component memory analysis

Loading in 2 Seconds...

play fullscreen
1 / 23

Run-time Component memory analysis - PowerPoint PPT Presentation


  • 63 Views
  • Uploaded on

Run-time Component memory analysis. Project members: Gati Michael Johan Muskens Merijn de Jong Michel Chaudron. 26 Sept 2003. Content. Project Introduction (goals, idea and assumptions) Problem analysis

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Run-time Component memory analysis' - kairos


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
run time component memory analysis

Run-time Component memory analysis

Project members: Gati Michael

Johan Muskens

Merijn de Jong

Michel Chaudron

26 Sept 2003

content
Content
  • Project Introduction
    • (goals, idea and assumptions)
  • Problem analysis
  • Why use AspectC++ Approach
  • Analysis of AspectC++
  • Modeling
  • Problems with AspectC++
  • Current status of the project
project introduction
Project Introduction

Assumptions

Goals Main Idea

  • Flexible and extendible design
  • Reusable extensions (implementation)
  • Investigate the use of aspect orientation
  • Validate the results of the tool with Chat application

Main goal is to build a software tool to measure dynamic memory use of component based system

project context scope
Project context & scope

Project Introduction

Robocop component

Functional model

Resource estimation model

Software

Tool

Resource

Measurement

Source code model

Document model

goals main idea
GoalsMain Idea

Project Introduction

Assumptions

AC++

Dynamic memory information

C++ Component Code

Other

Measurement Tool

slide6

Project Introduction

GoalsMain Idea Assumptions

Domain

Linux development environment (G++/Ac++

compiler)

C/C++ Implementation language

Component design and development

Aspect oriented programming (AspectC++)

Mysql++ ( C++API)

Assumptions &Constraints

  • Software tool should handle any generic c/c++ component
  • Software tool should be implemented in C/C++ under Linux environment
problem analysis existing analysis work
Chat Application

Know the design and dynamic behaviour of the system

Techniques used – function library modification

Existing debugging tools

Most tools analyze memory use by functions, call stack, block sizes

Problem analysisExisting analysis work
problem analysis chat application idea
Problem analysisChat application Idea
  • Relied on the knowledge of the component code

Automatic instrumentation?

problem analysis techniques of automatic instrumentation

Transform

CPU

Unparsed

C++

Parser

C++’

Transform

memory

Compile

Info

Program

Run

Problem analysisTechniques of automatic instrumentation
  • Traditional way

Extendibility

Build multiple transforms (CPU, Memory )

Reuse the parser

problem analysis techniques of automatic instrumentation1
Problem analysisTechniques of automatic instrumentation

What is Aspect Oriented Programming?

Goal of AOP -> separation of concerns

Weaver takes the required input and process it into new program

Aspect 1

Aspect2

Extendibility

C++’

C++

Weaver

A

A

Easy to add new Aspect

B

C

Reusability

B

C

Easy to reuse the code

problem analysis problems of instrumentation techniques
Problem AnalysisProblems of Instrumentation techniques
  • Traditional way –parsing C++is difficult.
  • Aspect approach-alreadyexistsweaver for C++ -> but It is a prototype
why use aspectc approach

What

Profiling

Aspect

Extensibility

Yes

Yes

High level of Abstraction/

Reusability

No

Yes

Linux Platform

Yes

Yes

Time of preparation

Not feasible

Feasible

Build C++ parser

Time of preparation

-

Feasible

Aspect code

Instrumentation

Difficult

Simple

mechanism

Why use AspectC++ Approach

OPTIONS

analysis of aspectc four main questions
Analysis of AspectC++Four Main questions
  • How to identify the patterns to instrument?
  • Which code to add to which pattern?
  • How to collect the reported data?
  • How to analyze the reported data?
analysis of aspectc how to identify the patterns to instrument
Analysis of AspectC++How to identify the patterns to instrument?
  • Join points !!

It is a place in the component code where an aspect code can interfere(function, a class, an attribute..)

  • Examples-join points for memory analysis
analysis of aspectc which code to add to which pattern
Analysis of AspectC++Which code to add to which pattern?

We are interested in getting the following information

  • Size(allocated memory block)
  • Address of allocation
  • Address of deallocation
  • Time spent from allocation to deallocation
  • The name of the objects and class names
analysis of aspectc which code to add to which pattern1
Analysis of AspectC++Which code to add to which pattern?

advice code:

You can specify when the join point should be called or executed by writing an advice code.

Syntax:

advice call (“joint point”):after(){ A}

advice call (“joint point”):before(){ A}

advice call (“joint point”):around(){ A}

Join points can be combined with logical operators (||),(&&), or (!=)

example

Analysis of AspectC++

Example
  • Measure the size allocated by malloc()

Advice call ("void * malloc (...)") && args (size): around (size_t size) {

printf ("Memory size%ld: \n", size);

tjp->proceed ();

printf ("Pointer allocated: %p\n", *tjp->result ());

}

Note: tjp==JoinPoint

model 1 mapping the measured data to different aggregation level
Model 1-Mapping the measured data to different aggregation level

Analysis: How to analyze data

Application

Total components

Components

Total classes/ component

Classes

Total objects /class

Objects

Each object

slide21

C/C++

Input code

Aspect code

Ac++ weaving

Other profiler

C’/C’++

G. program

g++ compiling

C/C++Program

Instrumentation

Data Collection

MYSQL server

DB(3-tables)

DB connector

Data Retrieval

tables

graphs

Analyzer

Architecture

What is not

instrumented?

Class names & object names

Which data is collected?

The 3 tables-> but thee are some problems of skipping rows

Which analysis is

displayed?

Memory use over time

problems of aspect
Problems of Aspect++
  • Compiler problems
  • some files in the gcc 3.x header files cannot be parsed byac++
  • But it works for g++ 2.9x- Take the headers from another machine and adapt the working environment for ac++
  • Unable to instrument operators new & delete
  • Pre-processor
  • Use aspect to instruct where to put overloaded operators
next plan
Next plan
  • Implementation –> 1 Nov(25 Nov for improvement)
  • Technical problems- >5-Oct-2003

1. Get all data from program to database

2. Perform experiments on:

->Chat application with aspect code under g++2.9x

->Pre-processor

  • Extract tables from Db and make different analysis- 1 November
  • Writing report->20 -Jan-2004
  • Modeling chapter ->architecture and design- 17-Oct-2003
  • Implementation chapter -> 27 –Nov-2003
  • Verification & validation->12-Dec-2003
  • Management -> 20 Jan 2004
ad