ForwardReplayTask Class Reference
[PEARL.replay]

Base class for forward trace-replay tasks. More...

#include <ReplayTask.h>

Inheritance diagram for ForwardReplayTask:

ReplayTask Task

List of all members.

Protected Member Functions

Constructors & destructor
 ForwardReplayTask (const GlobalDefs &defs, LocalTrace &trace, CallbackData *cbdata=0, CallbackManager *cbmanager=0)
Replay control
virtual bool replay ()


Detailed Description

ForwardReplayTask will perform a forward replay using PEARL_forward_replay() when executed. To use this class, derive a class from ForwardReplayTask and add some callback methods.

Example:

 class MyReplay : public ForwardReplayTask {
   public:
     MyReplay(const GlobalDefs& defs, LocalTrace& trace) 
       : ForwardReplayTask(defs, trace) 
     {
       register_callback(MPI_SEND, &MyReplay::cb_send);
     }

   private:
     void cb_send(const CallbackManager& cbmanager, int user_event,
                  const Event& event, CallbackData* cdata)
     {
       // ...
     }
 };

See also:
BackwardReplayTask

Constructor & Destructor Documentation

ForwardReplayTask ( const GlobalDefs defs,
LocalTrace trace,
CallbackData cbdata = 0,
CallbackManager cbmanager = 0 
) [protected]

Constructor. Initializes internal data.

The constructor creates a default callback manager of type pearl::CallbackManager. You can specify a different callback manager by passing a non-null pointer to a callback manager object via the cbmanager argument. Note that ForwardReplayTask takes ownership of the callback manager object, i.e., it will be freed automatically in the ForwardReplayTask destructor.

Parameters:
defs Reference to global definition object
trace Reference to the trace object the replay will be performed on
cbdata Pointer to callback data object to be passed to the callback functions (default 0)
cbmanager Pointer to callback manager object (default 0)


Member Function Documentation

bool replay (  )  [protected, virtual]

Executes a forward replay, i.e., iterates over the events of the associated trace from the beginning to the end and executes the corresponding callbacks registered with the callback manager.

Returns:
Always true

Implements ReplayTask.


SCALASCA    Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre