on the object orientedness of c programs in spec cpu 2006 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
On the Object Orientedness of C++ programs in SPEC CPU 2006 PowerPoint Presentation
Download Presentation
On the Object Orientedness of C++ programs in SPEC CPU 2006

Loading in 2 Seconds...

play fullscreen
1 / 24

On the Object Orientedness of C++ programs in SPEC CPU 2006 - PowerPoint PPT Presentation


  • 87 Views
  • Uploaded on

On the Object Orientedness of C++ programs in SPEC CPU 2006. Ciji Isen & Lizy K. John University of Texas - Austin. 1/27/2008. Introduction. Object Oriented programming encourages Code modularity , ease of design & maintenance Inheritance & hierarchies polymorphism Dynamic Dispatch

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 'On the Object Orientedness of C++ programs in SPEC CPU 2006' - gina


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
on the object orientedness of c programs in spec cpu 2006

On the Object Orientedness of C++ programs in SPEC CPU 2006

Ciji Isen & Lizy K. John

University of Texas - Austin

Laboratory for Computer Architecture

1/27/2008

introduction
Introduction
  • Object Oriented programming encourages
    • Code modularity, ease of design & maintenance
    • Inheritance & hierarchies
    • polymorphism
    • Dynamic Dispatch
  • Should imply
    • Multiple function invocation
    • More functions
    • More indirect branching
  • Increased control flow
    • particularly function calls and indirect branches

Laboratory for Computer Architecture

objective
Objective
  • Object oriented nature of SPEC CPU2006 C++ programs
    • Measure using quantifiable metrics
    • Compare with other OO(SPEC java) benchmarks
  • Has OO nature affected control flow?
    • branch compositions
    • Branch misprediction

Laboratory for Computer Architecture

c programs in spec cpu06
C++ programs in SPEC cpu06

Laboratory for Computer Architecture

methodology
Methodology
  • Performance counters
    • Woodcrest(Intel), Power5+(IBM)
  • Benchmarks
    • SPEC CPU 2006
    • SPEC jbb2000
    • SPECjvm98
  • Principle Component Analysis for Visualization

Laboratory for Computer Architecture

object oriented metrics
Object Oriented metrics
  • CK (Chidamber and Kemerrer) metrics
    • WMC (Weighted Methods per Class)
    • DIT (Depth of Inheritance Tree)
    • NOC (Number of Children)
    • CBO (Coupling Between Objects)
    • RFC (Response for a Class)

Laboratory for Computer Architecture

wmc weighted methods per class
WMC (Weighted Methods per Class)
  • if complexity is unity
  • WMC = n
  • Intuition: More methods implies
    • more time & effort to develop and maintain class
    • More methods inherited by children => more impact on children
    • Likely to be more application specific => less reuse

Laboratory for Computer Architecture

dit depth of inheritance tree
DIT (Depth of Inheritance Tree)
  • A measure of impact of ancestor classes
  • Intuition: deeper class hierarchy implies
    • More methods inherited => more complexity
    • Greater design complexity
    • Greater potential to reuse inherited methods

Laboratory for Computer Architecture

noc number of children
NOC (Number of Children)
  • Definition: Number of immediate subclasses
  • Intuition: more children implies
    • Greater reuse
    • more influence on the design

Laboratory for Computer Architecture

cbo coupling between objects
CBO (Coupling Between Objects)
  • Definition: The number of other classes to which a class is coupled
    • Via methods
    • Instance variables
  • Intuition: more coupling implies
    • Bad for modularity. Less independence for class => difficult to reuse
    • Less independence => sensitive to change in other parts
    • More interaction => complexity in testing correctness

Laboratory for Computer Architecture

rfc response for a class
RFC (Response for a Class)
  • Intuition: more methods executed per message implies
    • More complexity for the class
    • Complexity in testing and debugging

Laboratory for Computer Architecture

object orientedness of c benchmarks in cpu06
Object Orientedness of C++ benchmarks in cpu06

Laboratory for Computer Architecture

object orientedness of c benchmarks in cpu061
Object Orientedness of C++ benchmarks in cpu06

Laboratory for Computer Architecture

object orientedness of c vs java benchmarks
Object Orientedness of C++ vs. java benchmarks

[DaCapo paper]

Laboratory for Computer Architecture

object orientedness of c vs java benchmarks1
Object Orientedness of C++ vs. java benchmarks

Laboratory for Computer Architecture

control flow characteristics
Control flow Characteristics
  • Has OO nature affected control flow?
    • branch compositions
    • Branch misprediction

Laboratory for Computer Architecture

branch types int
Branch types - INT

Laboratory for Computer Architecture

branch types fp
Branch types - FP

Laboratory for Computer Architecture

branch types int1
Branch types - INT

Laboratory for Computer Architecture

branch types fp1
Branch types - FP

Laboratory for Computer Architecture

branch misprediction int
Branch misprediction - INT

Laboratory for Computer Architecture

branch misprediction fp
Branch misprediction - FP

Laboratory for Computer Architecture

summary
Summary
  • Increased presence of C++ in SPEC CPU encouraging
  • Measured object orientedness of C++ programs
    • Xalanckbmk,dealII & omnetpp – strong OO
    • OO nature of C++ programs not any worse than SPEC Java benchmarks
  • Analyzed impact of OO nature on control flow
    • Control flow increase pronounced for FP
    • Xalanckbmk, dealII & omnetpp – higher % of function calls and indirect branches

Laboratory for Computer Architecture

questions
Questions

24

Laboratory for Computer Architecture

Laboratory for Computer Architecture

8/28/2007