summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/parsing.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-19 15:02:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-20 15:31:48 +0000
commit295f1608b050af3bf73b3cd6eaadb9a52a6b4822 (patch)
treef937737e21cdf50bb10d28e593dc46ccea333daa /scripts/pybootchartgui/pybootchartgui/parsing.py
parent6e6dcbe340c9ee4a4a23318ace3335a004a8d31b (diff)
downloadpoky-295f1608b050af3bf73b3cd6eaadb9a52a6b4822.tar.gz
scripts/pybootchart: Fix missing entries bug
If two entries have the same start time, the data store used will cause all but one of the entries to be lost. This patch enhances the data storage structure to avoid this problem and allow more than one event to start at the same time. (From OE-Core rev: 220b071fd8d1cc6bdbca58f75489e3c9b34921ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/pybootchartgui/pybootchartgui/parsing.py')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/parsing.py29
1 files changed, 21 insertions, 8 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index c64eba0a4d..a0f6e8e0eb 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -184,9 +184,16 @@ def _do_parse(state, filename, file):
184 elif line.startswith("Ended:"): 184 elif line.startswith("Ended:"):
185 end = int(float(line.split()[-1])) 185 end = int(float(line.split()[-1]))
186 if start and end and (end - start) > 8: 186 if start and end and (end - start) > 8:
187 k = pn + ":" + task
187 state.processes[pn + ":" + task] = [start, end] 188 state.processes[pn + ":" + task] = [start, end]
188 state.start[start] = pn + ":" + task 189 if start not in state.start:
189 state.end[end] = pn + ":" + task 190 state.start[start] = []
191 if k not in state.start[start]:
192 state.start[start].append(pn + ":" + task)
193 if end not in state.end:
194 state.end[end] = []
195 if k not in state.end[end]:
196 state.end[end].append(pn + ":" + task)
190 return state 197 return state
191 198
192def parse_file(state, filename): 199def parse_file(state, filename):
@@ -248,12 +255,18 @@ def split_res(res, n):
248 #state.processes[pn + ":" + task] = [start, end] 255 #state.processes[pn + ":" + task] = [start, end]
249 #state.start[start] = pn + ":" + task 256 #state.start[start] = pn + ":" + task
250 #state.end[end] = pn + ":" + task 257 #state.end[end] = pn + ":" + task
251 p = res.start[s_list[i]] 258 for p in res.start[s_list[i]]:
252 s = s_list[i] 259 s = s_list[i]
253 e = res.processes[p][1] 260 e = res.processes[p][1]
254 state.processes[p] = [s, e] 261 state.processes[p] = [s, e]
255 state.start[s] = p 262 if s not in state.start:
256 state.end[e] = p 263 state.start[s] = []
264 if p not in state.start[s]:
265 state.start[s].append(p)
266 if e not in state.end:
267 state.end[e] = []
268 if p not in state.end[e]:
269 state.end[e].append(p)
257 start = end 270 start = end
258 end = end + frag_size 271 end = end + frag_size
259 if end > len(s_list): 272 if end > len(s_list):