On a comlab machine, you should be able to do

sudo yum install google-perftools-devel

Download the RPMs ( google-perftools-0.8-1.i386.rpm and google-perftools-devel-0.8-1.i386.rpm ) from

Install it as root:

rpm -i google-perftools-0.8-1.i386.rpm google-perftools-devel-0.8-1.i386.rpm

Install graphviz rpm as root:

yum install graphviz

Test it:

[chaste@userpc58 ~]$ cat a_prog.c
#include <math.h>
#define N 10000000L
double a[N];
fill(int i){
calc(int i){

int main(int argc, char *argv[])
    int i;
    for (i=0;i<N;i++){
    for (i=0;i<N;i++){

[chaste@userpc58 ~]$ gcc -o a_prog a_prog.c -lm -lprofiler
[chaste@userpc58 ~]$ export
[chaste@userpc58 ~]$ ./a_prog
PROFILE: interrupts/evictions/bytes = 33/6/280
[chaste@userpc58 ~]$ pprof -pdf a_prog > temp.pdf
[chaste@userpc58 ~]$ evince temp.pdf

evince is just a PDF viewer. We could also do gif:

[chaste@userpc58 ~]$ pprof -gif a_prog > temp.gif
[chaste@userpc58 ~]$ display temp.gif
Last modified 10 years ago Last modified on Sep 15, 2010, 11:41:16 AM