NAME

PAPI_save - Save the current state of the PAPI library
PAPI_restore - Restore the saved state of the PAPI library

CONTENTS

Synopsis
Description
Return Values
Errors
Examples
Author
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

int PAPI_save( void ); 

int PAPI_restore( void ); 

DESCRIPTION

PAPI_save() "freezes" the current state of the PAPI_library. Among tasks done is to register the current values of any running virtual counters to be able to restore these at the time of a subsequent PAPI_restore.

PAPI_restore() restores the current state of the PAPI_library to a state that has previously been saved using PAPI_save.

RETURN VALUES

On success, this function returns PAPI_OK.
On error, a non-zero error code is returned.

ERRORS

PAPI_ESBSTR
  The substrate does not provide the save/restore functionality.
PAPI_EINVAL
  A PAPI_restore was attempted, but there is no saved state to restore.

EXAMPLES


int retval;

retval = PAPI_save(); THIRD_PARTY_TOOL_update_gui_counters(); retval = PAPI_restore();

AUTHOR

Philip J. Mucci <mucci@cs.utk.edu>

BUGS

These functions are not yet implemented.
NOTE: As currently defined, these functions are not necessarily nestable or thread safe. To become so, PAPI_save should return a void pointer to a platform specific structure that can be used by PAPI_restore to restore data on a per thread or per EventSet basis.

SEE ALSO

The PAPI Web Site: http://icl.cs.utk.edu/projects/papi


PAPI Function Reference PAPI_save (3) December, 2001

  Innovative Computing Laboratory
2001 R&D Winner  
Contact PAPI: papi@cs.utk.edu Computer Science Department
  University of Tennessee