summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/parsing.py
Commit message (Collapse)AuthorAgeFilesLines
* pybootchartui: Fix python syntax issueRichard Purdie2023-03-161-1/+1
| | | | | | | | | | | Fix: scripts/pybootchartgui/pybootchartgui/parsing.py:134: SyntaxWarning: "is" with a literal. Did you mean "=="? if pid is 0: (From OE-Core rev: c9a6511ae618035b8efad01646e37ba28ce1e3f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: render memory pressure as wellMartin Jansa2022-08-041-0/+5
| | | | | | | | | | * memory pressure is already collected in buildstats, render it as well when available (From OE-Core rev: 42010d0812246a418f30b4f1d9fbd3f374a3bbe9) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: render cpu and io pressureAryaman Gupta2022-06-291-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Add two new, separate charts showing the avg10 and delta total pressure over time for the CPU and IO resources. The height of the avg10 data in each chart represents the percentage of time "some" task was delayed over the specific resource during the last 10 seconds of the build. The height of the delta total data in each chart represents the total time "some" task was delayed since the last sample was collected. If the reduced_proc_pressure data is not present in the buildstats log, then the new charts are not shown at all rather than being present but unpopulated. Note that the delta total graphs may appear "spikey", oscillating from high values to low. This behaviour is fixed in a subsequent commit. (From OE-Core rev: fb9ff46dc3059cb3f4c8df8e4654184c3eab1571) Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com> Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/pybootchartgui: Fix to work with python 3.8Richard Purdie2020-03-151-3/+3
| | | | | | | | | time.clock() was removed in python 3.8, use one of its recommended replacements to fix failures on python 3.8 systems. (From OE-Core rev: f1d4ecce7d3968c5e08c268e3329041d4b647cf6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/pybootchart: Port to python3Richard Purdie2019-05-081-6/+6
| | | | | | | | | | | | | | This updates the pybootchart code (used for viewing build timing profiles) to use python3. The bulk of the changes are to use gi instead of pygtk, i.e. port from gtk+2 to gtk+3. The main change is to make the bootchart widget inherit gtk.Scrollable and change the way the scrollbars are implemented to match the new method upstream. The drawing code used cairo already so can remain unchanged, (From OE-Core rev: 949144681ad7f536732169351cab6d0612e9c566) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: support reading reduced /proc logsPatrick Ohly2016-12-071-0/+31
| | | | | | | | | | | | | | | Pre-processing /proc data during the build considerably reduces the amount of data written to disk: 176KB instead of 4.7MB for a 20 minuted build. Parsing also becomes faster. buildstats.bbclass only writes the reduced logs now, but support for the full /proc files is kept around as reference. (From OE-Core rev: b5e47df9af1ebbb477074587fdeae17eb2f55582) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: simplify drawing of memory usagePatrick Ohly2016-12-071-1/+1
| | | | | | | | | | | | | The internal representation after parsing now matches exactly what the drawing code needs, thus speeding up drawing a bit. However, the main motivation is to store exactly that required information in a more compact file. (From OE-Core rev: ca06e67a0bb5820b38fda4c8dfee20764c1e59ae) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: render disk space usagePatrick Ohly2016-12-071-0/+26
| | | | | | | | | | | | | | | | | | | | | | | This adds a new, separate chart showing the amount of disk space used over time for each volume monitored during the build. The hight of the graph entries represents the delta between current usage and minimal usage during the build. That's more useful than showing just the current usage, because then a graph showing changes in the order of MBs in a volume that is several GB large would be just flat. The legend shows the maximum of those deltas, i.e. maximum amount of space needed for the build. Minor caveat: sampling of disk space usage starts a bit later than the initial task, so the displayed value may be slightly lower than the actual amount of space needed because sampling does not record the actual initial state. (From OE-Core rev: 263d189d066b578debf08b2bd07494a69b70f70d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui/parsing.py: fix error handling in meminfo parserPatrick Ohly2016-12-071-1/+1
| | | | | | | | | | | When matching fails, m.group(0) is invalid and can't be used in the error message. (From OE-Core rev: ddfea21e06a2e6b1a1e766969f8c134a6de7388a) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: show system utilizationPatrick Ohly2016-12-071-17/+44
| | | | | | | | | | | | | | | This enables rendering of the original bootchart charts for CPU, disk and memory usage. It depends on the /proc samples recorded by the updated buildstats.bbclass. Currently, empty charts CPU and disk usage charts are drawn if that data is not present; the memory chart already gets skipped when there's no data, which will also have to be added for the other two. (From OE-Core rev: 233d3e50b361feea07803a9c0f2a691e687c6cd5) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: get rid of __future__ importsEd Bartosh2016-06-031-3/+0
| | | | | | | | | | Removed print_function and with_statement imports from __future__ as they're supported by python 3 by default. (From OE-Core rev: 77ae2daad5d775d710b953cf0c623ce74cb2c274) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: Add option -T to allways use the full timePeter Kjellerstedt2014-01-231-3/+12
| | | | | | | | | | | | When --full-time (or -T) is used, the graph allways shows the full time regardless of which processes are currently shown. This is especially useful in combinationm with the -s flag when outputting to multiple files. (From OE-Core rev: c6e88199ddf2c4ae243d42afc403d28ab56f00f0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: Simplify adding processes to the tracePeter Kjellerstedt2014-01-231-25/+14
| | | | | | | (From OE-Core rev: 5fa869007b5ba762bf5679197cf98b1d14a34a22) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: Make the -s option work againPeter Kjellerstedt2014-01-231-4/+5
| | | | | | | | | [YOCTO #5588] (From OE-Core rev: 8245ceab3acd02618f24665ff5dc203c1e5cce1d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: Make "Show more" show all processesPeter Kjellerstedt2013-11-181-8/+8
| | | | | | | | | | | | | | 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>
* pybootchartgui: No need to do a double list comprehension over filesPeter Kjellerstedt2013-11-181-2/+1
| | | | | | | (From OE-Core rev: bd00a768d88c22eabee90407684f1fb84139acfb) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: Import pybootchartgui 0.14.5Peter Kjellerstedt2013-11-181-163/+628
| | | | | | | | | | | This update the pybootchartgui code to the latest release from its new location at "https://github.com/mmeeks/bootchart". This only imports the relevant parts, and not all of bootchart2. (From OE-Core rev: 6f1568e54a7808b2ab568618fc5bb244249579f1) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/pybootchart: Allow minimum task length to be configured from the ↵Richard Purdie2012-11-201-9/+9
| | | | | | | | | | | | commandline Rather than hardcode the value of "8", allow the minimum task length to be configured from the commandline using the -m option. "-m 0" means all tasks will be graphed. (From OE-Core rev: 30001153d3ce7dadf8f1ec79e634a638a9994518) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/pybootchart: Fix missing entries bugRichard Purdie2012-11-201-8/+21
| | | | | | | | | | | 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>
* pybootchartgui: split the output chart into multiple onesRobert Yang2012-06-151-0/+36
| | | | | | | | | | | | | | | | | | | | Split the output chart into multiple ones to make it more readable, it only works with "-o path", which means that it doesn't work if the user doesn't want to save the chart to the disk. For example: $ ./pybootchartgui.py /path/to/tmp/buildstats/core-image-sato-qemux86/201205301810/ -f svg -s 5 -o /tmp/ bootchart written to /tmp/bootchart_1.svg bootchart written to /tmp/bootchart_2.svg bootchart written to /tmp/bootchart_3.svg bootchart written to /tmp/bootchart_4.svg bootchart written to /tmp/bootchart_5.svg [YOCTO #2403] (From OE-Core rev: 04a34899e1c15a70babd97a3a59ccb9f8af05bad) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: make the build profiling in picturesRobert Yang2012-06-151-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pybootchartgui: add the original codeRobert Yang2012-06-151-0/+223
This is from: http://pybootchartgui.googlecode.com/files/pybootchartgui-r124.tar.gz Will modify it to make the build profiling in pictures. Remove the examples since they would not work any more, and they cost much disk space. [YOCTO #2403] (From OE-Core rev: 1f0791109e1aed715f02945834d6d7fdb9a411b4) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>