diff options
Diffstat (limited to 'scripts/pybootchartgui')
-rw-r--r-- | scripts/pybootchartgui/pybootchartgui/draw.py | 53 | ||||
-rw-r--r-- | scripts/pybootchartgui/pybootchartgui/parsing.py | 29 |
2 files changed, 48 insertions, 34 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index 16830fa456..1b872de75e 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py | |||
@@ -287,32 +287,33 @@ def render(ctx, res): | |||
287 | 287 | ||
288 | offset = min(res.start.keys()) | 288 | offset = min(res.start.keys()) |
289 | for s in sorted(res.start.keys()): | 289 | for s in sorted(res.start.keys()): |
290 | task = res.start[s].split(":")[1] | 290 | for val in sorted(res.start[s]): |
291 | #print res.start[s] | 291 | task = val.split(":")[1] |
292 | #print res.processes[res.start[s]][1] | 292 | #print val |
293 | #print s | 293 | #print res.processes[val][1] |
294 | x = (s - offset) * sec_w | 294 | #print s |
295 | w = ((res.processes[res.start[s]][1] - s) * sec_w) | 295 | x = (s - offset) * sec_w |
296 | 296 | w = ((res.processes[val][1] - s) * sec_w) | |
297 | #print "proc at %s %s %s %s" % (x, y, w, proc_h) | 297 | |
298 | col = None | 298 | #print "proc at %s %s %s %s" % (x, y, w, proc_h) |
299 | if task == "do_compile": | 299 | col = None |
300 | col = TASK_COLOR_COMPILE | 300 | if task == "do_compile": |
301 | elif task == "do_configure": | 301 | col = TASK_COLOR_COMPILE |
302 | col = TASK_COLOR_CONFIGURE | 302 | elif task == "do_configure": |
303 | elif task == "do_install": | 303 | col = TASK_COLOR_CONFIGURE |
304 | col = TASK_COLOR_INSTALL | 304 | elif task == "do_install": |
305 | elif task == "do_package": | 305 | col = TASK_COLOR_INSTALL |
306 | col = TASK_COLOR_PACKAGE | 306 | elif task == "do_package": |
307 | elif task == "do_populate_sysroot": | 307 | col = TASK_COLOR_PACKAGE |
308 | col = TASK_COLOR_SYSROOT | 308 | elif task == "do_populate_sysroot": |
309 | 309 | col = TASK_COLOR_SYSROOT | |
310 | draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) | 310 | |
311 | if col: | 311 | draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) |
312 | draw_fill_rect(ctx, col, (x, y, w, proc_h)) | 312 | if col: |
313 | 313 | draw_fill_rect(ctx, col, (x, y, w, proc_h)) | |
314 | draw_label_in_box(ctx, PROC_TEXT_COLOR, res.start[s], x, y + proc_h - 4, w, proc_h) | 314 | |
315 | y = y + proc_h | 315 | draw_label_in_box(ctx, PROC_TEXT_COLOR, val, x, y + proc_h - 4, w, proc_h) |
316 | y = y + proc_h | ||
316 | 317 | ||
317 | # draw process boxes | 318 | # draw process boxes |
318 | #draw_process_bar_chart(ctx, proc_tree, curr_y + bar_h, w, h) | 319 | #draw_process_bar_chart(ctx, proc_tree, curr_y + bar_h, w, h) |
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 | ||
192 | def parse_file(state, filename): | 199 | def 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): |