mirror of git://gcc.gnu.org/git/gcc.git
mf-runtime.c (__mfu_check): Remove mistaken mode-nop handling.
2004-07-21 Frank Ch. Eigler <fche@redhat.com> * mf-runtime.c (__mfu_check): Remove mistaken mode-nop handling. (__mfu_usage): Include (C) 2004. * mf-hooks3.c (__mf_find_threadinfo): Don't call tracing functions here. Include a comment explaining why. From-SVN: r85014
This commit is contained in:
parent
0e6ed89966
commit
54419590e8
|
|
@ -1,3 +1,11 @@
|
||||||
|
2004-07-21 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* mf-runtime.c (__mfu_check): Remove mistaken mode-nop
|
||||||
|
handling.
|
||||||
|
(__mfu_usage): Include (C) 2004.
|
||||||
|
* mf-hooks3.c (__mf_find_threadinfo): Don't call tracing functions
|
||||||
|
here. Include a comment explaining why.
|
||||||
|
|
||||||
2004-07-20 Frank Ch. Eigler <fche@redhat.com>
|
2004-07-20 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
* mf-impl.h (__mf_options): Add ignore_reads and timestamps fields.
|
* mf-impl.h (__mf_options): Add ignore_reads and timestamps fields.
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,10 @@ __mf_allocate_blank_threadinfo (unsigned* idx)
|
||||||
making an early call into libmudflap. In these cases, create a new
|
making an early call into libmudflap. In these cases, create a new
|
||||||
entry. If not it's not the main thread, put it into reentrant
|
entry. If not it's not the main thread, put it into reentrant
|
||||||
initial state.
|
initial state.
|
||||||
|
|
||||||
|
NB: VERBOSE_TRACE type functions are not generally safe to call
|
||||||
|
from this context, since a new thread might just be "booting up",
|
||||||
|
making printf unsafe to call.
|
||||||
*/
|
*/
|
||||||
static struct pthread_info*
|
static struct pthread_info*
|
||||||
__mf_find_threadinfo ()
|
__mf_find_threadinfo ()
|
||||||
|
|
@ -225,7 +229,7 @@ __mf_find_threadinfo ()
|
||||||
/* NB: leave stack-related fields unset, to avoid
|
/* NB: leave stack-related fields unset, to avoid
|
||||||
deallocation. */
|
deallocation. */
|
||||||
main_thread_seen_p = 1;
|
main_thread_seen_p = 1;
|
||||||
VERBOSE_TRACE ("identified self as main thread\n");
|
/* VERBOSE_TRACE ("identified self as main thread\n"); */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -236,15 +240,17 @@ __mf_find_threadinfo ()
|
||||||
/* NB: leave stack-related fields unset, leaving pthread_create
|
/* NB: leave stack-related fields unset, leaving pthread_create
|
||||||
to fill them in for user threads, leaving them empty for
|
to fill them in for user threads, leaving them empty for
|
||||||
other threads. */
|
other threads. */
|
||||||
VERBOSE_TRACE ("identified self as new aux or user thread\n");
|
/* VERBOSE_TRACE ("identified self as new aux or user thread\n"); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last != it)
|
if (last != it)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
VERBOSE_TRACE ("found threadinfo for %u, slot %u\n",
|
VERBOSE_TRACE ("found threadinfo for %u, slot %u\n",
|
||||||
(unsigned) it,
|
(unsigned) it,
|
||||||
(unsigned) *hash);
|
(unsigned) *hash);
|
||||||
|
*/
|
||||||
last = it;
|
last = it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ __mf_usage ()
|
||||||
|
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"This is a %s%sGCC \"mudflap\" memory-checked binary.\n"
|
"This is a %s%sGCC \"mudflap\" memory-checked binary.\n"
|
||||||
"Mudflap is Copyright (C) 2002-2003 Free Software Foundation, Inc.\n"
|
"Mudflap is Copyright (C) 2002-2004 Free Software Foundation, Inc.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The mudflap code can be controlled by an environment variable:\n"
|
"The mudflap code can be controlled by an environment variable:\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -759,8 +759,13 @@ void __mfu_check (void *ptr, size_t sz, int type, const char *location)
|
||||||
switch (__mf_opts.mudflap_mode)
|
switch (__mf_opts.mudflap_mode)
|
||||||
{
|
{
|
||||||
case mode_nop:
|
case mode_nop:
|
||||||
entry->low = MINPTR;
|
/* It is tempting to poison the cache here similarly to
|
||||||
entry->high = MAXPTR;
|
mode_populate. However that eliminates a valuable
|
||||||
|
distinction between these two modes. mode_nop is useful to
|
||||||
|
let a user count & trace every single check / registration
|
||||||
|
call. mode_populate is useful to let a program run fast
|
||||||
|
while unchecked.
|
||||||
|
*/
|
||||||
judgement = 1;
|
judgement = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue