Age | Commit message (Collapse) | Author | Files |
|
If a failure occurs early in the task, its possible we can have a
TaskFailed before the TaskStarted event can be triggered. This in
turn causes another traceback as the directory buildstats writes
files into doesn't exist.
Ensure the directory exists so we can see the original error.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It is not guaranteed Linux kernel was configured with process I/O
statistics enabled. If process I/O statistcs are not present, issue
a one time warning and do not attempt to read the non-existing stats
counters.
[YOCTO#9025]
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Add IO stats and getrusage() data to the task statistics. We
also drop the CPU percentage calculation since its pretty arbitrary
and not very accurate/useful.
In particular we can now see the user and sys times as well as the
wall clock times.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The combined build and task data code makes changing things hard, separate
out the functions so that changes can be made to the task data whilst the
build data remains unchanged.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Rather than bb.data and e.data, cleanup to use 'd' and match the
standard coding style.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The current setting and getting of the "name" to use for buildstats is
convoluted and not particularly interesting. We only need this for the
e.getPkgs()[0] component of the path which is the first target listed
on the commandline. This is pretty arbitrary.
If we drop that piece, we can assume BUILDNAME is common for all events
and simply use this and query it. If BUILDNAME did change, that would
be a bug and it should be fixed elsewhere.
Also take the opportunity to share some common code since the function
now has the eventmask.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The existing diskstats data from buildstats simply isn't useful. It
gives stats on the total IO counts on some random disk within the
system. This means that the count includes data from all other tasks
running at the same time and from any other process running on the
system.
I've been unable to find any use for the data so as a start at
reworking the class, remove the related code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* Rename BNFILE and DEVFILE so that they are clearly specific to this
class, since they end up in the global scope
* Use "with open" when opening files consistently
* Use getVar('PF', True) instead of expand('${PF}')
* Drop some unnecessary assignments
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
mkdirhier() doesn't raise an exception if the directory exists, so if it
does raise one we should just be failing, otherwise we're just going
to hit errors later anyway.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* Drop trailing whitespace
* Use spaces around equals in assignments
* Replace an errant tab with spaces
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Started to run into this error on ubuntu 15.04
ERROR: Execution of event handler 'run_buildstats' failed
Traceback (most recent call last):
File "run_buildstats(e)", line 18, in run_buildstats(e=<bb.event.BuildStarted object at 0x7f93341c1b50>)
File "buildstats.bbclass", line 17, in set_device(e=<bb.event.BuildStarted object at 0x7f93341c1b50>)
SystemError: ../Objects/longobject.c:998: bad argument to internal function
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
commandmethod(self.cmds_async, self, options)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/command.py", line 303, in buildTargets
command.cooker.buildTargets(pkgs_to_build, task)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/cooker.py", line 1336, in buildTargets
bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 163, in fire
fire_class_handlers(event, d)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 102, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 76, in execute_handler
ret = handler(event)
File "run_buildstats(e)", line 18, in run_buildstats
File "buildstats.bbclass", line 17, in set_device
SystemError: ../Objects/longobject.c:998: bad argument to internal function
similar to here
http://pycuda.2962900.n2.nabble.com/bad-argument-to-internal-function-td4063274.html
If it is right fix .. Dont know
Change-Id: I84f3a4043ad5246e080dfd7e2f066e5292d4af91
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
To avoid any further inconsistencies between buildstats and buildinfohelper
from toaster, buildstats will measure task duration using the time field
from within the TaskBase events: TaskStarted and TaskSucceeded/TaskFailed.
Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
These have been deprecated for a long time, convert the remaining
references to the correct modules and prepare for removal of the
compatibility support from bitbake.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Now that bitbake supports masking events for event handlers, lets use
this so event handlers are only called for events they care about. This
lets us simplify the code indentation a bit at least as well as mildly
improving the event handling performance.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This file is already opened a few lines previously, so drop the duplicated
call.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
python3 doesn't like files being left open. This updates the code style
to ensure file are closed.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It was pointed out we have a number of weird indentations in the python functions.
This patch cleans up 3, 7 and other weird indentations for the core bbclass files.
It also fixes some wierd (odd) shell function indentation which my searches picked up.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
sed \
-e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data.expand *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In OpenVZ containers (and probably lx containers as well),
the diskstats entry is not even present. Use the "NoLogicalDrive"
introduced by Elizabeth Flanagan in such case.
This allows the bitbaking to occure within such containers.
Signed-off-by: Jean-François Dagenais <jeff.dagenais@gmail.com>
|
|
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
tmpfs/encryptfs/(and most likely, but not confirmed)ramfs TMPDIRs
cause diskstats to choke. No device entry ends up in /proc/diskstats
for these fs types, which ends up causing the failure.
The short term solution is to exclude these fs types from diskstat
collection. Longer term we will want to see if we can collect
meaningful diskio for each of these, and other, use cases, but for
this cleans up Bug 1700.
[YOCTO #1700]
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Corrected YOCTO bug location and format
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Task endtime got left out of recent changes. Adding it back in.
Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This commit adds disk-io statistics functionality on a build
and per-task basis.
It pulls measurements for whatever partition TMPDIR exists on.
This data could be off if SSTATE_DIR and DL_DIR exist on
a different partition/volume.
Notes on what this pulls:
ReadsComp: Total number of reads complete
ReadsMerged: Total number of adjacent reads merged
SectRead: Total number of sectors read
TimeReads: Total number of m/s spent reading
WritesComp: Total number of writes completed
SectWrite: Total number of sectors written
TimeWrite: Total number of m/s spent writing
IOinProgress: Total amount of IO in progress at the time of
we look at /proc/diskstats.
TimeIO: Total number of m/s spent doing IO
WTimeIO: Weighted time doing I/O. From iostats.txt:
"This field is incremented at each I/O start, I/O completion, I/O
merge, or read of these stats by the number of I/Os in progress
(field 9) times the number of milliseconds spent doing I/O since the
last update of this field. This can provide an easy measure of both
I/O completion time and the backlog that may be accumulating."
Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of using subprocess which is problematic, we should use platform
instead.
Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
breaking runqueue somehow
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Used to track some basic build metrics by build and task/event level.
Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
|