[bitbake-devel] [PATCH] build.py: record time spent executing each function
richard.purdie at linuxfoundation.org
Sun Jan 19 13:17:36 UTC 2020
On Sat, 2020-01-18 at 22:37 +0000, Rasmus Villemoes wrote:
> In order to have a quick way to see if optimizing some task function
> actually has an effect, add a single line to the log file for each
> function executed listing the wallclock, system and user time
> spent. That can also help figure out which parts of a recipe is
> the longest and hence find places that might be worth looking at.
> bitbake already has the --profile/-P option, but that produces an
> enourmous amount of output, and AFAICT only concerns python code, so
> won't help finding suboptimal shell functions.
Shell code is executed by exec_func_shell() so it shows up on the
profiles as executed there. The main shell code is in end task
I'm torn on the patch, its clearly useful for debugging but I'm not
sure we'd want it for general use. This patch will generate a large
amount of data too, its just spread over a lot of places.
As Chris mentions, using self as a variable name is bad practise too.
More information about the bitbake-devel