Call%20Data%20Collection%20-%201 - PowerPoint PPT Presentation

About This Presentation
Title:

Call%20Data%20Collection%20-%201

Description:

Minimize modification to AB. Modularize language dependent ... Extra Slides Time Permitting. Call Data Collection Implementation. Java bytecode based collector. ... – PowerPoint PPT presentation

Number of Views:14
Avg rating:3.0/5.0
Slides: 18
Provided by: patricia209
Learn more at: https://cseweb.ucsd.edu
Category:

less

Transcript and Presenter's Notes

Title: Call%20Data%20Collection%20-%201


1
Aspect Browser Plus Ling Neil Patricia
2
Motivation
  • When modifying code it is important to find all
    dependencies
  • Backtracing is helpful when learning new code

3
Scenario
  • Find all references to a member function called
    getName that is in a class called Class
  • Looking for
  • classNew.getName()
  • myClass.getName()
  • anything.getName()
  • As long as it is of type Class

4
How to do this with AB
  • Create getName() aspect
  • May result in a lot of false positives
  • Create Class aspect and note all variables that
    have this type. Search for variable.getName()
  • Tedious
  • Detracts from task at hand
  • Wont find implicit this references
  • Take advantage of naming conventions
  • No guarantee

5
Goals
  • Keep Aspect Browser language independent
  • Minimize modification to AB
  • Modularize language dependent portion

6
How did we do it?
  • Language dependent component creates a database
  • Can use any method desired to populate file
  • Aspect Browser uses database when Aspect Plus
    Aspects are created
  • getName_at__at_Class

7
Demo
  • Want to modify getName() function of a class
    called Class

8
What went right?
  • Modularization was almost perfect
  • I still have no idea how Patricias code works
  • Patricia and Ling have never seen my
    modifications
  • Integration with Aspect Browser was almost
    trivial.
  • AspectPlus inherited from Aspect
  • Factory created AspectPlus based on string parse

9
What went wrong?
  • We couldnt use this on Aspect Browser itself
    because of AspectJ. Bummer!
  • Emacs interface is not perfect

10
Whats next?
  • Support for another language (c)
  • Support member variable references as well
  • Support RegExp matches
  • Fix bug with emacs highlighting

11
Questions?
12
Extra Slides Time Permitting
13
Call Data Collection Implementation
  • Java bytecode based collector. Requires
    pre-compiled files.
  • Uses Apache BCEL to read and parse class files.
  • Extracts source file, line number, target type,
    and function name for each call.

14
Call Collection Issues
  • Requires optional line number and local variable
    tables. Debug compile generates them.
  • Compilation and collection should be automated.
  • Virtual calls - currently indicates only match to
    compile time type.

15
Function of AspectPlusDatabase
  • User Interface calls findAspect with sFile, sType
    and sFunction.
  • findAspect goes through the Database and returns
    the line for every occurrence of them.

16
Implementation1
  • AspectPlusDatabase goes through the Database once
    and saves all the information in a hashmap for
    later uses.

17
Implementation2
  • AspectPlusDatabase finds the vector by key sFile,
    then finds sType and sName in the vector.
Write a Comment
User Comments (0)
About PowerShow.com