summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-unit-core/conf/layer.conf2
-rw-r--r--meta-unit-core/dynamic-layers/unit-profiling-layer/recipes-unit/images/core-image-unit.bbappend2
-rw-r--r--meta-unit-core/recipes-core/packagegroups/packagegroup-unit-systemd.bb1
-rw-r--r--meta-unit-kas/images/unit-poky/beaglebone-yocto/core-image-unit/whinlatter.yml1
-rw-r--r--meta-unit-kas/images/unit-poky/radxa-zero-3e/core-image-unit/whinlatter.yml1
-rw-r--r--meta-unit-kas/images/unit-poky/raspberrypi3-64/core-image-unit/whinlatter.yml1
-rw-r--r--meta-unit-profiling/LICENSE21
-rw-r--r--meta-unit-profiling/conf/layer.conf18
-rw-r--r--meta-unit-profiling/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend3
-rw-r--r--meta-unit-profiling/recipes-core/busybox/busybox/iostat.cfg1
-rw-r--r--meta-unit-profiling/recipes-core/busybox/busybox/mpstat.cfg1
-rw-r--r--meta-unit-profiling/recipes-core/busybox/busybox_%.bbappend4
-rw-r--r--meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-profiling.bb11
-rw-r--r--meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-systemd-profiling.bb8
-rw-r--r--meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/files/unit.conf4
-rw-r--r--meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/systemd-bootchart-conf.bb13
-rw-r--r--meta-unit-profiling/recipes-kernel/linux/files/stats.cfg1
-rw-r--r--meta-unit-profiling/recipes-kernel/linux/linux-yocto_%.bbappend3
-rw-r--r--meta-unit-profiling/recipes-kernel/linux/unit-profiling.inc2
19 files changed, 97 insertions, 1 deletions
diff --git a/meta-unit-core/conf/layer.conf b/meta-unit-core/conf/layer.conf
index 688eda3..fd90f46 100644
--- a/meta-unit-core/conf/layer.conf
+++ b/meta-unit-core/conf/layer.conf
@@ -13,6 +13,8 @@ BBFILES_DYNAMIC += " \
virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/recipes-*/*/*.bbappend \
raspberrypi-extra-layer:${LAYERDIR}/dynamic-layers/raspberrypi-extra-layer/recipes-*/*/*.bb \
raspberrypi-extra-layer:${LAYERDIR}/dynamic-layers/raspberrypi-extra-layer/recipes-*/*/*.bbappend \
+ unit-profiling-layer:${LAYERDIR}/dynamic-layers/unit-profiling-layer/recipes-*/*/*.bb \
+ unit-profiling-layer:${LAYERDIR}/dynamic-layers/unit-profiling-layer/recipes-*/*/*.bbappend \
"
UNIT_CORE_LAYERDIR = "${LAYERDIR}"
diff --git a/meta-unit-core/dynamic-layers/unit-profiling-layer/recipes-unit/images/core-image-unit.bbappend b/meta-unit-core/dynamic-layers/unit-profiling-layer/recipes-unit/images/core-image-unit.bbappend
new file mode 100644
index 0000000..c29de71
--- /dev/null
+++ b/meta-unit-core/dynamic-layers/unit-profiling-layer/recipes-unit/images/core-image-unit.bbappend
@@ -0,0 +1,2 @@
+IMAGE_INSTALL:append = " packagegroup-unit-profiling"
+IMAGE_INSTALL:append = " packagegroup-unit-systemd-profiling"
diff --git a/meta-unit-core/recipes-core/packagegroups/packagegroup-unit-systemd.bb b/meta-unit-core/recipes-core/packagegroups/packagegroup-unit-systemd.bb
index 0641d74..c65bb70 100644
--- a/meta-unit-core/recipes-core/packagegroups/packagegroup-unit-systemd.bb
+++ b/meta-unit-core/recipes-core/packagegroups/packagegroup-unit-systemd.bb
@@ -2,5 +2,4 @@ SUMMARY = "Unit systemd packages"
inherit packagegroup
-RDEPENDS:${PN}:append = " systemd-analyze"
RDEPENDS:${PN}:append = " systemd-conf-journal-persistent-storage"
diff --git a/meta-unit-kas/images/unit-poky/beaglebone-yocto/core-image-unit/whinlatter.yml b/meta-unit-kas/images/unit-poky/beaglebone-yocto/core-image-unit/whinlatter.yml
index 9abba6d..c2c090f 100644
--- a/meta-unit-kas/images/unit-poky/beaglebone-yocto/core-image-unit/whinlatter.yml
+++ b/meta-unit-kas/images/unit-poky/beaglebone-yocto/core-image-unit/whinlatter.yml
@@ -26,4 +26,5 @@ repos:
layers:
meta-unit-core:
meta-unit-distro:
+ meta-unit-profiling:
meta-virtualization-extra:
diff --git a/meta-unit-kas/images/unit-poky/radxa-zero-3e/core-image-unit/whinlatter.yml b/meta-unit-kas/images/unit-poky/radxa-zero-3e/core-image-unit/whinlatter.yml
index 3b4caf0..5024697 100644
--- a/meta-unit-kas/images/unit-poky/radxa-zero-3e/core-image-unit/whinlatter.yml
+++ b/meta-unit-kas/images/unit-poky/radxa-zero-3e/core-image-unit/whinlatter.yml
@@ -36,4 +36,5 @@ repos:
layers:
meta-unit-core:
meta-unit-distro:
+ meta-unit-profiling:
meta-virtualization-extra:
diff --git a/meta-unit-kas/images/unit-poky/raspberrypi3-64/core-image-unit/whinlatter.yml b/meta-unit-kas/images/unit-poky/raspberrypi3-64/core-image-unit/whinlatter.yml
index 846273a..67057a2 100644
--- a/meta-unit-kas/images/unit-poky/raspberrypi3-64/core-image-unit/whinlatter.yml
+++ b/meta-unit-kas/images/unit-poky/raspberrypi3-64/core-image-unit/whinlatter.yml
@@ -30,4 +30,5 @@ repos:
meta-raspberrypi-extra:
meta-unit-core:
meta-unit-distro:
+ meta-unit-profiling:
meta-virtualization-extra:
diff --git a/meta-unit-profiling/LICENSE b/meta-unit-profiling/LICENSE
new file mode 100644
index 0000000..52686ad
--- /dev/null
+++ b/meta-unit-profiling/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 Closed Circuit Consulting
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. \ No newline at end of file
diff --git a/meta-unit-profiling/conf/layer.conf b/meta-unit-profiling/conf/layer.conf
new file mode 100644
index 0000000..1b980ef
--- /dev/null
+++ b/meta-unit-profiling/conf/layer.conf
@@ -0,0 +1,18 @@
+BBPATH .= ":${LAYERDIR}"
+
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "unit-profiling-layer"
+BBFILE_PATTERN_unit-profiling-layer := "^${LAYERDIR}/"
+BBFILE_PRIORITY_unit-profiling-layer = "10"
+
+LAYERDEPENDS_unit-profiling-layer = "core openembedded-layer"
+
+LAYERSERIES_COMPAT_unit-profiling-layer = "whinlatter"
+
+UNIT_PROFILING_LAYERDIR = "${LAYERDIR}"
+
+BBFILES_DYNAMIC += " \
+ raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bb \
+ raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bbappend \
+"
diff --git a/meta-unit-profiling/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-unit-profiling/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
new file mode 100644
index 0000000..20056f9
--- /dev/null
+++ b/meta-unit-profiling/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${UNIT_PROFILING_LAYERDIR}/recipes-kernel/linux/files:"
+
+require recipes-kernel/linux/unit-profiling.inc
diff --git a/meta-unit-profiling/recipes-core/busybox/busybox/iostat.cfg b/meta-unit-profiling/recipes-core/busybox/busybox/iostat.cfg
new file mode 100644
index 0000000..3300ba8
--- /dev/null
+++ b/meta-unit-profiling/recipes-core/busybox/busybox/iostat.cfg
@@ -0,0 +1 @@
+CONFIG_IOSTAT=y
diff --git a/meta-unit-profiling/recipes-core/busybox/busybox/mpstat.cfg b/meta-unit-profiling/recipes-core/busybox/busybox/mpstat.cfg
new file mode 100644
index 0000000..9328d61
--- /dev/null
+++ b/meta-unit-profiling/recipes-core/busybox/busybox/mpstat.cfg
@@ -0,0 +1 @@
+CONFIG_MPSTAT=y
diff --git a/meta-unit-profiling/recipes-core/busybox/busybox_%.bbappend b/meta-unit-profiling/recipes-core/busybox/busybox_%.bbappend
new file mode 100644
index 0000000..fac7c9a
--- /dev/null
+++ b/meta-unit-profiling/recipes-core/busybox/busybox_%.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " file://mpstat.cfg"
+SRC_URI:append = " file://iostat.cfg"
diff --git a/meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-profiling.bb b/meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-profiling.bb
new file mode 100644
index 0000000..6682424
--- /dev/null
+++ b/meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-profiling.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Profiling packages"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+# Performance analysis
+RDEPENDS:${PN}:append = " procps"
+RDEPENDS:${PN}:append = " sysstat"
+
+# Performance testing
+RDEPENDS:${PN}:append = " stress-ng"
diff --git a/meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-systemd-profiling.bb b/meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-systemd-profiling.bb
new file mode 100644
index 0000000..6726266
--- /dev/null
+++ b/meta-unit-profiling/recipes-core/packagegroups/packagegroup-unit-systemd-profiling.bb
@@ -0,0 +1,8 @@
+SUMMARY = "Systemd profiling packages"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+RDEPENDS:${PN}:append = " systemd-bootchart"
+RDEPENDS:${PN}:append = " systemd-bootchart-conf"
+RDEPENDS:${PN}:append = " systemd-analyze"
diff --git a/meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/files/unit.conf b/meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/files/unit.conf
new file mode 100644
index 0000000..62fb8c1
--- /dev/null
+++ b/meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/files/unit.conf
@@ -0,0 +1,4 @@
+[Bootchart]
+PlotMemoryUsage=yes
+PlotEntropyGraph=yes
+Cmdline=yes
diff --git a/meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/systemd-bootchart-conf.bb b/meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/systemd-bootchart-conf.bb
new file mode 100644
index 0000000..31a1f5d
--- /dev/null
+++ b/meta-unit-profiling/recipes-devtools/systemd-bootchart-conf/systemd-bootchart-conf.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Systemd bootchart config drop-in"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${UNIT_PROFILING_LAYERDIR}/LICENSE;md5=a77c12e0c0e8a14cebb1494195720ccc"
+
+SRC_URI = "file://unit.conf"
+
+S = "${UNPACKDIR}"
+
+do_install() {
+ install -D -p -m0644 ${UNPACKDIR}/unit.conf ${D}${sysconfdir}/systemd/bootchart.conf.d/unit.conf
+}
+
+FILES:${PN} = "${sysconfdir}/systemd/bootchart.conf.d/unit.conf"
diff --git a/meta-unit-profiling/recipes-kernel/linux/files/stats.cfg b/meta-unit-profiling/recipes-kernel/linux/files/stats.cfg
new file mode 100644
index 0000000..a9ef3bd
--- /dev/null
+++ b/meta-unit-profiling/recipes-kernel/linux/files/stats.cfg
@@ -0,0 +1 @@
+CONFIG_SCHEDSTATS=y
diff --git a/meta-unit-profiling/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-unit-profiling/recipes-kernel/linux/linux-yocto_%.bbappend
new file mode 100644
index 0000000..ddd34ab
--- /dev/null
+++ b/meta-unit-profiling/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+require unit-profiling.inc
diff --git a/meta-unit-profiling/recipes-kernel/linux/unit-profiling.inc b/meta-unit-profiling/recipes-kernel/linux/unit-profiling.inc
new file mode 100644
index 0000000..113ab23
--- /dev/null
+++ b/meta-unit-profiling/recipes-kernel/linux/unit-profiling.inc
@@ -0,0 +1,2 @@
+# Needed for systemd-bootchart. Ideally only included in development images.
+SRC_URI:append = " file://stats.cfg"