Skip to content

Extend time quantum if not in marked 'interesting' code. #58

@LouisJenkinsCS

Description

@LouisJenkinsCS

Michael had the brilliant idea that instead of probabilistically cutting a time quantum short based on whether or not a thread is in marked 'interesting' code, but instead will just extend its time slice. Essentially modify this...

case VG_TRC_INNER_COUNTERZERO:
/* Timeslice is out. Let a new thread be scheduled. */
vg_assert(dispatch_ctr == 0);
break;

Into this...

  case VG_TRC_INNER_COUNTERZERO:
         /* Timeslice is out.  Let a new thread be scheduled,
            but only if we’re running in “interesting” code. */
         vg_assert(dispatch_ctr == 0);
         if (!in_interesting_code) {  // determined somehow...
             // could optionally skip this reinitialization, with low probability
             dispatch_ctr = VG_(scheduling_quantum);
         }
         break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions