$(EBTREE_DIR)/ebimtree.o $(EBTREE_DIR)/ebistree.o
ifneq ($(TRACE),)
-OBJS += src/trace.o
+OBJS += src/calltrace.o
endif
ifneq ($(EXTRA_OBJS),)
# rebuild it every time
.PHONY: src/version.c
-src/trace.o: src/trace.c $(DEP)
+src/calltrace.o: src/calltrace.c $(DEP)
$(cmd_CC) $(TRACE_COPTS) -c -o $@ $<
src/haproxy.o: src/haproxy.c $(DEP)
*/
void debug_hexdump(FILE *out, const char *pfx, const char *buf, unsigned int baseaddr, int len);
-/* this is used to emit traces when building with TRACE=1 */
+/* this is used to emit call traces when building with TRACE=1 */
__attribute__((format(printf, 1, 2)))
-void trace(char *fmt, ...);
+void calltrace(char *fmt, ...);
/* used from everywhere just to drain results we don't want to read and which
* recent versions of gcc increasingly and annoyingly complain about.
/*
* Function call tracing for gcc >= 2.95
+ * WARNING! THIS CODE IS NOT THREAD-SAFE!
*
* Copyright 2012 Willy Tarreau <w@1wt.eu>
*
*
* where <dir> is '>' when entering a function and '<' when leaving.
*
- * It is also possible to emit comments using the trace() function which uses
+ * It is also possible to emit comments using the calltrace() function which uses
* the printf() format. Such comments are then inserted by replacing the caller
* pointer with a sharp ('#') like this :
*
* <timestamp> <level> # <string>
*/
__attribute__((format(printf, 1, 2)))
-void trace(char *fmt, ...)
+void calltrace(char *fmt, ...)
{
va_list ap;