CCTLib
Calling-context and data-object attribution library for Intel Pin
test.c
Go to the documentation of this file.
1 /* This test is the simplest one */
2 
3 #include <stdio.h>
4 #include <sys/time.h>
5 
6 #define MAX 5010
7 
8 
9 void shashawen(int index)
10 {
11  int a,b,c,d,e,f;
12  int i,j;
13  int array[2];
14 
15  for(i = 0;i < 2; ++i){
16  a = b + c;
17  d = b;
18  e = c;
19  f = e + d;
20  array[i] = index;
21  }
22 }
23 
24 void main()
25 {
26  int test[MAX];
27  int i;
28  struct timeval start,end;
29  gettimeofday(&start,NULL);
30 
31  for(i = 0; i < MAX; ++i)
32  shashawen(test[i]);
33  gettimeofday(&end,NULL);
34  printf("%lf s used\n",(end.tv_sec-start.tv_sec)*1000+(double)(end.tv_usec-start.tv_usec)/1000);
35 }
void f()
Definition: test1.c:23
void array()
Definition: testArray.c:7
int a[1000]
Definition: testArray.c:5
void shashawen(int index)
Definition: test.c:9
#define MAX
Definition: test.c:6
void main()
Definition: test.c:24