This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Deprecating mtrace?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]