---
name: "TAU_PHASE"
section: "3"
platform: "linux"
package: "tau"
version: "2.17.3.1.dfsg-4.2"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/TAU_PHASE"
---

# TAU\_PHASE(3)

Profile a C++ function as a phase

## NAME

TAU\_PHASE - Profile a C++ function as a phase

## SYNOPSIS

**TAU\_PHASE(char\* or string&** *function\_name***, char\* or string&** *type***, TauGroup\_t** *group***);**

## DESCRIPTION

**TAU\_PHASE** profiles a function as a phase. This macro defines the function and takes care of the timer start and stop as well. The timer will stop when the macro goes out of scope (as in C++ destruction).

## EXAMPLE

```
int foo(char *str) {
  TAU_PHASE(foo","int (char *)",TAU_DEFAULT);
  ...
}
```

## SEE ALSO

[TAU\_PHASE\_CREATE\_DYNAMIC(3)](/TAU_PHASE_CREATE_DYNAMIC/3.md), [TAU\_PHASE\_CREATE\_STATIC(3)](/TAU_PHASE_CREATE_STATIC/3.md)
