Last active
March 4, 2019 02:49
-
-
Save a2gs/1d97b38f7ceb4c731414eb7bc23b2838 to your computer and use it in GitHub Desktop.
gprof(1) Usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <limits.h> | |
#include <unistd.h> | |
void f1(void) | |
{ | |
sleep(2); | |
} | |
unsigned int f2(unsigned int x) | |
{ | |
return(x + 1); | |
} | |
void f3(void) | |
{ | |
unsigned int x = 0; | |
for(x = 0; x < UINT_MAX; x++) | |
f2(x); | |
} | |
int main(int argc, char *argv[]) | |
{ | |
printf("f1\n"); | |
f1(); | |
printf("f3\n"); | |
f3(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(file gmon.out created)