extern Bool VGM_(check_readable) ( Addr a, UInt len, Addr* bad_addr );
extern Bool VGM_(check_readable_asciiz) ( Addr a, Addr* bad_addr );
-/* Sanity checks which may be done at any time. Doing them at
- signal-delivery time turns out to be convenient. */
-extern void VG_(do_sanity_checks) ( ThreadId tid, Bool force_expensive );
+/* Sanity checks which may be done at any time. The scheduler decides
+ when. */
+extern void VG_(do_sanity_checks) ( Bool force_expensive );
/* Very cheap ... */
extern Bool VG_(first_and_last_secondaries_look_plausible) ( void );
if (VG_(clo_cachesim))
VG_(show_cachesim_results)(VG_(client_argc), VG_(client_argv));
- VG_(do_sanity_checks)( 1 /* root thread */,
- True /*include expensive checks*/ );
+ VG_(do_sanity_checks)( True /*include expensive checks*/ );
if (VG_(clo_verbosity) > 1)
vg_show_counts();
/* A fast sanity check -- suitable for calling circa once per
millisecond. */
-void VG_(do_sanity_checks) ( ThreadId tid, Bool force_expensive )
+void VG_(do_sanity_checks) ( Bool force_expensive )
{
Int i;
Bool do_expensive_checks;
VG_(sanity_fast_count)++;
- tst = VG_(get_thread_state)(tid);
- vg_assert(tst != NULL && tst->status != VgTs_Empty);
-
/* Check that we haven't overrun our private stack. */
for (i = 0; i < 10; i++) {
vg_assert(VG_(stack)[i]
Be paranoid. Always a good idea. */
stage1:
scheduler_sanity();
+ VG_(do_sanity_checks)( False );
/* ======================= Phase 1 of 3 =======================
Handle I/O completions and signals. This may change the
POSIX standard appears to require this behaviour. */
sigs_delivered = VG_(deliver_signals)( 1 /*HACK*/ );
if (sigs_delivered)
- VG_(do_sanity_checks)( 1 /*HACK*/, False );
+ VG_(do_sanity_checks)( False );
/* Try and find a thread (tid) to run. */
tid_next = tid;
extern Bool VGM_(check_readable) ( Addr a, UInt len, Addr* bad_addr );
extern Bool VGM_(check_readable_asciiz) ( Addr a, Addr* bad_addr );
-/* Sanity checks which may be done at any time. Doing them at
- signal-delivery time turns out to be convenient. */
-extern void VG_(do_sanity_checks) ( ThreadId tid, Bool force_expensive );
+/* Sanity checks which may be done at any time. The scheduler decides
+ when. */
+extern void VG_(do_sanity_checks) ( Bool force_expensive );
/* Very cheap ... */
extern Bool VG_(first_and_last_secondaries_look_plausible) ( void );
if (VG_(clo_cachesim))
VG_(show_cachesim_results)(VG_(client_argc), VG_(client_argv));
- VG_(do_sanity_checks)( 1 /* root thread */,
- True /*include expensive checks*/ );
+ VG_(do_sanity_checks)( True /*include expensive checks*/ );
if (VG_(clo_verbosity) > 1)
vg_show_counts();
/* A fast sanity check -- suitable for calling circa once per
millisecond. */
-void VG_(do_sanity_checks) ( ThreadId tid, Bool force_expensive )
+void VG_(do_sanity_checks) ( Bool force_expensive )
{
Int i;
Bool do_expensive_checks;
VG_(sanity_fast_count)++;
- tst = VG_(get_thread_state)(tid);
- vg_assert(tst != NULL && tst->status != VgTs_Empty);
-
/* Check that we haven't overrun our private stack. */
for (i = 0; i < 10; i++) {
vg_assert(VG_(stack)[i]
Be paranoid. Always a good idea. */
stage1:
scheduler_sanity();
+ VG_(do_sanity_checks)( False );
/* ======================= Phase 1 of 3 =======================
Handle I/O completions and signals. This may change the
POSIX standard appears to require this behaviour. */
sigs_delivered = VG_(deliver_signals)( 1 /*HACK*/ );
if (sigs_delivered)
- VG_(do_sanity_checks)( 1 /*HACK*/, False );
+ VG_(do_sanity_checks)( False );
/* Try and find a thread (tid) to run. */
tid_next = tid;