![]() |
PEARL
Parallel Event Access and Replay Library
|
Representation of a callsite definition. More...
#include <pearl/Callsite.h>
Public Types | |
typedef uint32_t | IdType |
Callsite definition identifier type. More... | |
Public Member Functions | |
Constructors & destructor | |
Callsite (IdType id, const String &filename, uint32_t line, const Region &callee) | |
Constructor. More... | |
Access definition data | |
IdType | getId () const |
Get global identifier. More... | |
const String & | getFilename () const |
Get filename. More... | |
uint32_t | getLine () const |
Get line number. More... | |
const Region & | getCallee () const |
Get called region. More... | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast<IdType>(0)) |
Numerical identifier used for undefined callsite definitions. More... | |
static const Callsite | UNDEFINED |
Static instance of class Callsite representing undefined callsite entries in other definitions. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Stream I/O functions | |
std::ostream & | operator<< (std::ostream &stream, const Callsite &item) |
Stream output operator. More... | |
Comparison operators | |
bool | operator== (const Callsite &lhs, const Callsite &rhs) |
Equality operator. More... | |
bool | operator!= (const Callsite &lhs, const Callsite &rhs) |
Inequality operator. More... | |
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].
typedef uint32_t pearl::Callsite::IdType |
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.
id | Global callsite identifier |
filename | Name of the file in which the callsite is located |
line | Line number where the call happens |
callee | Region being entered |
const Region& pearl::Callsite::getCallee | ( | ) | const |
Returns the region definition object related to the source-code region being entered from the callsite.
const String& pearl::Callsite::getFilename | ( | ) | const |
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.
IdType pearl::Callsite::getId | ( | ) | const |
Returns the global identifier of the callsite definition.
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.
Compares two callsite definition objects lhs and rhs for inequality. Two callsite definitions are considered unequal if any of their attributes differ.
lhs | Left-hand operand |
rhs | Right-hand operand |
|
related |
Prints the contents of the given callsite definition object item to an output stream in a human-readable form.
stream | Output stream |
item | Callsite definition object |
Compares two callsite definition objects lhs and rhs for equality. Two callsite definitions are considered equal if all of their attributes are identical.
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 |