]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Update VG_(bbs_done) correctly, so it agrees with the BB counts
authorJulian Seward <jseward@acm.org>
Fri, 18 Mar 2005 03:18:30 +0000 (03:18 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 18 Mar 2005 03:18:30 +0000 (03:18 +0000)
presented by Lackey.

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

coregrind/vg_scheduler.c

index d407644fc790b366f0e8cd1182ad523e17cc478d..524c7eb8d69b42015ec05e251842f73806fabed1 100644 (file)
@@ -729,8 +729,6 @@ VgSchedReturnCode VG_(scheduler) ( ThreadId tid )
    VG_(dispatch_ctr) = SCHEDULING_QUANTUM + 1;
 
    while(!VG_(is_exiting)(tid)) {
-      UInt remaining_bbs;
-
       if (VG_(dispatch_ctr) == 1) {
         /* Our slice is done, so yield the CPU to another thread.  This
            doesn't sleep between sleeping and running, since that would
@@ -775,12 +773,8 @@ VgSchedReturnCode VG_(scheduler) ( ThreadId tid )
         VG_(message)(Vg_DebugMsg, "thread %d: running for %d bbs", 
                      tid, VG_(dispatch_ctr) - 1 );
 
-      remaining_bbs = VG_(dispatch_ctr);
-
       trc = run_thread_for_a_while ( tid );
 
-      VG_(bbs_done) += remaining_bbs - VG_(dispatch_ctr);
-
       if (VG_(clo_trace_sched) && VG_(clo_verbosity) > 2) {
         Char buf[50];
         VG_(sprintf)(buf, "TRC: %s", name_of_sched_event(trc));