diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2013-11-14 15:11:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-18 12:44:56 +0000 |
commit | 46c45853f0fbf71fd153bcffacb1807363a1a857 (patch) | |
tree | 36f92fe8133487154406e24b232fad2f8764d9cc /scripts/pybootchartgui/pybootchartgui/draw.py | |
parent | 65d43843b69416f17eac6092f69a3ac58a8a9c5d (diff) | |
download | poky-46c45853f0fbf71fd153bcffacb1807363a1a857.tar.gz |
pybootchartgui: Make "Show more" show all processes
While "Show more" is enabled, all processes are shown, regardless of
--mintime.
This also has the added benefit of making the first shown bar start at
its correct offset from the start time, rather than always starting at
0.
(From OE-Core rev: 5f1b8730f90099c0f73a6b08599990ee71e831b5)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/pybootchartgui/pybootchartgui/draw.py')
-rw-r--r-- | scripts/pybootchartgui/pybootchartgui/draw.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index a22ac802f7..2aa348ba70 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py | |||
@@ -297,10 +297,20 @@ OPTIONS = None | |||
297 | 297 | ||
298 | def extents(options, xscale, trace): | 298 | def extents(options, xscale, trace): |
299 | start = min(trace.start.keys()) | 299 | start = min(trace.start.keys()) |
300 | end = max(trace.end.keys()) | 300 | end = start |
301 | 301 | ||
302 | w = int ((end - start) * sec_w_base * xscale) + 2*off_x | 302 | processes = 0 |
303 | h = proc_h * len(trace.processes) + header_h + 2 * off_y | 303 | for proc in trace.processes: |
304 | if not options.app_options.show_all and \ | ||
305 | trace.processes[proc][1] - trace.processes[proc][0] < options.app_options.mintime: | ||
306 | continue | ||
307 | |||
308 | if trace.processes[proc][1] > end: | ||
309 | end = trace.processes[proc][1] | ||
310 | processes += 1 | ||
311 | |||
312 | w = int ((end - start) * sec_w_base * xscale) + 2 * off_x | ||
313 | h = proc_h * processes + header_h + 2 * off_y | ||
304 | 314 | ||
305 | return (w, h) | 315 | return (w, h) |
306 | 316 | ||
@@ -419,6 +429,9 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): | |||
419 | offset = min(trace.start.keys()) | 429 | offset = min(trace.start.keys()) |
420 | for s in sorted(trace.start.keys()): | 430 | for s in sorted(trace.start.keys()): |
421 | for val in sorted(trace.start[s]): | 431 | for val in sorted(trace.start[s]): |
432 | if not options.app_options.show_all and \ | ||
433 | trace.processes[val][1] - s < options.app_options.mintime: | ||
434 | continue | ||
422 | task = val.split(":")[1] | 435 | task = val.split(":")[1] |
423 | #print val | 436 | #print val |
424 | #print trace.processes[val][1] | 437 | #print trace.processes[val][1] |