]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
coregrind/m_scheduler: Inform tools about thread ID while translating
authorBart Van Assche <bvanassche@acm.org>
Mon, 10 Mar 2014 18:54:40 +0000 (18:54 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 10 Mar 2014 18:54:40 +0000 (18:54 +0000)
This patch fixes the following assertion failure in DRD with
ENABLE_DRD_CONSISTENCY_CHECKS defined:

drd: drd_load_store.c:186 (vgDrd_trace_load): the 'impossible' happened.
==9543==    at 0x2803C4EC: report_and_quit (m_libcassert.c:279)
==9543==    by 0x2803C646: vgPlain_assert_fail (m_libcassert.c:359)
==9543==    by 0x2802A488: vgDrd_trace_load (drd_load_store.c:186)
==9543==    by 0x2805743E: vgPlain_translate (m_translate.c:1403)
==9543==    by 0x28088FCE: vgPlain_scheduler (scheduler.c:1014)
==9543==    by 0x280983D2: run_a_thread_NORETURN (syswrap-linux.c:103)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13862

coregrind/m_scheduler/scheduler.c

index 52b4d0f257aa7aadb967e9234452f7fe97ece168..b6f558d0a1532bd953e811243e273745441196db 100644 (file)
@@ -1011,6 +1011,7 @@ static void handle_tt_miss ( ThreadId tid )
                                  ip, True/*upd_fast_cache*/ );
    if (UNLIKELY(!found)) {
       /* Not found; we need to request a translation. */
+      VG_TRACK( start_client_code, tid, bbs_done );
       if (VG_(translate)( tid, ip, /*debug*/False, 0/*not verbose*/, 
                           bbs_done, True/*allow redirection*/ )) {
          found = VG_(search_transtab)( NULL, NULL, NULL,
@@ -1024,6 +1025,7 @@ static void handle_tt_miss ( ThreadId tid )
         // or the thread has been marked for termination.  Either
         // way, we just need to go back into the scheduler loop.
       }
+      VG_TRACK( stop_client_code, tid, bbs_done );
    }
 }