diff --git a/lab2/test_gprof.c b/lab2/test_gprof.c new file mode 100644 index 0000000..37419cc --- /dev/null +++ b/lab2/test_gprof.c @@ -0,0 +1,33 @@ +#include + + +void func1(void) +{ + printf("\n Inside func1 \n"); + int i = 0; + + for(;i<0xffffffff;i++); + + return; +} + + void func2(void) +{ + printf("\n Inside func2 \n"); + int i = 0; + + for(;i<0xffffffaa;i++); + return; +} + +int main(void) +{ + printf("\n Inside main()\n"); + int i = 0; + + for(;i<0xffffff;i++); + func1(); + func2(); + + return 0; +}