Skip to contentSkip to conversation

boot-time-analysis-tools: add boot time profiling tools

PATCH Superseded Chitti Babu Theegala 2 participants 4 messages Aug 5 – Aug 10 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 boot-time-analysis-tools: add boot time profiling tools

Add two new recipes from the CentOS Automotive SIG boot-time-analysis-tools project to enable boot time profiling and measurement.

boot-time-analysis-tools:
Python-based toolset for collecting, analyzing and visualizing system boot timing data from the systemd journal. Provides the 'boot_timings' CLI utility which queries D-Bus and the systemd journal to produce structured boot time reports. Depends on python3-dbus and python3-systemd for runtime journal and D-Bus access.

cntvct-log:
Userspace C utility built with Meson that logs ARM CNTVCT_EL0 virtual counter timestamps to correlate hardware-level timing with systemd boot events. Installs [email protected] as a systemd template unit (disabled by default) for on-demand per-instance activation. The service preset file (98-cntvct-log.preset) is installed for system-preset-based enablement.

Both recipes fetch from the same upstream git repository:
https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools

---
Changes in v2:
- Move recipe under meta-oe/dynamic-layers/meta-python to fix layers dependency check (meta-oe must not depend on meta-python unconditionally). Reported by Khem Raj.

---
 .../boot-time-analysis-tools_0.7.1.bb         | 13 +++++++++
 .../cntvct-log_0.7.1.bb                       | 27 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/cntvct-log_0.7.1.bb
meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +13 -0
new file mode 100644
index 0000000000..67dba14897
@@ -0,0 +1,13 @@
+SUMMARY = "Boot time analysis tools from CentOS Automotive SIG"
+REQUIRED_DISTRO_FEATURES = "systemd"   # only build if systemd is in use
+DESCRIPTION = "Tools for analyzing and visualizing system boot time"
+HOMEPAGE = "https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"
+
+SRC_URI = "git://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}"
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+inherit setuptools3
+
+RDEPENDS:${PN} = "python3-dbus python3-systemd "
meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/cntvct-log_0.7.1.bb new file +27 -0
new file mode 100644
index 0000000000..8cf2a4c225
@@ -0,0 +1,27 @@
+SUMMARY = "cntvct-log - ARM virtual counter boot time logger"
+DESCRIPTION = "Userspace tool to log ARM CNTVCT_EL0 counter values for boot time analysis"
+HOMEPAGE = "https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"
+
+SRC_URI = "git://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}"
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+S = "${UNPACKDIR}/cntvct-log-${PV}/cntvct-log"
+
+inherit meson systemd
+
+# Manually install service file if meson.build doesn't handle it
+do_install:append() {
+    if [ -f ${S}/usr/lib/systemd/system/[email protected] ]; then
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${S}/usr/lib/systemd/system/[email protected] \
+            ${D}${systemd_system_unitdir}/[email protected]
+    fi
+}
+
+SYSTEMD_SERVICE:${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+# Explicitly include the service file in the package
+FILES:${PN} += "${systemd_system_unitdir}/[email protected]"
#2 lore raw

ERROR: ParseError at /mnt/b/yoe/master/kas-build/../layers/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ boot-time-analysis-tools_0.7.1.bb:2: unparsed line:
'REQUIRED_DISTRO_FEATURES = "systemd" # only build if systemd is in use'
ERROR: Parsing halted due to errors, see error messages above
P

Quoted 126 lines · Chitti Babu Theegala via lists.openembedded.org

Add two new recipes from the CentOS Automotive SIG boot-time-analysis-tools project to enable boot time profiling and measurement.

boot-time-analysis-tools:
Python-based toolset for collecting, analyzing and visualizing system boot timing data from the systemd journal. Provides the 'boot_timings' CLI utility which queries D-Bus and the systemd journal to produce structured boot time reports. Depends on python3-dbus and python3-systemd for runtime journal and D-Bus access.

cntvct-log:
Userspace C utility built with Meson that logs ARM CNTVCT_EL0 virtual counter timestamps to correlate hardware-level timing with systemd boot events. Installs [email protected] as a systemd template unit (disabled by default) for on-demand per-instance activation. The service preset file (98-cntvct-log.preset) is installed for system-preset-based
enablement.

Both recipes fetch from the same upstream git repository:
https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools

---
Changes in v2:
- Move recipe under meta-oe/dynamic-layers/meta-python to fix layers dependency check (meta-oe must not depend on meta-python unconditionally). Reported by Khem Raj.

---
 .../boot-time-analysis-tools_0.7.1.bb         | 13 +++++++++
 .../cntvct-log_0.7.1.bb                       | 27 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644
meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/
boot-time-analysis-tools_0.7.1.bb
 create mode 100644

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ boot-time-analysis-tools_0.7.1.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ boot-time-analysis-tools_0.7.1.bb
new file mode 100644
index 0000000000..67dba14897
--- /dev/null
+++
b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ boot-time-analysis-tools_0.7.1.bb

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +4 -0
@@ -0,0 +1,13 @@
+SUMMARY = "Boot time analysis tools from CentOS Automotive SIG"
+REQUIRED_DISTRO_FEATURES = "systemd"   # only build if systemd is in use
+DESCRIPTION = "Tools for analyzing and visualizing system boot time"
+HOMEPAGE = "

https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +4 -0
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"
+
+SRC_URI = "git://

gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}
<http://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=$%7BPV%7D>
"

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +5 -0
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+inherit setuptools3
+
+RDEPENDS:${PN} = "python3-dbus python3-systemd "

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb
new file mode 100644
index 0000000000..8cf2a4c225
--- /dev/null
+++
b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb

(quoted diff) +2 -0
@@ -0,0 +1,27 @@
+SUMMARY = "cntvct-log - ARM virtual counter boot time logger"
+DESCRIPTION = "Userspace tool to log ARM CNTVCT_EL0 counter values for

boot time analysis"
+HOMEPAGE = "
https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"

(quoted diff) +2 -0
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM =

"file://../LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"

(quoted diff) +2 -0
+
+SRC_URI = "git://

gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}
<http://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=$%7BPV%7D>
"

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/cntvct-log_0.7.1.bb new file +20 -1
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+S = "${UNPACKDIR}/cntvct-log-${PV}/cntvct-log"
+
+inherit meson systemd
+
+# Manually install service file if meson.build doesn't handle it
+do_install:append() {
+    if [ -f ${S}/usr/lib/systemd/system/[email protected] ]; then
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${S}/usr/lib/systemd/system/[email protected] \
+            ${D}${systemd_system_unitdir}/[email protected]
+    fi
+}
+
+SYSTEMD_SERVICE:${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+# Explicitly include the service file in the package
+FILES:${PN} += "${systemd_system_unitdir}/[email protected]"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group. View/Reply Online (#128798):
https://lists.openembedded.org/g/openembedded-devel/message/128798
Mute This Topic: https://lists.openembedded.org/mt/120606442/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

PATCH v3 1/1 boot-time-analysis-tools: add boot time profiling tools

In reply to Chitti Babu Theegala

Add two new recipes from the CentOS Automotive SIG boot-time-analysis-tools project to enable boot time profiling and measurement.

boot-time-analysis-tools:
Python-based toolset for collecting, analyzing and visualizing system boot timing data from the systemd journal. Provides the 'boot_timings' CLI utility which queries D-Bus and the systemd journal to produce structured boot time reports. Depends on python3-dbus and python3-systemd for runtime journal and D-Bus access.

cntvct-log:
Userspace C utility built with Meson that logs ARM CNTVCT_EL0 virtual counter timestamps to correlate hardware-level timing with systemd boot events. Installs [email protected] as a systemd template unit (disabled by default) for on-demand per-instance activation. The service preset file (98-cntvct-log.preset) is installed for system-preset-based enablement.

Both recipes fetch from the same upstream git repository:
https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools

---
Changes in v2:
- Move recipe under meta-oe/dynamic-layers/meta-python to fix layers dependency check (meta-oe must not depend on meta-python unconditionally). Reported by Khem Raj.

---
 .../boot-time-analysis-tools_0.7.1.bb         | 12 ++++++++
 .../cntvct-log_0.7.1.bb                       | 28 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/cntvct-log_0.7.1.bb
meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +12 -0
new file mode 100644
index 0000000000..87fbd68f78
@@ -0,0 +1,12 @@
+SUMMARY = "Boot time analysis tools from CentOS Automotive SIG"
+DESCRIPTION = "Tools for analyzing and visualizing system boot time"
+HOMEPAGE = "https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"
+
+SRC_URI = "git://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}"
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+inherit setuptools3
+
+RDEPENDS:${PN} = "python3-dbus python3-systemd "
meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/cntvct-log_0.7.1.bb new file +28 -0
new file mode 100644
index 0000000000..434ddc5893
@@ -0,0 +1,28 @@
+SUMMARY = "cntvct-log - ARM virtual counter boot time logger"
+DESCRIPTION = "Userspace tool to log ARM CNTVCT_EL0 counter values for boot time analysis"
+HOMEPAGE = "https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"
+
+SRC_URI = "git://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}"
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+S = "${UNPACKDIR}/cntvct-log-${PV}/cntvct-log"
+
+inherit meson systemd features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+# Manually install service file if meson.build doesn't handle it
+do_install:append() {
+    if [ -f ${S}/usr/lib/systemd/system/[email protected] ]; then
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${S}/usr/lib/systemd/system/[email protected] \
+            ${D}${systemd_system_unitdir}/[email protected]
+    fi
+}
+
+SYSTEMD_SERVICE:${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+# Explicitly include the service file in the package
+FILES:${PN} += "${systemd_system_unitdir}/[email protected]"
#4 lore raw

this fails when systemd is not the init system like what poky has sysvinit

stdio: ERROR: Nothing RPROVIDES 'python3-systemd' (but /srv/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb RDEPENDS on or otherwise requires it)
stdio: ERROR: Nothing RPROVIDES 'boot-time-analysis-tools-dev' (but /srv/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb RDEPENDS on or otherwise requires it)
stdio: ERROR: Nothing RPROVIDES 'boot-time-analysis-tools' (but /srv/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb RDEPENDS on or otherwise requires it)

please test it out and fix it before sending v3.

Quoted 126 lines · Chitti Babu Theegala via lists.openembedded.org

Add two new recipes from the CentOS Automotive SIG boot-time-analysis-tools project to enable boot time profiling and measurement.

boot-time-analysis-tools:
Python-based toolset for collecting, analyzing and visualizing system boot timing data from the systemd journal. Provides the 'boot_timings' CLI utility which queries D-Bus and the systemd journal to produce structured boot time reports. Depends on python3-dbus and python3-systemd for runtime journal and D-Bus access.

cntvct-log:
Userspace C utility built with Meson that logs ARM CNTVCT_EL0 virtual counter timestamps to correlate hardware-level timing with systemd boot events. Installs [email protected] as a systemd template unit (disabled by default) for on-demand per-instance activation. The service preset file (98-cntvct-log.preset) is installed for system-preset-based
enablement.

Both recipes fetch from the same upstream git repository:
https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools

---
Changes in v2:
- Move recipe under meta-oe/dynamic-layers/meta-python to fix layers dependency check (meta-oe must not depend on meta-python unconditionally). Reported by Khem Raj.

---
 .../boot-time-analysis-tools_0.7.1.bb         | 12 ++++++++
 .../cntvct-log_0.7.1.bb                       | 28 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644
meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/
boot-time-analysis-tools_0.7.1.bb
 create mode 100644

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ boot-time-analysis-tools_0.7.1.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ boot-time-analysis-tools_0.7.1.bb
new file mode 100644
index 0000000000..87fbd68f78
--- /dev/null
+++
b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ boot-time-analysis-tools_0.7.1.bb

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +3 -0
@@ -0,0 +1,12 @@
+SUMMARY = "Boot time analysis tools from CentOS Automotive SIG"
+DESCRIPTION = "Tools for analyzing and visualizing system boot time"
+HOMEPAGE = "

https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +4 -0
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"
+
+SRC_URI = "git://

gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}
<http://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=$%7BPV%7D>
"

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/boot-time-analysis-tools_0.7.1.bb new file +5 -0
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+inherit setuptools3
+
+RDEPENDS:${PN} = "python3-dbus python3-systemd "

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb
new file mode 100644
index 0000000000..434ddc5893
--- /dev/null
+++
b/meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/ cntvct-log_0.7.1.bb

(quoted diff) +2 -0
@@ -0,0 +1,28 @@
+SUMMARY = "cntvct-log - ARM virtual counter boot time logger"
+DESCRIPTION = "Userspace tool to log ARM CNTVCT_EL0 counter values for

boot time analysis"
+HOMEPAGE = "
https://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools"

(quoted diff) +2 -0
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM =

"file://../LICENSE;md5=1c2e0cc0dec0b709fe547806b55737b0"

(quoted diff) +2 -0
+
+SRC_URI = "git://

gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=${PV}
<http://gitlab.com/CentOS/automotive/src/boot-time-analysis-tools.git;protocol=https;branch=main;tag=$%7BPV%7D>
"

meta-oe/dynamic-layers/meta-python/recipes-devtools/boot-time-analysis-tools/cntvct-log_0.7.1.bb new file +21 -1
+SRCREV = "2409ce37e7389d8079bdb8740cb6a44b505fb8d4"
+
+S = "${UNPACKDIR}/cntvct-log-${PV}/cntvct-log"
+
+inherit meson systemd features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+# Manually install service file if meson.build doesn't handle it
+do_install:append() {
+    if [ -f ${S}/usr/lib/systemd/system/[email protected] ]; then
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${S}/usr/lib/systemd/system/[email protected] \
+            ${D}${systemd_system_unitdir}/[email protected]
+    fi
+}
+
+SYSTEMD_SERVICE:${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+# Explicitly include the service file in the package
+FILES:${PN} += "${systemd_system_unitdir}/[email protected]"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group. View/Reply Online (#128871):
https://lists.openembedded.org/g/openembedded-devel/message/128871
Mute This Topic: https://lists.openembedded.org/mt/120669348/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-