CMS 3D CMS Logo

Public Member Functions | Public Attributes | Private Attributes

profilereader::FunctionInfo Class Reference

List of all members.

Public Member Functions

def __init__
def addCallee
def addCaller
def normalize

Public Attributes

 address
 calleeList
 callerList
 countOfFunctPlusChild
 countOfFunctPlusChildWithRecursion
 fractionInFunctionOnly
 fractionInPath
 leafCount
 name

Private Attributes

 __calleeTemp
 __callerTemp

Detailed Description

Holds the profiling information about one function

Definition at line 5 of file profilereader.py.


Constructor & Destructor Documentation

def profilereader::FunctionInfo::__init__ (   self,
  attrList 
)

Definition at line 8 of file profilereader.py.

00009                                :
00010         self.address =attrList[0] 
00011         self.name =os.popen("c++filt  "+attrList[-1]).read().strip()
00012         self.leafCount = int(attrList[1])
00013         self.countOfFunctPlusChildWithRecursion = int(attrList[2])
00014         self.countOfFunctPlusChild = int(attrList[3])
00015         self.fractionInFunctionOnly = float(attrList[4])
00016         self.fractionInPath = float(attrList[5])
00017         self.__callerTemp = dict()
        self.__calleeTemp = dict()

Member Function Documentation

def profilereader::FunctionInfo::addCallee (   self,
  callee,
  weight 
)

Definition at line 21 of file profilereader.py.

00022                                      :
        self.__calleeTemp.setdefault(callee.address,[0,callee])[0]+=weight
def profilereader::FunctionInfo::addCaller (   self,
  caller,
  weight 
)

Definition at line 18 of file profilereader.py.

00019                                      :
00020         #print caller.name, weight
        self.__callerTemp.setdefault(caller.address,[0,caller])[0]+=weight
def profilereader::FunctionInfo::normalize (   self)

Definition at line 23 of file profilereader.py.

00024                        :
00025         self.callerList = list()
00026         self.calleeList = list()
00027         for caller in self.__callerTemp.keys():
00028             (count,_caller) = self.__callerTemp[caller]
00029             self.callerList.append((float(count)/self.countOfFunctPlusChildWithRecursion,_caller))
00030         for callee in self.__calleeTemp.keys():
00031             (count,_callee) = self.__calleeTemp[callee]
00032             self.calleeList.append((float(count)/self.countOfFunctPlusChildWithRecursion,_callee))
00033         self.callerList.sort()
00034         self.callerList.reverse()
00035         self.calleeList.sort()
00036         self.calleeList.reverse()


Member Data Documentation

Definition at line 8 of file profilereader.py.

Definition at line 8 of file profilereader.py.

Definition at line 8 of file profilereader.py.

Definition at line 23 of file profilereader.py.

Definition at line 23 of file profilereader.py.

Definition at line 8 of file profilereader.py.

Definition at line 8 of file profilereader.py.

Definition at line 8 of file profilereader.py.

Definition at line 8 of file profilereader.py.

Definition at line 8 of file profilereader.py.

Definition at line 8 of file profilereader.py.