From bd50539fda96214ac1a35f5471e4872cdeb05b2d Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Sun, 1 May 2016 14:13:15 +0200 Subject: [PATCH] Revert "instrument X using gcc's -finstrument-functions" This reverts commit 4911b107dae26150ec87cc31cada0e52f97061d6. The idea was to keep the stuff in the git history. --- common/utils/T/tracer/gui/Makefile | 3 --- common/utils/T/tracer/gui/gui.c | 16 ---------------- 2 files changed, 19 deletions(-) diff --git a/common/utils/T/tracer/gui/Makefile b/common/utils/T/tracer/gui/Makefile index 9552d03d8..cc6a409e7 100644 --- a/common/utils/T/tracer/gui/Makefile +++ b/common/utils/T/tracer/gui/Makefile @@ -10,9 +10,6 @@ gui.a: $(OBJS) test: test.o gui.a $(CC) -o test $(OBJS) test.o -lX11 -pthread -lm -x.o:x.c - $(CC) $(CFLAGS) -o $@ -c $< -finstrument-functions - %.o: %.c $(CC) $(CFLAGS) -o $@ -c $< diff --git a/common/utils/T/tracer/gui/gui.c b/common/utils/T/tracer/gui/gui.c index 52e1b1cc7..ef8640b0d 100644 --- a/common/utils/T/tracer/gui/gui.c +++ b/common/utils/T/tracer/gui/gui.c @@ -5,31 +5,15 @@ #include <stdlib.h> #include <pthread.h> -static volatile int locked = 0; - -void __cyg_profile_func_enter (void *func, void *caller) -{ - if (locked == 0) abort(); - printf("E %p %p %lu\n", func, caller, time(NULL)); -} - -void __cyg_profile_func_exit (void *func, void *caller) -{ - if (locked == 0) abort(); - printf("X %p %p %lu\n", func, caller, time(NULL)); -} - void glock(gui *_gui) { struct gui *g = _gui; if (pthread_mutex_lock(g->lock)) ERR("mutex error\n"); - locked = 1; } void gunlock(gui *_gui) { struct gui *g = _gui; - locked = 0; if (pthread_mutex_unlock(g->lock)) ERR("mutex error\n"); } -- GitLab