summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/gui.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-06-06 14:00:48 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-15 15:12:42 +0100
commitbc5b86f025c9c1d9f0e1a58e92fe8c1381c096a5 (patch)
tree8c7af16040e4a25fb750673194c937f626ea5166 /scripts/pybootchartgui/pybootchartgui/gui.py
parent3d78bc19c5b63541fd45dad7580ade55ba512764 (diff)
downloadpoky-bc5b86f025c9c1d9f0e1a58e92fe8c1381c096a5.tar.gz
pybootchartgui: make the build profiling in pictures
The original patch is from Richard, I rebased it to the up-to-date upstream code, here are the original messages from him: We have just merged Beth's initial buildstats logging work. I was sitting wondering how to actually evaluate the numbers as I wanted to know "where are we spending the time?". It occurred to me that I wanted a graph very similar to that generated by bootchart. I looked around and found pyboootchartgui and then hacked it around a bit and coerced it to start producing charts like: http://tim.rpsys.net/bootchart.png which is the initial "pseudo-native" part of the build. This was simple enough to test with. I then tried graphing a poky-image-sato. To get a graph I could actually read, I stripped out any task taking less than 8 seconds and scaled the x axis from 25 units per second to one unit per second. The result was: http://tim.rpsys.net/bootchart2.png (warning this is a 2.7MB png) I also added in a little bit of colour coding for the second chart. Interestingly it looks like there is more yellow than green meaning configure is a bigger drain on the build time not that its unexpected :/. I quite enjoyed playing with this and on a serious note, the gradient of the task graph makes me a little suspicious of whether the overhead of launching tasks in bitbake itself is having some effect on build time. Certainly on the first graph there are some interesting latencies showing up. Anyhow, I think this is the first time bitbake's task execution has been visualised and there are some interesting things we can learn from it. I'm hoping this is a start of a much more detailed understanding of the build process with respect to performance. [YOCTO #2403] (From OE-Core rev: 6ea0c02d0db08f6b4570769c6811ecdb051646ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/pybootchartgui/pybootchartgui/gui.py')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/gui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py
index 87081e30eb..310c3d1bcc 100644
--- a/scripts/pybootchartgui/pybootchartgui/gui.py
+++ b/scripts/pybootchartgui/pybootchartgui/gui.py
@@ -35,7 +35,7 @@ class PyBootchartWidget(gtk.DrawingArea):
35 self.zoom_ratio = 1.0 35 self.zoom_ratio = 1.0
36 self.x, self.y = 0.0, 0.0 36 self.x, self.y = 0.0, 0.0
37 37
38 self.chart_width, self.chart_height = draw.extents(*res) 38 self.chart_width, self.chart_height = draw.extents(res)
39 self.hadj = None 39 self.hadj = None
40 self.vadj = None 40 self.vadj = None
41 41
@@ -56,7 +56,7 @@ class PyBootchartWidget(gtk.DrawingArea):
56 cr.paint() 56 cr.paint()
57 cr.scale(self.zoom_ratio, self.zoom_ratio) 57 cr.scale(self.zoom_ratio, self.zoom_ratio)
58 cr.translate(-self.x, -self.y) 58 cr.translate(-self.x, -self.y)
59 draw.render(cr, *self.res) 59 draw.render(cr, self.res)
60 60
61 def position_changed(self): 61 def position_changed(self):
62 self.emit("position-changed", self.x, self.y) 62 self.emit("position-changed", self.x, self.y)