aboutsummaryrefslogtreecommitdiff
path: root/unittest/function_trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/function_trace.c')
-rw-r--r--unittest/function_trace.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/unittest/function_trace.c b/unittest/function_trace.c
deleted file mode 100644
index 5ed47a9..0000000
--- a/unittest/function_trace.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-
-static FILE *fp_trace;
-
-void
-__attribute__ ((constructor))
-trace_begin (void)
-{
- fp_trace = fopen("function_trace.out", "w");
-}
-
-void
-__attribute__ ((destructor))
-trace_end (void)
-{
- if(fp_trace != NULL) {
- fclose(fp_trace);
- }
-}
-
-
-void
-__cyg_profile_func_enter (void *func, void *caller)
-{
- if(fp_trace != NULL) {
- fprintf(fp_trace, "e %p %p\n", func, caller);
- }
-}
-
-void
-__cyg_profile_func_exit (void *func, void *caller)
-{
- if(fp_trace != NULL) {
- fprintf(fp_trace, "x %p %p\n", func, caller);
- }
-}