Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
124
sources/poky/scripts/contrib/bb-perf/bb-matrix-plot.sh
Executable file
124
sources/poky/scripts/contrib/bb-perf/bb-matrix-plot.sh
Executable file
@@ -0,0 +1,124 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, Intel Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# DESCRIPTION
|
||||
# This script operates on the .dat file generated by bb-matrix.sh. It tolerates
|
||||
# the header by skipping the first line, but error messages and bad data records
|
||||
# need to be removed first. It will generate three views of the plot, and leave
|
||||
# an interactive view open for further analysis.
|
||||
#
|
||||
# AUTHORS
|
||||
# Darren Hart <dvhart@linux.intel.com>
|
||||
#
|
||||
|
||||
# Setup the defaults
|
||||
DATFILE="bb-matrix.dat"
|
||||
XLABEL="BB\\\\_NUMBER\\\\_THREADS"
|
||||
YLABEL="PARALLEL\\\\_MAKE"
|
||||
FIELD=3
|
||||
DEF_TITLE="Elapsed Time (seconds)"
|
||||
PM3D_FRAGMENT="unset surface; set pm3d at s hidden3d 100"
|
||||
SIZE="640,480"
|
||||
|
||||
function usage {
|
||||
CMD=$(basename $0)
|
||||
cat <<EOM
|
||||
Usage: $CMD [-d datfile] [-f field] [-h] [-t title] [-w]
|
||||
-d datfile The data file generated by bb-matrix.sh (default: $DATFILE)
|
||||
-f field The field index to plot as the Z axis from the data file
|
||||
(default: $FIELD, "$DEF_TITLE")
|
||||
-h Display this help message
|
||||
-s W,H PNG and window size in pixels (default: $SIZE)
|
||||
-t title The title to display, should describe the field (-f) and units
|
||||
(default: "$DEF_TITLE")
|
||||
-w Render the plot as wireframe with a 2D colormap projected on the
|
||||
XY plane rather than as the texture for the surface
|
||||
EOM
|
||||
}
|
||||
|
||||
# Parse and validate arguments
|
||||
while getopts "d:f:hs:t:w" OPT; do
|
||||
case $OPT in
|
||||
d)
|
||||
DATFILE="$OPTARG"
|
||||
;;
|
||||
f)
|
||||
FIELD="$OPTARG"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
s)
|
||||
SIZE="$OPTARG"
|
||||
;;
|
||||
t)
|
||||
TITLE="$OPTARG"
|
||||
;;
|
||||
w)
|
||||
PM3D_FRAGMENT="set pm3d at b"
|
||||
W="-w"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Ensure the data file exists
|
||||
if [ ! -f "$DATFILE" ]; then
|
||||
echo "ERROR: $DATFILE does not exist"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
PLOT_BASENAME=${DATFILE%.*}-f$FIELD$W
|
||||
|
||||
# Set a sane title
|
||||
# TODO: parse the header and define titles for each format parameter for TIME(1)
|
||||
if [ -z "$TITLE" ]; then
|
||||
if [ ! "$FIELD" == "3" ]; then
|
||||
TITLE="Field $FIELD"
|
||||
else
|
||||
TITLE="$DEF_TITLE"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Determine the dgrid3d mesh dimensions size
|
||||
MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | head -n1)
|
||||
MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | tail -n1)
|
||||
BB_CNT=$[${MAX} - $MIN + 1]
|
||||
MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | head -n1)
|
||||
MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | tail -n1)
|
||||
PM_CNT=$[${MAX} - $MIN + 1]
|
||||
|
||||
|
||||
(cat <<EOF
|
||||
set title "$TITLE"
|
||||
set xlabel "$XLABEL"
|
||||
set ylabel "$YLABEL"
|
||||
set style line 100 lt 5 lw 1.5
|
||||
$PM3D_FRAGMENT
|
||||
set dgrid3d $PM_CNT,$BB_CNT splines
|
||||
set ticslevel 0.2
|
||||
|
||||
set term png size $SIZE
|
||||
set output "$PLOT_BASENAME.png"
|
||||
splot "$DATFILE" every ::1 using 1:2:$FIELD with lines ls 100
|
||||
|
||||
set view 90,0
|
||||
set output "$PLOT_BASENAME-bb.png"
|
||||
replot
|
||||
|
||||
set view 90,90
|
||||
set output "$PLOT_BASENAME-pm.png"
|
||||
replot
|
||||
|
||||
set view 60,30
|
||||
set term wxt size $SIZE
|
||||
replot
|
||||
EOF
|
||||
) | gnuplot --persist
|
||||
66
sources/poky/scripts/contrib/bb-perf/bb-matrix.sh
Executable file
66
sources/poky/scripts/contrib/bb-perf/bb-matrix.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, Intel Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# DESCRIPTION
|
||||
# This script runs BB_CMD (typically building core-image-sato) for all
|
||||
# combincations of BB_RANGE and PM_RANGE values. It saves off all the console
|
||||
# logs, the buildstats directories, and creates a bb-pm-runtime.dat file which
|
||||
# can be used to postprocess the results with a plotting tool, spreadsheet, etc.
|
||||
# Before running this script, it is recommended that you pre-download all the
|
||||
# necessary sources by performing the BB_CMD once manually. It is also a good
|
||||
# idea to disable cron to avoid runtime variations caused by things like the
|
||||
# locate process. Be sure to sanitize the dat file prior to post-processing as
|
||||
# it may contain error messages or bad runs that should be removed.
|
||||
#
|
||||
# AUTHORS
|
||||
# Darren Hart <dvhart@linux.intel.com>
|
||||
#
|
||||
|
||||
# The following ranges are appropriate for a 4 core system with 8 logical units
|
||||
# Use leading 0s to ensure all digits are the same string length, this results
|
||||
# in nice log file names and columnar dat files.
|
||||
BB_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16"
|
||||
PM_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16"
|
||||
|
||||
DATADIR="bb-matrix-$$"
|
||||
BB_CMD="bitbake core-image-minimal"
|
||||
RUNTIME_LOG="$DATADIR/bb-matrix.dat"
|
||||
|
||||
# See TIME(1) for a description of the time format parameters
|
||||
# The following all report 0: W K r s t w
|
||||
TIME_STR="%e %S %U %P %c %w %R %F %M %x"
|
||||
|
||||
# Prepare the DATADIR
|
||||
mkdir $DATADIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to create $DATADIR."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Add a simple header
|
||||
echo "BB PM $TIME_STR" > $RUNTIME_LOG
|
||||
for BB in $BB_RANGE; do
|
||||
for PM in $PM_RANGE; do
|
||||
RUNDIR="$DATADIR/$BB-$PM-build"
|
||||
mkdir $RUNDIR
|
||||
BB_LOG=$RUNDIR/$BB-$PM-bitbake.log
|
||||
date
|
||||
echo "BB=$BB PM=$PM Logging to $BB_LOG"
|
||||
|
||||
echo -n " Preparing the work directory... "
|
||||
rm -rf pseudodone tmp sstate-cache tmp-eglibc &> /dev/null
|
||||
echo "done"
|
||||
|
||||
# Export the variables under test and run the bitbake command
|
||||
# Strip any leading zeroes before passing to bitbake
|
||||
export BB_NUMBER_THREADS=$(echo $BB | sed 's/^0*//')
|
||||
export PARALLEL_MAKE="-j $(echo $PM | sed 's/^0*//')"
|
||||
/usr/bin/time -f "$BB $PM $TIME_STR" -a -o $RUNTIME_LOG $BB_CMD &> $BB_LOG
|
||||
|
||||
echo " $(tail -n1 $RUNTIME_LOG)"
|
||||
cp -a tmp/buildstats $RUNDIR/$BB-$PM-buildstats
|
||||
done
|
||||
done
|
||||
160
sources/poky/scripts/contrib/bb-perf/buildstats-plot.sh
Executable file
160
sources/poky/scripts/contrib/bb-perf/buildstats-plot.sh
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2011, Intel Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Produces script data to be consumed by gnuplot. There are two possible plots
|
||||
# depending if either the -S parameter is present or not:
|
||||
#
|
||||
# * without -S: Produces a histogram listing top N recipes/tasks versus
|
||||
# stats. The first stat defined in the -s parameter is the one taken
|
||||
# into account for ranking
|
||||
# * -S: Produces a histogram listing tasks versus stats. In this case,
|
||||
# the value of each stat is the sum for that particular stat in all recipes found.
|
||||
# Stats values are in descending order defined by the first stat defined on -s
|
||||
#
|
||||
# EXAMPLES
|
||||
#
|
||||
# 1. Top recipes' tasks taking into account utime
|
||||
#
|
||||
# $ buildstats-plot.sh -s utime | gnuplot -p
|
||||
#
|
||||
# 2. Tasks versus utime:stime
|
||||
#
|
||||
# $ buildstats-plot.sh -s utime:stime -S | gnuplot -p
|
||||
#
|
||||
# 3. Tasks versus IO write_bytes:IO read_bytes
|
||||
#
|
||||
# $ buildstats-plot.sh -s 'IO write_bytes:IO read_bytes' -S | gnuplot -p
|
||||
#
|
||||
# AUTHORS
|
||||
# Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
|
||||
#
|
||||
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
BS_DIR="tmp/buildstats"
|
||||
N=10
|
||||
RECIPE=""
|
||||
TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack"
|
||||
STATS="utime"
|
||||
ACCUMULATE=""
|
||||
SUM=""
|
||||
OUTDATA_FILE="$PWD/buildstats-plot.out"
|
||||
|
||||
function usage {
|
||||
CMD=$(basename $0)
|
||||
cat <<EOM
|
||||
Usage: $CMD [-b buildstats_dir] [-t do_task]
|
||||
-b buildstats The path where the folder resides
|
||||
(default: "$BS_DIR")
|
||||
-n N Top N recipes to display. Ignored if -S is present
|
||||
(default: "$N")
|
||||
-r recipe The recipe mask to be searched
|
||||
-t tasks The tasks to be computed
|
||||
(default: "$TASKS")
|
||||
-s stats The stats to be matched. If more that one stat, units
|
||||
should be the same because data is plot as histogram.
|
||||
(see buildstats.sh -h for all options) or any other defined
|
||||
(build)stat separated by colons, i.e. stime:utime
|
||||
(default: "$STATS")
|
||||
-a Accumulate all stats values for found recipes
|
||||
-S Sum values for a particular stat for found recipes
|
||||
-o Output data file.
|
||||
(default: "$OUTDATA_FILE")
|
||||
-h Display this help message
|
||||
EOM
|
||||
}
|
||||
|
||||
# Parse and validate arguments
|
||||
while getopts "b:n:r:t:s:o:aSh" OPT; do
|
||||
case $OPT in
|
||||
b)
|
||||
BS_DIR="$OPTARG"
|
||||
;;
|
||||
n)
|
||||
N="$OPTARG"
|
||||
;;
|
||||
r)
|
||||
RECIPE="-r $OPTARG"
|
||||
;;
|
||||
t)
|
||||
TASKS="$OPTARG"
|
||||
;;
|
||||
s)
|
||||
STATS="$OPTARG"
|
||||
;;
|
||||
a)
|
||||
ACCUMULATE="-a"
|
||||
;;
|
||||
S)
|
||||
SUM="y"
|
||||
;;
|
||||
o)
|
||||
OUTDATA_FILE="$OPTARG"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get number of stats
|
||||
IFS=':'; statsarray=(${STATS}); unset IFS
|
||||
nstats=${#statsarray[@]}
|
||||
|
||||
# Get script folder, use to run buildstats.sh
|
||||
CD=$(dirname $0)
|
||||
|
||||
# Parse buildstats recipes to produce a single table
|
||||
OUTBUILDSTATS="$PWD/buildstats.log"
|
||||
$CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $RECIPE $ACCUMULATE -H > $OUTBUILDSTATS
|
||||
|
||||
# Get headers
|
||||
HEADERS=$(cat $OUTBUILDSTATS | sed -n -e 's/\(.*\)/"\1"/' -e '1s/ /\\\\\\\\ /g' -e 's/_/\\\\\\\\_/g' -e '1s/:/" "/gp')
|
||||
|
||||
echo -e "set boxwidth 0.9 relative"
|
||||
echo -e "set style data histograms"
|
||||
echo -e "set style fill solid 1.0 border lt -1"
|
||||
echo -e "set xtics rotate by 45 right"
|
||||
|
||||
# Get output data
|
||||
if [ -z "$SUM" ]; then
|
||||
cat $OUTBUILDSTATS | sed -e '1d' -e 's/_/\\\\_/g' | sort -k3 -n -r | head -$N > $OUTDATA_FILE
|
||||
# include task at recipe column
|
||||
sed -i -e "1i\
|
||||
${HEADERS}" $OUTDATA_FILE
|
||||
echo -e "set title \"Top task/recipes\""
|
||||
echo -e "plot for [COL=3:`expr 3 + ${nstats} - 1`] '${OUTDATA_FILE}' using COL:xtic(stringcolumn(1).' '.stringcolumn(2)) title columnheader(COL)"
|
||||
else
|
||||
|
||||
# Construct datatamash sum argument (sum 3 sum 4 ...)
|
||||
declare -a sumargs
|
||||
j=0
|
||||
for i in `seq $nstats`; do
|
||||
sumargs[j]=sum; j=$(( $j + 1 ))
|
||||
sumargs[j]=`expr 3 + $i - 1`; j=$(( $j + 1 ))
|
||||
done
|
||||
|
||||
# Do the processing with datamash
|
||||
cat $OUTBUILDSTATS | sed -e '1d' | datamash -t ' ' -g1 ${sumargs[*]} | sort -k2 -n -r > $OUTDATA_FILE
|
||||
|
||||
# Include headers into resulted file, so we can include gnuplot xtics
|
||||
HEADERS=$(echo $HEADERS | sed -e 's/recipe//1')
|
||||
sed -i -e "1i\
|
||||
${HEADERS}" $OUTDATA_FILE
|
||||
|
||||
# Plot
|
||||
echo -e "set title \"Sum stats values per task for all recipes\""
|
||||
echo -e "plot for [COL=2:`expr 2 + ${nstats} - 1`] '${OUTDATA_FILE}' using COL:xtic(1) title columnheader(COL)"
|
||||
fi
|
||||
|
||||
167
sources/poky/scripts/contrib/bb-perf/buildstats.sh
Executable file
167
sources/poky/scripts/contrib/bb-perf/buildstats.sh
Executable file
@@ -0,0 +1,167 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, Intel Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# DESCRIPTION
|
||||
# Given 'buildstats' data (generate by bitbake when setting
|
||||
# USER_CLASSES ?= "buildstats" on local.conf), task names and a stats values
|
||||
# (these are the ones preset on the buildstats files), outputs
|
||||
# '<task> <recipe> <value_1> <value_2> ... <value_n>'. The units are the ones
|
||||
# defined at buildstats, which in turn takes data from /proc/[pid] files
|
||||
#
|
||||
# Some useful pipelines
|
||||
#
|
||||
# 1. Tasks with largest stime (Amount of time that this process has been scheduled
|
||||
# in kernel mode) values
|
||||
# $ buildstats.sh -b <buildstats> -s stime | sort -k3 -n -r | head
|
||||
#
|
||||
# 2. Min, max, sum utime (Amount of time that this process has been scheduled
|
||||
# in user mode) per task (in needs GNU datamash)
|
||||
# $ buildstats.sh -b <buildstats> -s utime | datamash -t' ' -g1 min 3 max 3 sum 3 | sort -k4 -n -r
|
||||
#
|
||||
# AUTHORS
|
||||
# Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
|
||||
#
|
||||
|
||||
# Stats, by type
|
||||
TIME="utime:stime:cutime:cstime"
|
||||
IO="IO wchar:IO write_bytes:IO syscr:IO read_bytes:IO rchar:IO syscw:IO cancelled_write_bytes"
|
||||
RUSAGE="rusage ru_utime:rusage ru_stime:rusage ru_maxrss:rusage ru_minflt:rusage ru_majflt:\
|
||||
rusage ru_inblock:rusage ru_oublock:rusage ru_nvcsw:rusage ru_nivcsw"
|
||||
|
||||
CHILD_RUSAGE="Child rusage ru_utime:Child rusage ru_stime:Child rusage ru_maxrss:Child rusage ru_minflt:\
|
||||
Child rusage ru_majflt:Child rusage ru_inblock:Child rusage ru_oublock:Child rusage ru_nvcsw:\
|
||||
Child rusage ru_nivcsw"
|
||||
|
||||
BS_DIR="tmp/buildstats"
|
||||
RECIPE=""
|
||||
TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack"
|
||||
STATS="$TIME"
|
||||
ACCUMULATE=""
|
||||
HEADER="" # No header by default
|
||||
|
||||
function usage {
|
||||
CMD=$(basename $0)
|
||||
cat <<EOM
|
||||
Usage: $CMD [-b buildstats_dir] [-t do_task]
|
||||
-b buildstats The path where the folder resides
|
||||
(default: "$BS_DIR")
|
||||
-r recipe The recipe to be computed
|
||||
-t tasks The tasks to be computed
|
||||
(default: "$TASKS")
|
||||
-s stats The stats to be matched. Options: TIME, IO, RUSAGE, CHILD_RUSAGE
|
||||
or any other defined buildstat separated by colons, i.e. stime:utime
|
||||
(default: "$STATS")
|
||||
Default stat sets:
|
||||
TIME=$TIME
|
||||
IO=$IO
|
||||
RUSAGE=$RUSAGE
|
||||
CHILD_RUSAGE=$CHILD_RUSAGE
|
||||
-a Accumulate all stats values for found recipes
|
||||
-h Display this help message
|
||||
EOM
|
||||
}
|
||||
|
||||
# Parse and validate arguments
|
||||
while getopts "b:r:t:s:aHh" OPT; do
|
||||
case $OPT in
|
||||
b)
|
||||
BS_DIR="$OPTARG"
|
||||
;;
|
||||
r)
|
||||
RECIPE="$OPTARG"
|
||||
;;
|
||||
t)
|
||||
TASKS="$OPTARG"
|
||||
;;
|
||||
s)
|
||||
STATS="$OPTARG"
|
||||
;;
|
||||
a)
|
||||
ACCUMULATE="y"
|
||||
;;
|
||||
H)
|
||||
HEADER="y"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Ensure the buildstats folder exists
|
||||
if [ ! -d "$BS_DIR" ]; then
|
||||
echo "ERROR: $BS_DIR does not exist"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
stats=""
|
||||
IFS=":"
|
||||
for stat in ${STATS}; do
|
||||
case $stat in
|
||||
TIME)
|
||||
stats="${stats}:${TIME}"
|
||||
;;
|
||||
IO)
|
||||
stats="${stats}:${IO}"
|
||||
;;
|
||||
RUSAGE)
|
||||
stats="${stats}:${RUSAGE}"
|
||||
;;
|
||||
CHILD_RUSAGE)
|
||||
stats="${stats}:${CHILD_RUSAGE}"
|
||||
;;
|
||||
*)
|
||||
stats="${STATS}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# remove possible colon at the beginning
|
||||
stats="$(echo "$stats" | sed -e 's/^://1')"
|
||||
|
||||
# Provide a header if required by the user
|
||||
if [ -n "$HEADER" ] ; then
|
||||
if [ -n "$ACCUMULATE" ]; then
|
||||
echo "task:recipe:accumulated(${stats//:/;})"
|
||||
else
|
||||
echo "task:recipe:$stats"
|
||||
fi
|
||||
fi
|
||||
|
||||
for task in ${TASKS}; do
|
||||
task="do_${task}"
|
||||
for file in $(find ${BS_DIR} -type f -path *${RECIPE}*/${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do
|
||||
recipe="$(basename $(dirname $file))"
|
||||
times=""
|
||||
for stat in ${stats}; do
|
||||
[ -z "$stat" ] && { echo "empty stats"; }
|
||||
time=$(sed -n -e "s/^\($stat\): \\(.*\\)/\\2/p" $file)
|
||||
# in case the stat is not present, set the value as NA
|
||||
[ -z "$time" ] && { time="NA"; }
|
||||
# Append it to times
|
||||
if [ -z "$times" ]; then
|
||||
times="${time}"
|
||||
else
|
||||
times="${times} ${time}"
|
||||
fi
|
||||
done
|
||||
if [ -n "$ACCUMULATE" ]; then
|
||||
IFS=' '; valuesarray=(${times}); IFS=':'
|
||||
times=0
|
||||
for value in "${valuesarray[@]}"; do
|
||||
[ "$value" == "NA" ] && { echo "ERROR: stat is not present."; usage; exit 1; }
|
||||
times=$(( $times + $value ))
|
||||
done
|
||||
fi
|
||||
echo "${task} ${recipe} ${times}"
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user