PEARL
Parallel Event Access and Replay Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Attributes | Related Functions
pearl::Callsite Class Reference

Representation of a callsite definition. More...

#include <pearl/Callsite.h>

List of all members.

Public Types

typedef uint32_t IdType
 Callsite definition identifier type.

Public Member Functions

IdType getId () const
 Get global identifier.
const StringgetFilename () const
 Get filename.
uint32_t getLine () const
 Get line number.
const RegiongetCallee () const
 Get called region.
Constructors & destructor
 Callsite (IdType id, const String &filename, uint32_t line, const Region &callee)
 Constructor.

Static Public Attributes

static const IdType NO_ID = (~static_cast<IdType>(0))
 Numerical identifier used for undefined callsite definitions.
static const Callsite UNDEFINED

Related Functions

(Note that these are not member functions.)

bool operator== (const Callsite &lhs, const Callsite &rhs)
 Equality operator.
bool operator!= (const Callsite &lhs, const Callsite &rhs)
 Inequality operator.
Stream I/O functions
std::ostream & operator<< (std::ostream &stream, const Callsite &item)
 Stream output operator.

Detailed Description

Instances of the Callsite class provide information about source-code locations where the control flow moves from one region to another. This allows to distinguish between multiple entries of a region within the same enclosing source-code region. Callsites are therefore characterized by a file and a line number where the entry happens, as well as a reference to the region being entered. The numerical identifiers of the individual callsites are globally defined and continuously enumerated, i.e., the ID is element of [0,#callsites-1].

Todo:
Add "caller" attribute

Member Typedef Documentation

typedef uint32_t pearl::Callsite::IdType

Constructor & Destructor Documentation

pearl::Callsite::Callsite ( IdType  id,
const String filename,
uint32_t  line,
const Region callee 
)

Creates a new callsite definition instance and initializes it with the given values.

Parameters:
idGlobal callsite identifier
filenameName of the file in which the callsite is located
lineLine number where the call happens
calleeRegion being entered

Member Function Documentation

Returns the region definition object related to the source-code region being entered from the callsite.

Returns:
Called region

Returns the string definition storing the name of the file in which the callsite is located. If this information is not available, String::UNDEFINED is returned.

Returns:
Filename

Returns the global identifier of the callsite definition.

Returns:
Global identifier
uint32_t pearl::Callsite::getLine ( ) const

Returns the line number of the callsite in the associated source file. If this information is not available, zero is returned.

Returns:
Line number

Friends And Related Function Documentation

bool operator!= ( const Callsite lhs,
const Callsite rhs 
) [related]

Compares two callsite definition objects lhs and rhs for inequality. Two callsite definitions are considered unequal if any of their attributes differ.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the callsite definitions differ, false otherwise.
std::ostream & operator<< ( std::ostream &  stream,
const Callsite item 
) [related]

Prints the contents of the given callsite definition object item to an output stream in a human-readable form.

Parameters:
streamOutput stream
itemCallsite definition object
Returns:
Output stream
bool operator== ( const Callsite lhs,
const Callsite rhs 
) [related]

Compares two callsite definition objects lhs and rhs for equality. Two callsite definitions are considered equal if all of their attributes are identical.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the callsite definitions are equal, false otherwise.

Member Data Documentation

const IdType pearl::Callsite::NO_ID = (~static_cast<IdType>(0)) [static]

Static instance of class Callsite representing undefined callsite entries in other definitions.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Scalasca    Copyright © 1998–2014 Forschungszentrum Jülich GmbH, Jülich Supercomputing Centre
Copyright © 2009–2014 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming