![]() |
PEARL
Parallel Event Access and Replay Library
|
Representation of a callpath definition. More...
#include <pearl/Callpath.h>
Public Types | |
typedef uint32_t | IdType |
Callpath definition identifier type. More... | |
Public Member Functions | |
Constructors & destructor | |
Callpath (IdType id, const Region ®ion, const Callsite &callsite, Callpath *parent) | |
Constructor. More... | |
Access definition data | |
IdType | getId () const |
Get global identifier. More... | |
const Region & | getRegion () const |
Get associated region. More... | |
const Callsite & | getCallsite () const |
Get associated callsite. More... | |
Callpath * | getParent () const |
Get parent callpath. More... | |
uint32_t | numChildren () const |
Get number of child callpaths. More... | |
const Callpath & | getChild (uint32_t index) const |
Get child callpath. More... | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast<IdType>(0)) |
Numerical identifier used for undefined callpath definitions. More... | |
static const Callpath | UNDEFINED |
Static instance of class Callpath representing undefined callpath entries in other definitions. More... | |
Friends | |
class | detail::CallTree |
Related Functions | |
(Note that these are not member functions.) | |
Stream I/O functions | |
std::ostream & | operator<< (std::ostream &stream, const Callpath &item) |
Stream output operator. More... | |
Comparison operators | |
bool | operator== (const Callpath &lhs, const Callpath &rhs) |
Equality operator. More... | |
bool | operator!= (const Callpath &lhs, const Callpath &rhs) |
Inequality operator. More... | |
Instances of the Callpath class provide information about individual callpaths of the application execution. Callpaths are characterized by the associated source-code region, the parent callpath, and optionally a callsite. The numerical identifiers of the individual callpaths are globally defined and continuously enumerated, i.e., the ID is element of [0,#callpaths-1].
typedef uint32_t pearl::Callpath::IdType |
pearl::Callpath::Callpath | ( | IdType | id, |
const Region & | region, | ||
const Callsite & | callsite, | ||
Callpath * | parent | ||
) |
Creates a new callpath definition instance and initializes it with the given values.
id | Global callpath identifier |
region | Associated source-code region |
callsite | Associated callsite (if applicable, Callsite::UNDEFINED otherwise) |
parent | Parent callpath (NULL for root nodes) |
const Callsite& pearl::Callpath::getCallsite | ( | ) | const |
Returns the callsite definition object related to the callsite triggering the execution of the associated region. If this information is not available, Callsite::UNDEFINED is returned.
const Callpath& pearl::Callpath::getChild | ( | uint32_t | index | ) | const |
Returns the child callpath definition stored at the given index in the range of [0,#children-1].
index | Child index |
IdType pearl::Callpath::getId | ( | ) | const |
Returns the global identifier of the callpath definition.
Callpath* pearl::Callpath::getParent | ( | ) | const |
Returns a pointer to the parent callpath if applicable and NULL otherwise (i.e., for call tree root nodes).
const Region& pearl::Callpath::getRegion | ( | ) | const |
Returns the region definition object related to the source-code region executed in this callpath.
uint32_t pearl::Callpath::numChildren | ( | ) | const |
Returns the number of callpaths which were called from the current callpath during the application's execution.
|
friend |
Compares two callpath definition objects lhs and rhs for inequality. Two callpath definitions are considered unequal if either their IDs, their associated regions, callsites, or their parents differ. Child callpaths are not compared, i.e., this operator performs a "shallow" comparison.
lhs | Left-hand operand |
rhs | Right-hand operand |
|
related |
Prints the contents of the given callpath definition object item to an output stream in a human-readable form.
stream | Output stream |
item | Callpath definition object |
Compares two callpath definition objects lhs and rhs for equality. Two callpath definitions are considered equal if their identifiers, associated regions and callsites, as well as their parents are identical. The child callpaths are not compared, i.e., this operator performs a "shallow" comparison.
lhs | Left-hand operand |
rhs | Right-hand operand |
|
static |
![]() |
Copyright © 1998–2019 Forschungszentrum Jülich GmbH,
Jülich Supercomputing Centre
Copyright © 2009–2015 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming |