socsvn commit: r224064 - in soc2011/shm: TESLA/assertions/audit
TESLA/assertions/mwc TESLA/examples TESLA/examples/example2
TESLA/instrumenter-tests TESLA/instrumenter-tests/tests
TESLA/kernel TESL...
shm at FreeBSD.org
shm at FreeBSD.org
Sat Jul 9 01:20:21 UTC 2011
Author: shm
Date: Sat Jul 9 01:20:18 2011
New Revision: 224064
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=224064
Log:
* merge: the great merge 1/3
Added:
soc2011/shm/TESLA/examples/
soc2011/shm/TESLA/examples/example2/
soc2011/shm/TESLA/examples/example2/Makefile
soc2011/shm/TESLA/examples/example2/example2.c
soc2011/shm/TESLA/examples/example2/example2.spec
soc2011/shm/TESLA/examples/example2/example2.spl
soc2011/shm/TESLA/examples/example2/example2_assert.c
soc2011/shm/TESLA/examples/example2/example2_test.h
soc2011/shm/TESLA/instrumenter-tests/
soc2011/shm/TESLA/instrumenter-tests/run-tests.sh (contents, props changed)
soc2011/shm/TESLA/instrumenter-tests/tests/
soc2011/shm/TESLA/instrumenter-tests/tests/dec.c
soc2011/shm/TESLA/instrumenter-tests/tests/dec.ins
soc2011/shm/TESLA/instrumenter-tests/tests/dec.out
soc2011/shm/TESLA/instrumenter-tests/tests/double.c
soc2011/shm/TESLA/instrumenter-tests/tests/double.ins
soc2011/shm/TESLA/instrumenter-tests/tests/double.out
soc2011/shm/TESLA/instrumenter-tests/tests/empty.c
soc2011/shm/TESLA/instrumenter-tests/tests/empty.ins
soc2011/shm/TESLA/instrumenter-tests/tests/empty.out
soc2011/shm/TESLA/instrumenter-tests/tests/empty2.c
soc2011/shm/TESLA/instrumenter-tests/tests/empty2.ins
soc2011/shm/TESLA/instrumenter-tests/tests/empty2.out
soc2011/shm/TESLA/instrumenter-tests/tests/field.c
soc2011/shm/TESLA/instrumenter-tests/tests/field.ins
soc2011/shm/TESLA/instrumenter-tests/tests/field.out
soc2011/shm/TESLA/instrumenter-tests/tests/field2.c
soc2011/shm/TESLA/instrumenter-tests/tests/field2.ins
soc2011/shm/TESLA/instrumenter-tests/tests/field2.out
soc2011/shm/TESLA/instrumenter-tests/tests/field3.c
soc2011/shm/TESLA/instrumenter-tests/tests/field3.ins
soc2011/shm/TESLA/instrumenter-tests/tests/for.c
soc2011/shm/TESLA/instrumenter-tests/tests/for.ins
soc2011/shm/TESLA/instrumenter-tests/tests/for.out
soc2011/shm/TESLA/instrumenter-tests/tests/for2.c
soc2011/shm/TESLA/instrumenter-tests/tests/for2.ins
soc2011/shm/TESLA/instrumenter-tests/tests/for2.out
soc2011/shm/TESLA/instrumenter-tests/tests/func.c
soc2011/shm/TESLA/instrumenter-tests/tests/func.ins
soc2011/shm/TESLA/instrumenter-tests/tests/func.out
soc2011/shm/TESLA/instrumenter-tests/tests/if.c
soc2011/shm/TESLA/instrumenter-tests/tests/if.ins
soc2011/shm/TESLA/instrumenter-tests/tests/if.out
soc2011/shm/TESLA/instrumenter-tests/tests/if2.c
soc2011/shm/TESLA/instrumenter-tests/tests/if2.ins
soc2011/shm/TESLA/instrumenter-tests/tests/if2.out
soc2011/shm/TESLA/instrumenter-tests/tests/inc.c
soc2011/shm/TESLA/instrumenter-tests/tests/inc.ins
soc2011/shm/TESLA/instrumenter-tests/tests/inc.out
soc2011/shm/TESLA/instrumenter-tests/tests/none.c
soc2011/shm/TESLA/instrumenter-tests/tests/none.ins
soc2011/shm/TESLA/instrumenter-tests/tests/none.out
soc2011/shm/TESLA/instrumenter-tests/tests/not-exist.out
soc2011/shm/TESLA/instrumenter-tests/tests/switch.c
soc2011/shm/TESLA/instrumenter-tests/tests/switch.ins
soc2011/shm/TESLA/instrumenter-tests/tests/switch.out
soc2011/shm/TESLA/instrumenter-tests/tests/switch2.c
soc2011/shm/TESLA/instrumenter-tests/tests/while.c
soc2011/shm/TESLA/instrumenter-tests/tests/while.ins
soc2011/shm/TESLA/instrumenter-tests/tests/while.out
soc2011/shm/TESLA/instrumenter-tests/tests/while2.c
soc2011/shm/TESLA/instrumenter-tests/tests/while2.ins
soc2011/shm/TESLA/instrumenter-tests/tests/while2.out
soc2011/shm/TESLA/instrumenter-tests/tests/while3.c
soc2011/shm/TESLA/instrumenter-tests/tests/while3.ins
soc2011/shm/TESLA/instrumenter-tests/tests/while3.out
soc2011/shm/TESLA/instrumenter-tests/tests/while4.c
soc2011/shm/TESLA/instrumenter-tests/tests/while4.ins
soc2011/shm/TESLA/instrumenter-tests/tests/while4.out
soc2011/shm/TESLA/kernel/tesla-clang-print-ast (contents, props changed)
soc2011/shm/mac_test/
soc2011/shm/reports/
soc2011/shm/reports/mid-report/
Deleted:
soc2011/shm/TESLA/libtesla/TODO
soc2011/shm/tesla-tests/
Modified:
soc2011/shm/TESLA/assertions/audit/syscalls.c
soc2011/shm/TESLA/assertions/mwc/syscalls.c
soc2011/shm/TESLA/assertions/mwc/syscalls.h
soc2011/shm/TESLA/strawman/Makefile
soc2011/shm/clang/examples/TeslaInstrumenter/Instrumentation.cpp
soc2011/shm/clang/examples/TeslaInstrumenter/Instrumentation.h
soc2011/shm/clang/examples/TeslaInstrumenter/TeslaInstrumenter.cpp
Modified: soc2011/shm/TESLA/assertions/audit/syscalls.c
==============================================================================
--- soc2011/shm/TESLA/assertions/audit/syscalls.c Fri Jul 8 23:43:05 2011 (r224063)
+++ soc2011/shm/TESLA/assertions/audit/syscalls.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -14,8 +14,9 @@
void
helper_which_asserts()
{
- TESLA_ASSERT(syscall) {
- eventually(audit_submit());
+ TESLA_ASSERT(syscall) {
+ 1 == 1;
+// eventually(audit_submit());
}
}
Modified: soc2011/shm/TESLA/assertions/mwc/syscalls.c
==============================================================================
--- soc2011/shm/TESLA/assertions/mwc/syscalls.c Fri Jul 8 23:43:05 2011 (r224063)
+++ soc2011/shm/TESLA/assertions/mwc/syscalls.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -36,10 +36,13 @@
return (0);
}
-void
+//void
+int
syscallret(struct thread *td, int error, struct syscall_args *sa)
{
-
+ int i;
+ i++;
+ return (0);
}
void
Modified: soc2011/shm/TESLA/assertions/mwc/syscalls.h
==============================================================================
--- soc2011/shm/TESLA/assertions/mwc/syscalls.h Fri Jul 8 23:43:05 2011 (r224063)
+++ soc2011/shm/TESLA/assertions/mwc/syscalls.h Sat Jul 9 01:20:18 2011 (r224064)
@@ -21,6 +21,6 @@
struct thread;
struct syscall_args;
int syscallenter(struct thread *td, struct syscall_args *sa);
-void syscallret(struct thread *td, int error, struct syscall_args *sa);
+int syscallret(struct thread *td, int error, struct syscall_args *sa);
#endif /* SYSCALLS_H */
Added: soc2011/shm/TESLA/examples/example2/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/examples/example2/Makefile Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,30 @@
+SPLC ?= ../../cfa/splc
+TESLA_CLANG ?= ../../kernel/tesla-clang
+OPTLEVEL ?= -O0
+CC = $(TESLA_CLANG)
+
+CFLAGS=-Wall -g -I../.. -I. $(OPTLEVEL)
+
+TESLALIBS= \
+ ../../libtesla/tesla_state.o \
+ ../../libtesla/tesla_state_global.o \
+ ../../libtesla/tesla_state_perthread.o \
+ ../../libtesla/tesla_util.o
+
+.PHONY: all clean
+all: example2
+
+example2_automata.c example2_defs.h: example2.spl
+ $(SPLC) -t tesla -s example2 example2.spl
+
+example2_assert.o: example2_assert.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+example2_automata.o: example2_automata.c example2_defs.h
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+example2: example2_automata.o example2_assert.o example2.o ${TESLALIBS}
+ $(CC) -o $@ $^
+
+clean:
+ rm -f example2 *.o
Added: soc2011/shm/TESLA/examples/example2/example2.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/examples/example2/example2.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2011, Mateusz Kocielski <shm at FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <tesla/tesla.h>
+#include <tesla/tesla_state.h>
+#include "example2_test.h"
+
+void example2_init(int);
+
+int
+process(char **x, struct test *t)
+{
+ int i;
+
+ for (i = 0; x[i]; i++)
+ t->state = atoi(x[i]);
+
+ return i;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct test t;
+
+ if (argc < 2)
+ {
+ fprintf(stderr, "This is an example program using TEAL\n");
+ fprintf(stderr, "usage: %s [state] ...\n", argv[0]);
+ fprintf(stderr, "\n");
+ fprintf(stderr, "example usage:\n");
+ fprintf(stderr, "\t%s 1 4 6\n", argv[0]);
+ fprintf(stderr, "\t%s 1 6 2\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ example2_init(TESLA_SCOPE_GLOBAL);
+
+ printf("Processed %d states\n", process(&argv[1], &t));
+
+ return EXIT_SUCCESS;
+}
Added: soc2011/shm/TESLA/examples/example2/example2.spec
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/examples/example2/example2.spec Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,state
Added: soc2011/shm/TESLA/examples/example2/example2.spl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/examples/example2/example2.spl Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,19 @@
+automaton simple_protocol() {
+ void main(struct test *t) {
+ t->state = P1;
+ multiple {
+ either {
+ t->state = P2;
+ } or {
+ t->state = P3;
+ }
+ }
+ either {
+ t->state = P4;
+ } or {
+ t->state = P5;
+ }
+ t->state = P6;
+ exit;
+ }
+}
Added: soc2011/shm/TESLA/examples/example2/example2_assert.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/examples/example2/example2_assert.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2011, Mateusz Kocielski <shm at FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <tesla/tesla_state.h>
+#include <tesla/tesla_util.h>
+#include "example2_defs.h"
+#include "example2_test.h"
+
+static struct tesla_state *example_state;
+
+#define EXAMPLE_LIMIT 23
+#define EXAMPLE_NAME "TEAL automata example"
+#define EXAMPLE_DESC "this is just a simple example"
+
+void
+example2_init(int scope)
+{
+ assert(tesla_state_new(&example_state, scope, EXAMPLE_LIMIT, EXAMPLE_NAME,
+ EXAMPLE_DESC) == 0);
+}
+
+void
+__tesla_event_field_assign_struct_test_state(struct test *t, u_int state)
+{
+ struct tesla_instance *tip;
+ int alloc;
+ int event;
+ printf("-> %d\n", state);
+ assert(tesla_instance_get1(example_state, (register_t)t, &tip, &alloc) ==
+ 0);
+
+ if (alloc == 1)
+ example2_automata_init(tip);
+
+ switch(state)
+ {
+ case P1:
+ event = EXAMPLE2_EVENT_T_STATE_ASSIGN_P1;
+ break;
+ case P2:
+ event = EXAMPLE2_EVENT_T_STATE_ASSIGN_P2;
+ break;
+ case P3:
+ event = EXAMPLE2_EVENT_T_STATE_ASSIGN_P3;
+ break;
+ case P4:
+ event = EXAMPLE2_EVENT_T_STATE_ASSIGN_P4;
+ break;
+ case P5:
+ event = EXAMPLE2_EVENT_T_STATE_ASSIGN_P5;
+ break;
+ case P6:
+ event = EXAMPLE2_EVENT_T_STATE_ASSIGN_P6;
+ break;
+ default:
+ printf("UNKNOWN STATE\n");
+ tesla_assert_fail(example_state, tip);
+ }
+
+ if(example2_automata_prod(tip, event))
+ tesla_assert_fail(example_state, tip);
+
+ tesla_instance_put(example_state, tip);
+}
Added: soc2011/shm/TESLA/examples/example2/example2_test.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/examples/example2/example2_test.h Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2011, Mateusz Kocielski <shm at FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#define P1 (1)
+#define P2 (2)
+#define P3 (3)
+#define P4 (4)
+#define P5 (5)
+#define P6 (6)
+#define P7 (7)
+
+struct test {
+ int state;
+};
Added: soc2011/shm/TESLA/instrumenter-tests/run-tests.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/run-tests.sh Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,97 @@
+#! /bin/sh
+# $Id$
+
+# Copyright (c) 2011, Mateusz Kocielski <shm at FreeBSD.org>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+TEST_DIR="tests/"
+TEST_OUT="_test.out"
+TEST_OUT_ERR="_test_err.out"
+
+compile_test()
+{
+ TESLA_ARGS="-cc1 -load TeslaInstrumenter.so -add-plugin tesla
+ -plugin-arg-tesla ${TEST_DIR}/${1} -ast-print"
+ ARGS="$TESLA_ARGS ${TEST_DIR}/${2}"
+ LD_LIBRARY_PATH=$(dirname $0)/../build/lib
+ export LD_LIBRARY_PATH
+ $(dirname $0)/../build/bin/clang $ARGS
+}
+
+success_test()
+{
+ echo "OK"
+}
+
+fail_test()
+{
+ echo "FAIL"
+}
+
+run_test()
+{
+ echo -n "TEST `basename ${1} .c`: "
+ # compile
+ compile_test ${2} ${1} > ${TEST_OUT} 2> ${TEST_OUT_ERR}
+ if [ "$?" -ne "${4}" ]; then
+ fail_test
+ return;
+ fi;
+
+ if [ ${4} -eq 1 ]; then
+ # special case - we expected compiler to fail
+ success_test
+ return;
+ fi;
+
+ cp $TEST_OUT ${TEST_DIR}/${3}
+
+ diff ${TEST_DIR}/${3} ${TEST_OUT} > /dev/null
+
+ if [ "$?" -eq "${4}" ]; then
+ success_test
+ else
+ fail_test
+ fi;
+}
+
+clean_up()
+{
+ rm ${TEST_OUT} ${TEST_OUT_ERR} ${TEST_DIR}/*.h
+}
+
+run_test none.c none.ins none.out 0
+run_test not-exist.c not-exist.ins not-exist.out 1
+run_test empty.c empty.ins empty.out 0
+run_test empty2.c empty2.ins empty2.out 0
+run_test func.c func.ins func.out 0
+run_test while.c while.ins while.out 0
+run_test while2.c while2.ins while2.out 0
+run_test while3.c while3.ins while3.out 0
+run_test while4.c while4.ins while4.out 0
+run_test for.c for.ins for.out 0
+run_test for2.c for2.ins for2.out 0
+run_test inc.c inc.ins inc.out 0
+run_test dec.c dec.ins dec.out 0
+run_test switch.c switch.ins switch.out 0
+run_test if.c if.ins if.out 0
+run_test if2.c if2.ins if2.out 0
+run_test field.c field.ins field.out 0
+run_test field2.c field2.ins field2.out 0
+run_test field3.c field3.ins field3.out 0
+run_test double.c double.ins double.out 0
+
+clean_up
+
+exit 0
Added: soc2011/shm/TESLA/instrumenter-tests/tests/dec.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/dec.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,10 @@
+struct test { int x; };
+
+int
+test(int a)
+{
+ struct test *c;
+ c->x = 1;
+ c->x++;
+ return c->x;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/dec.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/dec.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,x
Added: soc2011/shm/TESLA/instrumenter-tests/tests/dec.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/dec.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,21 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+struct test {
+ int x;
+};
+int test(int a) {
+ struct test *c;
+ int __tesla_tmp_assign;
+ __tesla_tmp_assign = 1;
+ __tesla_event_field_assign_struct_test_x(c);
+ c->x = __tesla_tmp_assign;
+ c->x++;
+ return c->x;
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/double.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/double.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,9 @@
+int test(void)
+{
+ if (test() != 0)
+ {
+ return 1;
+ }
+ else
+ return 0;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/double.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/double.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,2 @@
+function,test
+function,test
Added: soc2011/shm/TESLA/instrumenter-tests/tests/double.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/double.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,25 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+int test() {
+ void *__tesla_data;
+ __tesla_event_function_prologue_test(&__tesla_data);
+ if (test() != 0) {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 1;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ } else {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 0;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ }
+ __tesla_event_function_return_test(&__tesla_data);
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/empty.c
==============================================================================
Added: soc2011/shm/TESLA/instrumenter-tests/tests/empty.ins
==============================================================================
Added: soc2011/shm/TESLA/instrumenter-tests/tests/empty.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/empty.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,7 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
Added: soc2011/shm/TESLA/instrumenter-tests/tests/empty2.c
==============================================================================
Added: soc2011/shm/TESLA/instrumenter-tests/tests/empty2.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/empty2.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,4 @@
+function,a
+function,b
+function,c
+function,d
Added: soc2011/shm/TESLA/instrumenter-tests/tests/empty2.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/empty2.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,7 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,9 @@
+struct test { int x; };
+
+int test(int a)
+{
+ struct test *c;
+
+ c->x = (c->x = c->x + 1) + 2;
+ return c->x = 2;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,x
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,20 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+struct test {
+ int x;
+};
+int test(int a) {
+ struct test *c;
+ int __tesla_tmp_assign;
+ __tesla_tmp_assign = (c->x = c->x + 1) + 2;
+ __tesla_event_field_assign_struct_test_x(c);
+ c->x = __tesla_tmp_assign;
+ return c->x = 2;
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field2.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field2.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,9 @@
+struct test { int x; };
+
+int test(int a)
+{
+ struct test *c;
+
+ c->x = c->x;
+ return 2;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field2.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field2.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,x
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field2.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field2.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,20 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+struct test {
+ int x;
+};
+int test(int a) {
+ struct test *c;
+ int __tesla_tmp_assign;
+ __tesla_tmp_assign = c->x;
+ __tesla_event_field_assign_struct_test_x(c);
+ c->x = __tesla_tmp_assign;
+ return 2;
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field3.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field3.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,10 @@
+struct test { int x; };
+
+int test(int a)
+{
+ struct test c;
+
+ c.x = (c.x = c.x + 1) + 2;
+ (&c)->x = 5;
+ return c.x = 2;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/field3.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/field3.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,x
Added: soc2011/shm/TESLA/instrumenter-tests/tests/for.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/for.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,11 @@
+struct test { int x; };
+
+int
+test(int a)
+{
+ int b;
+ struct test *c;
+ while(a!=10)
+ c->x = a++;
+ return b;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/for.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/for.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,x
Added: soc2011/shm/TESLA/instrumenter-tests/tests/for.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/for.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,24 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+struct test {
+ int x;
+};
+int test(int a) {
+ int b;
+ struct test *c;
+ while (a != 10)
+ {
+ int __tesla_tmp_assign;
+ __tesla_tmp_assign = a++;
+ __tesla_event_field_assign_struct_test_x(c);
+ c->x = __tesla_tmp_assign;
+ }
+ return b;
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/for2.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/for2.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,14 @@
+struct test { int x; };
+
+int
+test(int a)
+{
+ int b;
+ struct test *c;
+ while(a!=10)
+ {
+ c->x = a--;
+ }
+
+ return b;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/for2.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/for2.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,x
Added: soc2011/shm/TESLA/instrumenter-tests/tests/for2.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/for2.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,24 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+struct test {
+ int x;
+};
+int test(int a) {
+ int b;
+ struct test *c;
+ while (a != 10)
+ {
+ int __tesla_tmp_assign;
+ __tesla_tmp_assign = a--;
+ __tesla_event_field_assign_struct_test_x(c);
+ c->x = __tesla_tmp_assign;
+ }
+ return b;
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/func.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/func.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,26 @@
+int f1(int a)
+{
+ return a;
+}
+
+char f2(char b)
+{
+ return b;
+}
+
+char f3(int c)
+{
+ if (c > 0)
+ return 5;
+ else
+ return 10;
+}
+
+void f4(void)
+{
+}
+
+void f5(void)
+{
+ return;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/func.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/func.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,9 @@
+function,f1
+function,f2
+function,f3
+function,f4
+function,f5
+function,f6
+function,f7
+function,f8
+function,f9
Added: soc2011/shm/TESLA/instrumenter-tests/tests/func.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/func.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,63 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+int f1(int a) {
+ void *__tesla_data;
+ __tesla_event_function_prologue_f1(&__tesla_data, a);
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = a;
+ __tesla_event_function_return_f1(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ __tesla_event_function_return_f1(&__tesla_data);
+}
+
+
+char f2(char b) {
+ void *__tesla_data;
+ __tesla_event_function_prologue_f2(&__tesla_data, b);
+ char __tesla_tmp_retval;
+ __tesla_tmp_retval = b;
+ __tesla_event_function_return_f2(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ __tesla_event_function_return_f2(&__tesla_data);
+}
+
+
+char f3(int c) {
+ void *__tesla_data;
+ __tesla_event_function_prologue_f3(&__tesla_data, c);
+ if (c > 0) {
+ char __tesla_tmp_retval;
+ __tesla_tmp_retval = 5;
+ __tesla_event_function_return_f3(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ } else {
+ char __tesla_tmp_retval;
+ __tesla_tmp_retval = 10;
+ __tesla_event_function_return_f3(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ }
+ __tesla_event_function_return_f3(&__tesla_data);
+}
+
+
+void f4() {
+ void *__tesla_data;
+ __tesla_event_function_prologue_f4(&__tesla_data);
+ __tesla_event_function_return_f4(&__tesla_data);
+}
+
+
+void f5() {
+ void *__tesla_data;
+ __tesla_event_function_prologue_f5(&__tesla_data);
+ __tesla_event_function_return_f5(&__tesla_data);
+ return;
+ __tesla_event_function_return_f5(&__tesla_data);
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/if.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/if.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,9 @@
+int test(void)
+{
+ if (test() != 0)
+ return 1;
+ else
+ {
+ return 0;
+ }
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/if.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/if.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+function,test
Added: soc2011/shm/TESLA/instrumenter-tests/tests/if.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/if.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,25 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+int test() {
+ void *__tesla_data;
+ __tesla_event_function_prologue_test(&__tesla_data);
+ if (test() != 0) {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 1;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ } else {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 0;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ }
+ __tesla_event_function_return_test(&__tesla_data);
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/if2.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/if2.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,9 @@
+int test(void)
+{
+ if (test() != 0)
+ {
+ return 1;
+ }
+ else
+ return 0;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/if2.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/if2.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+function,test
Added: soc2011/shm/TESLA/instrumenter-tests/tests/if2.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/if2.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,25 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+int test() {
+ void *__tesla_data;
+ __tesla_event_function_prologue_test(&__tesla_data);
+ if (test() != 0) {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 1;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ } else {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 0;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ }
+ __tesla_event_function_return_test(&__tesla_data);
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/inc.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/inc.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,10 @@
+struct test { int x; };
+
+int
+test(int a)
+{
+ struct test *c;
+ c->x = 1;
+ c->x++;
+ return c->x;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/inc.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/inc.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+field_assign,struct test,x
Added: soc2011/shm/TESLA/instrumenter-tests/tests/inc.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/inc.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,21 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+struct test {
+ int x;
+};
+int test(int a) {
+ struct test *c;
+ int __tesla_tmp_assign;
+ __tesla_tmp_assign = 1;
+ __tesla_event_field_assign_struct_test_x(c);
+ c->x = __tesla_tmp_assign;
+ c->x++;
+ return c->x;
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/none.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/none.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,5 @@
+int
+main()
+{
+ return 0;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/none.ins
==============================================================================
Added: soc2011/shm/TESLA/instrumenter-tests/tests/none.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/none.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,12 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+int main() {
+ return 0;
+}
+
+
Added: soc2011/shm/TESLA/instrumenter-tests/tests/not-exist.out
==============================================================================
Added: soc2011/shm/TESLA/instrumenter-tests/tests/switch.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/switch.c Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,16 @@
+int test(void)
+{
+ int a = 1;
+ switch(a)
+ {
+ case 1:
+ return 1;
+ case 2:
+ return 2;
+ case 3:
+ return 3;
+ default:
+ break;
+ }
+ return 4;
+}
Added: soc2011/shm/TESLA/instrumenter-tests/tests/switch.ins
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/switch.ins Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1 @@
+function,test
Added: soc2011/shm/TESLA/instrumenter-tests/tests/switch.out
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/shm/TESLA/instrumenter-tests/tests/switch.out Sat Jul 9 01:20:18 2011 (r224064)
@@ -0,0 +1,46 @@
+struct __va_list_tag {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ void *overflow_arg_area;
+ void *reg_save_area;
+};
+typedef struct __va_list_tag __va_list_tag;
+int test() {
+ void *__tesla_data;
+ __tesla_event_function_prologue_test(&__tesla_data);
+ int a = 1;
+ switch (a) {
+ case 1:
+ {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 1;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ }
+ case 2:
+ {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 2;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ }
+ case 3:
+ {
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 3;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
+ return __tesla_tmp_retval;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ int __tesla_tmp_retval;
+ __tesla_tmp_retval = 4;
+ __tesla_event_function_return_test(&__tesla_data, __tesla_tmp_retval);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-soc-all
mailing list