![]() |
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. | |
Public Member Functions | |
IdType | getId () const |
Get global identifier. | |
const String & | getFilename () const |
Get filename. | |
uint32_t | getLine () const |
Get line number. | |
const Region & | getCallee () 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. |
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 |
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.
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 |
const IdType pearl::Callsite::NO_ID = (~static_cast<IdType>(0)) [static] |
const Callsite pearl::Callsite::UNDEFINED [static] |
Static instance of class Callsite representing undefined callsite entries in other definitions.
![]() |
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 |