---
name: "TAU_PROFILE"
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_PROFILE"
---

# TAU\_PROFILE(3)

Profile a C++ function

## NAME

TAU\_PROFILE - Profile a C++ function

## SYNOPSIS

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

## DESCRIPTION

**TAU\_PROFILE** profiles a function. 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_PROFILE(foo","int (char *)",TAU_DEFAULT);
  ...
}
```

## SEE ALSO

[TAU\_PROFILE\_TIMER(3)](/TAU_PROFILE_TIMER/3.md)
