summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.context/systemtap_test_module2.c
diff options
context:
space:
mode:
authorfche <fche>2008-02-13 03:33:18 +0000
committerfche <fche>2008-02-13 03:33:18 +0000
commit4bab8964266929ec9356590db0d0fe51607c4b6b (patch)
tree991aac2cdd5f0508a5857fa72623524017475070 /testsuite/systemtap.context/systemtap_test_module2.c
parent21beacc9a00ea48763048151c370e205c5f23379 (diff)
downloadsystemtap-steved-4bab8964266929ec9356590db0d0fe51607c4b6b.tar.gz
systemtap-steved-4bab8964266929ec9356590db0d0fe51607c4b6b.tar.xz
systemtap-steved-4bab8964266929ec9356590db0d0fe51607c4b6b.zip
2008-02-12 Frank Ch. Eigler <fche@elastic.org>
* systemtap.context/context.exp: Build temporary modules under build tree, to tolerate read-only source trees. * {args,backtrace,pid}.tcl: Corresponding changes. * systemtap_test_module2.c: Add a bunch of asm("")'s to prevent inlining even better than noinline does.
Diffstat (limited to 'testsuite/systemtap.context/systemtap_test_module2.c')
-rw-r--r--testsuite/systemtap.context/systemtap_test_module2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/systemtap.context/systemtap_test_module2.c b/testsuite/systemtap.context/systemtap_test_module2.c
index 51cb58bb..b0d47428 100644
--- a/testsuite/systemtap.context/systemtap_test_module2.c
+++ b/testsuite/systemtap.context/systemtap_test_module2.c
@@ -22,19 +22,23 @@
/* some nested functions to test backtraces */
int noinline yyy_func4 (int foo) {
+ asm ("");
return foo + 1;
}
int noinline yyy_func3 (int foo) {
foo = yyy_func4(foo);
+ asm ("");
return foo + 1;
}
int noinline yyy_func2 (int foo) {
foo = yyy_func3(foo);
+ asm ("");
return foo + 1;
}
int noinline yyy_func1 (int foo) {
foo = yyy_func2(foo);
+ asm ("");
return foo + 1;
}
EXPORT_SYMBOL(yyy_func1);
@@ -42,31 +46,37 @@ EXPORT_SYMBOL(yyy_func1);
/* 1. int argument testing */
int noinline yyy_int(int a, int b, int c)
{
+ asm ("");
return a+b+c;
}
/* 2. uint argument testing */
unsigned noinline yyy_uint(unsigned a, unsigned b, unsigned c)
{
+ asm ("");
return a+b+c;
}
/* 3. long argument testing */
long noinline yyy_long(long a, long b, long c)
{
+ asm ("");
return a+b+c;
}
/* 4. int64_t argument testing */
int noinline yyy_int64(int64_t a, int64_t b, int64_t c)
{
+ asm ("");
return a+b+c;
}
/* 5. char argument testing */
char noinline yyy_char(char a, char b, char c)
{
+ asm ("");
return 'Q';
}
/* 5. string argument testing */
char * noinline yyy_str(char *a, char *b, char *c)
{
+ asm ("");
return "XYZZY";
}