aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-02-28 09:10:47 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-02-28 09:10:47 +0000
commit89dcff155111d4ae4d2a0242081c630c163df20f (patch)
tree1150342611826b0a0c4d31ea26d4df06c5d4e580 /lib/bb/runqueue.py
parentbb91105472eff555d3c934f0953b6907a5fb42f1 (diff)
downloadbitbake-89dcff155111d4ae4d2a0242081c630c163df20f.tar.gz
runqueue.py: Add BB_SCHEDULER and BB_STAMP_POLICY variables
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r--lib/bb/runqueue.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 1ac034331..a516fcfcf 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -165,8 +165,10 @@ class RunQueue:
self.cfgData = cfgData
self.targets = targets
- self.number_tasks = int(bb.data.getVar("BB_NUMBER_THREADS", cfgData) or 1)
- self.multi_provider_whitelist = (bb.data.getVar("MULTI_PROVIDER_WHITELIST", cfgData) or "").split()
+ self.number_tasks = int(bb.data.getVar("BB_NUMBER_THREADS", cfgData, 1) or 1)
+ self.multi_provider_whitelist = (bb.data.getVar("MULTI_PROVIDER_WHITELIST", cfgData, 1) or "").split()
+ self.scheduler = bb.data.getVar("BB_SCHEDULER", cfgData, 1) or "speed"
+ self.stamppolicy = bb.data.getVar("BB_STAMP_POLICY", cfgData, 1) or "perfile"
def reset_runqueue(self):
self.runq_fnid = []
@@ -631,10 +633,11 @@ class RunQueue:
self.runq_weight = self.calculate_task_weights(endpoints)
# Decide what order to execute the tasks in, pick a scheduler
- # FIXME - Allow user selection
#self.sched = RunQueueScheduler(self)
- self.sched = RunQueueSchedulerSpeed(self)
- #self.sched = RunQueueSchedulerCompletion(self)
+ if self.scheduler == "completion":
+ self.sched = RunQueueSchedulerCompletion(self)
+ else:
+ self.sched = RunQueueSchedulerSpeed(self)
# Sanity Check - Check for multiple tasks building the same provider
prov_list = {}
@@ -666,6 +669,12 @@ class RunQueue:
current = []
notcurrent = []
buildable = []
+
+ if self.stamppolicy == "perfile":
+ fulldeptree = False
+ else:
+ fulldeptree = True
+
for task in range(len(self.runq_fnid)):
unchecked[task] = ""
if len(self.runq_depends[task]) == 0:
@@ -704,7 +713,7 @@ class RunQueue:
fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
taskname2 = self.runq_task[dep]
stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
- if fn == fn2:
+ if fulldeptree or fn == fn2:
if dep in notcurrent:
iscurrent = False
else: