• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

kcachegrind

Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
ProfileCostArray Class Reference

#include <costitem.h>

Inheritance diagram for ProfileCostArray:
Inheritance graph
[legend]

Public Member Functions

 ProfileCostArray (ProfileContext *)
 
 ProfileCostArray ()
 
virtual ~ProfileCostArray ()
 
void addCost (EventTypeMapping *, const char *)
 
void addCost (EventTypeMapping *, FixString &)
 
void addCost (ProfileCostArray *item)
 
void addCost (int index, SubCost value)
 
virtual void clear ()
 
virtual QString costString (EventTypeSet *)
 
ProfileCostArray diff (ProfileCostArray *item)
 
virtual void invalidate ()
 
void maxCost (EventTypeMapping *, FixString &)
 
void maxCost (ProfileCostArray *item)
 
void maxCost (int index, SubCost value)
 
QString prettySubCost (EventType *)
 
QString prettySubCostPerCall (EventType *t, int calls)
 
void reserve (int)
 
void set (EventTypeMapping *, const char *)
 
void set (EventTypeMapping *, FixString &)
 
SubCost subCost (EventType *)
 
- Public Member Functions inherited from CostItem
 CostItem (ProfileContext *)
 
virtual ~CostItem ()
 
ProfileContext * context () const
 
virtual TraceData * data ()
 
virtual const TraceData * data () const
 
CostItem * dependant ()
 
virtual QString formattedName () const
 
QString fullName () const
 
virtual QString name () const
 
virtual TracePart * part ()
 
virtual const TracePart * part () const
 
virtual QString prettyName () const
 
void setContext (ProfileContext *context)
 
void setDependant (CostItem *d)
 
void setPosition (CostItem *p)
 
QString toString ()
 
ProfileContext::Type type () const
 

Static Public Attributes

static const int InvalidIndex = -1
 
static const int MaxRealIndex = MaxRealIndexValue
 

Protected Member Functions

virtual void update ()
 

Additional Inherited Members

- Protected Attributes inherited from CostItem
ProfileContext * _context
 
CostItem * _dep
 
bool _dirty
 
CostItem * _position
 

Detailed Description

An array of basic cost metrics for a trace item.

The semantic of specific indexes is stored in the EventTypeSet of the TraceData object holding this ProfileCostArray.

Definition at line 144 of file costitem.h.

Constructor & Destructor Documentation

ProfileCostArray::ProfileCostArray ( ProfileContext *  context)

Definition at line 130 of file costitem.cpp.

ProfileCostArray::ProfileCostArray ( )

Definition at line 139 of file costitem.cpp.

ProfileCostArray::~ProfileCostArray ( )
virtual

Definition at line 148 of file costitem.cpp.

Member Function Documentation

void ProfileCostArray::addCost ( EventTypeMapping *  mapping,
const char *  s 
)

Definition at line 252 of file costitem.cpp.

void ProfileCostArray::addCost ( EventTypeMapping *  mapping,
FixString &  s 
)

Definition at line 303 of file costitem.cpp.

void ProfileCostArray::addCost ( ProfileCostArray *  item)

Definition at line 414 of file costitem.cpp.

void ProfileCostArray::addCost ( int  index,
SubCost  value 
)

Definition at line 487 of file costitem.cpp.

void ProfileCostArray::clear ( )
virtual

Set all cost counters to zero.

Reimplemented from CostItem.

Reimplemented in TraceInclusiveCost, and TraceCallCost.

Definition at line 154 of file costitem.cpp.

QString ProfileCostArray::costString ( EventTypeSet *  )
virtual

Returns text of all cost metrics.

Reimplemented from CostItem.

Reimplemented in TracePartFunction, TraceInclusiveCost, and TraceCallCost.

Definition at line 545 of file costitem.cpp.

ProfileCostArray ProfileCostArray::diff ( ProfileCostArray *  item)

Definition at line 526 of file costitem.cpp.

void ProfileCostArray::invalidate ( )
virtual

Invalidate the cost attributes.

An invalidated object needs to be recalculated when a cost attribute is requested (e.g. by subCost()). Has to be overwritten by subclasses when the cost influences costs of other cost items. If only one item depends on the cost of this item, it can by set with setDependant() without a need for overwriting.

Reimplemented from CostItem.

Definition at line 562 of file costitem.cpp.

void ProfileCostArray::maxCost ( EventTypeMapping *  mapping,
FixString &  s 
)

Definition at line 358 of file costitem.cpp.

void ProfileCostArray::maxCost ( ProfileCostArray *  item)

Definition at line 450 of file costitem.cpp.

void ProfileCostArray::maxCost ( int  index,
SubCost  value 
)

Definition at line 506 of file costitem.cpp.

QString ProfileCostArray::prettySubCost ( EventType *  t)

Returns a cost attribute converted to a string (with space after every 3 digits)

Definition at line 601 of file costitem.cpp.

QString ProfileCostArray::prettySubCostPerCall ( EventType *  t,
int  calls 
)

Definition at line 606 of file costitem.cpp.

void ProfileCostArray::reserve ( int  count)

Definition at line 160 of file costitem.cpp.

void ProfileCostArray::set ( EventTypeMapping *  mapping,
const char *  s 
)

Definition at line 175 of file costitem.cpp.

void ProfileCostArray::set ( EventTypeMapping *  mapping,
FixString &  s 
)

Definition at line 214 of file costitem.cpp.

SubCost ProfileCostArray::subCost ( EventType *  t)

Returns a sub cost.

This automatically triggers a call to update() if needed.

Definition at line 591 of file costitem.cpp.

void ProfileCostArray::update ( )
protectedvirtual

Updates cost attributes.

This has to be called by subclasses that access cost attributes directly

Reimplemented from CostItem.

Reimplemented in TraceData, TraceFunction, TraceFunctionSource, TraceLineRegion, TraceCall, TracePartFunction, TracePartCall, TracePartLineRegion, TracePartLine, TracePartLineCall, TracePartInstr, TracePartInstrCall, TraceInclusiveListCost, TraceCallListCost, and TraceListCost.

Definition at line 572 of file costitem.cpp.

Member Data Documentation

const int ProfileCostArray::InvalidIndex = -1
static

Definition at line 151 of file costitem.h.

const int ProfileCostArray::MaxRealIndex = MaxRealIndexValue
static

Definition at line 150 of file costitem.h.


The documentation for this class was generated from the following files:
  • costitem.h
  • costitem.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

Skip menu "kcachegrind"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal