Poster of Linux kernelThe best gift for a Linux geek
TAU_REGISTER_THREAD

TAU_REGISTER_THREAD

Section: TAU Instrumentation API (3) Updated: 08/31/2005
Local index Up
 

NAME

TAU_REGISTER_THREAD - Register a thread with the profiling system  

SYNOPSIS

C/C++:

TAU_REGISTER_THREAD(void);

Fortran:

TAU_REGISTER_THREAD(void);
 

DESCRIPTION

To register a thread with the profiling system, invoke the TAU_REGISTER_THREAD macro in the run method of the thread prior to executing any other TAU macro. This sets up thread identifiers that are later used by the instrumentation system.  

EXAMPLE

C/C++ :

void * threaded_func(void *data) {
  TAU_REGISTER_THREAD();
  { /**** NOTE WE START ANOTHER BLOCK IN THREAD */
    TAU_PROFILE_TIMER(tautimer, "threaded_func()", "int ()", 
                      TAU_DEFAULT);
    TAU_PROFILE_START(tautimer);
    work(); /* work done by this thread */
    TAU_PROFILE_STOP(tautimer);
  }
  return NULL;
}
    

Fortran :

call TAU_REGISTER_THREAD()
    
 

CAVEAT

PDT based tau_instrumentor does not insert TAU_REGISTER_THREAD calls, they must be inserted manually


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
CAVEAT

This document was created by man2html, using the manual pages.
Time: 21:56:49 GMT, April 16, 2011