[RFC] Deprecating mtrace?

Ondřej Bílka neleai@seznam.cz
Sun Nov 3 18:57:00 GMT 2013


Hi,

Does someone still use mtrace when valgrind is better and faster?

A mcheck makes some sense as it is low-overhead and could be enabled in
production but for detecting leaks we should redirect users to better
tools.

Comments?

	* malloc/mcheck.h: Warn that mtrace is deprecated.

diff --git a/malloc/mcheck.h b/malloc/mcheck.h
index 204ca33..caf56fa 100644
--- a/malloc/mcheck.h
+++ b/malloc/mcheck.h
@@ -53,8 +53,8 @@ extern void mcheck_check_all (void);
 extern enum mcheck_status mprobe (void *__ptr) __THROW;
 
 /* Activate a standard collection of tracing hooks.  */
-extern void mtrace (void) __THROW;
-extern void muntrace (void) __THROW;
+extern void mtrace (void) __warnattr ("mtrace is deprecated.  "
+ "Please use valgrind instead.") __THROW;
+extern void muntrace (void) __warnattr ("mtrace is deprecated.  "
+ "Please use valgrind instead.") __THROW;
 
 __END_DECLS



More information about the Libc-alpha mailing list