projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add declarations for functions in gen-syscall-events-callstack.c
[lttng-tools.git]
/
tests
/
utils
/
testapp
/
gen-syscall-events-callstack
/
gen-syscall-events-callstack.c
diff --git
a/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c
b/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c
index 48210fab07008553775f08522d0d4b9d7f996162..5ad362f3b374caccb5b765117fedd3ff6bb1b132 100644
(file)
--- a/
tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c
+++ b/
tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c
@@
-34,9
+34,16
@@
* events generated by our test process only.
*/
* events generated by our test process only.
*/
+#if defined(__clang__)
+#define nooptimization __attribute__((noinline)) __attribute__((optnone))
+#else
+#define nooptimization __attribute__((noinline)) __attribute__((optimize(0)))
+#endif
+
volatile int val = 0;
volatile int val = 0;
-long __attribute__ ((noinline))
+long nooptimization my_gettid(void);
+long nooptimization
my_gettid(void)
{
long ret;
my_gettid(void)
{
long ret;
@@
-62,20
+69,23
@@
my_gettid(void)
return ret;
}
return ret;
}
-int __attribute__ ((noinline))
+int nooptimization fct_c(void);
+int nooptimization
fct_c(void)
{
return my_gettid();
}
fct_c(void)
{
return my_gettid();
}
-int __attribute__ ((noinline))
+int nooptimization fct_b(void);
+int nooptimization
fct_b(void)
{
val += fct_c();
return val;
}
fct_b(void)
{
val += fct_c();
return val;
}
-int __attribute__ ((noinline))
+int nooptimization fct_a(void);
+int nooptimization
fct_a(void)
{
val += fct_b();
fct_a(void)
{
val += fct_b();
This page took
0.025229 seconds
and
5
git commands to generate.