blob: cd57f8127ced8eab15413888c937cb0a86557b86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <getopt.h>
extern "C" {
static __attribute__ ((noinline)) int mytest10(void)
{
int i = 10;
return i * i;
}
static __attribute__ ((noinline)) void mytest9(void)
{
mytest10();
}
static __attribute__ ((noinline)) void mytest8(void)
{
mytest9();
}
static __attribute__ ((noinline)) void mytest7(void)
{
mytest8();
}
static __attribute__ ((noinline)) void mytest6(void)
{
mytest7();
}
static __attribute__ ((noinline)) void mytest5(void)
{
mytest6();
}
static __attribute__ ((noinline)) void mytest4(void)
{
mytest5();
}
static __attribute__ ((noinline)) void mytest3(void)
{
mytest4();
}
static __attribute__ ((noinline)) void mytest2(void)
{
mytest3();
}
static __attribute__ ((noinline)) void mytest1(void)
{
mytest2();
}
static __attribute__ ((noinline)) void mytest(void)
{
mytest1();
}
}
int main(int argc, char *argv[])
{
while (1) {
mytest();
//printf("xby-debug in main\n");
}
return 0;
}
|