summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-27 11:04:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-28 12:37:52 +0100
commit3190cb83e2af195a464f669c5aa8aedbf795160e (patch)
tree90c31b817b21075836ddb76a668e503b382b629e /lib
parente6ff1d4bab43fdcd8af1230f1d54615f53c1978e (diff)
downloadbitbake-3190cb83e2af195a464f669c5aa8aedbf795160e.tar.gz
taskdata: Add gettask_id_fromfnid helper function
This is like gettask_id but doesn't require translation of fnid -> fn first which the function then translates back. This gives a sizeable performance improvement since a significant number of lookups are avoided. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/runqueue.py12
-rw-r--r--lib/bb/taskdata.py10
2 files changed, 14 insertions, 8 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 03766adfe..e09e8c808 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -406,9 +406,8 @@ class RunQueueData:
depdata = taskData.build_targets[depid][0]
if depdata is None:
continue
- dep = taskData.fn_index[depdata]
for taskname in tasknames:
- taskid = taskData.gettask_id(dep, taskname, False)
+ taskid = taskData.gettask_id_fromfnid(depdata, taskname)
if taskid is not None:
depends.append(taskid)
@@ -419,9 +418,8 @@ class RunQueueData:
depdata = taskData.run_targets[depid][0]
if depdata is None:
continue
- dep = taskData.fn_index[depdata]
for taskname in tasknames:
- taskid = taskData.gettask_id(dep, taskname, False)
+ taskid = taskData.gettask_id_fromfnid(depdata, taskname)
if taskid is not None:
depends.append(taskid)
@@ -469,8 +467,7 @@ class RunQueueData:
# Won't be in build_targets if ASSUME_PROVIDED
depdata = taskData.build_targets[depid][0]
if depdata is not None:
- dep = taskData.fn_index[depdata]
- taskid = taskData.gettask_id(dep, idependtask, False)
+ taskid = taskData.gettask_id_fromfnid(depdata, idependtask)
if taskid is None:
bb.msg.fatal("RunQueue", "Task %s in %s depends upon non-existent task %s in %s" % (taskData.tasks_name[task], fn, idependtask, dep))
depends.append(taskid)
@@ -482,8 +479,7 @@ class RunQueueData:
# Won't be in run_targets if ASSUME_PROVIDED
depdata = taskData.run_targets[depid][0]
if depdata is not None:
- dep = taskData.fn_index[depdata]
- taskid = taskData.gettask_id(dep, idependtask, False)
+ taskid = taskData.gettask_id_fromfnid(depdata, idependtask)
if taskid is None:
bb.msg.fatal("RunQueue", "Task %s in %s rdepends upon non-existent task %s in %s" % (taskData.tasks_name[task], fn, idependtask, dep))
depends.append(taskid)
diff --git a/lib/bb/taskdata.py b/lib/bb/taskdata.py
index 8bc447c11..55cdde553 100644
--- a/lib/bb/taskdata.py
+++ b/lib/bb/taskdata.py
@@ -116,6 +116,16 @@ class TaskData:
ids.append(self.tasks_lookup[fnid][task])
return ids
+ def gettask_id_fromfnid(self, fnid, task):
+ """
+ Return an ID number for the task matching fnid and task.
+ """
+ if fnid in self.tasks_lookup:
+ if task in self.tasks_lookup[fnid]:
+ return self.tasks_lookup[fnid][task]
+
+ return None
+
def gettask_id(self, fn, task, create = True):
"""
Return an ID number for the task matching fn and task.
uster/mut-x11 OpenEmbedded Core user contribution treesGrokmirror user
aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa-common.inc
blob: c11d402dcee62c4b92285c2e7636173bfba8289d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103