Add systemtap package
cover Add systemtap package
Add systemtap, one of the tracing/profiling tools mentioned in the Yocto v1.0 tracing/profiling tools list posted here:
https://lists.yoctoproject.org/pipermail/yocto/2010-November/000281.html
This patch adds the recipe for systemtap support for the architectures that I was able to get working and test - basically x86, x86-64, qemux86, and qemuppc (arm (tried qemuarm) apparently needs some work upstream, and mips isn't supported).
There is an accompanying kernel config patch that's also needed for systemtap to work.
In addition to the systemtap recipe and kernel options posted here, there's also a small amount of setup needed on the host system in order to run systemtap scripts on a target system - basically, installing systemtap on the host. I also hacked up a shell script ('crosstap') to make it easier to compile and execute systemtap scripts on a target system - if you want to use that, you should replace the variables in that script with appropriate values for your system (I actually started out having the build system generate the script, but decided to do that later if it ended up being desirable).
Detailed instructions on the setup as well as the 'crosstap' script can be found in a new section on the wiki I've added for tracing and profiling to the Yocto wiki:
https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#systemtap
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: tzanussi/systemtap.v3
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=tzanussi/systemtap.v3
Thanks,
Tom Zanussi <[email protected]>
---
Tom Zanussi (1):
systemtap: new package
.../conf/distro/include/poky-default-revisions.inc | 1 + meta/recipes-core/tasks/task-poky-tools.bb | 1 + meta/recipes-kernel/systemtap/systemtap_git.bb | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb
PATCH 1/1 systemtap: new package
Add systemtap, a general-purpose script-directed dynamic tracing and performance analysis tool for Linux.
--- .../conf/distro/include/poky-default-revisions.inc | 1 + meta/recipes-core/tasks/task-poky-tools.bb | 1 + meta/recipes-kernel/systemtap/systemtap_git.bb | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb
meta/conf/distro/include/poky-default-revisions.inc +1 -0
@@ -165,6 +165,7 @@ SRCREV_pn-screenshot ??= "292" SRCREV_pn-settings-daemon ??= "2059" SRCREV_pn-swabber-native ??= "a0792390c5d6d5a5bade7ab155c80eef3f30fa52" SRCREV_pn-sysprof ??= "38a6af1f0a45e528fd2842983da71e0f23c70d6a" +SRCREV_pn-systemtap ??= "4ab3a1863bf4f472acae7a809bf2b38d91658aa8" SRCREV_pn-table ??= "4b267533ce16656cba4104fc39dc12709c1bdddf" SRCREV_pn-tasks ??= "ea52d46d691c5fce4473ea4e24a35411381f3a65" TRACECMDREV ?= "6c696cec3f264a9399241b6e648f58bc97117d49"
meta/recipes-core/tasks/task-poky-tools.bb +1 -0
@@ -51,6 +51,7 @@ RRECOMMENDS_task-poky-tools-profile = "\ kernel-module-oprofile \ blktrace \ sysprof \ + systemtap \ " # exmap-console
meta/recipes-kernel/systemtap/systemtap_git.bb new file +28 -0
@@ -0,0 +1,28 @@ +DESCRIPTION = "SystemTap - script-directed dynamic tracing and performance analysis tool for Linux" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "elfutils" + +PR = r0 +PV = "1.4+git${SRCPV}" + +SRC_URI = "git://sources.redhat.com/git/systemtap.git;protocol=git \ + " + +EXTRA_OECONF = "--prefix=${D} --with-libelf=${STAGING_DIR_TARGET} --without-rpm \ + ac_cv_file__usr_include_nss=no \ + ac_cv_file__usr_include_nss3=no \ + ac_cv_file__usr_include_nspr=no \ + ac_cv_file__usr_include_nspr4=no \ + ac_cv_file__usr_include_avahi_client=no \ + ac_cv_file__usr_include_avahi_common=no " + +SRC_URI[md5sum] = "cb202866ed704c44a876d041f788bdee" +SRC_URI[sha256sum] = "8ffe35caec0d937bd23fd78a3a8d94b58907cc0de0330b35e38f9f764815c459" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuppc|emenlow|crownbay|atom-pc|n450)" + +S = "${WORKDIR}/git" + +inherit autotools
Signature · 1 line
1.7.0.4
Re: [PATCH 1/1] systemtap: new package
Quoted 41 lines · Tom Zanussi
Add systemtap, a general-purpose script-directed dynamic tracing and performance analysis tool for Linux.
Signed-off-by Tom Zanussi<[email protected]>--- .../conf/distro/include/poky-default-revisions.inc | 1 + meta/recipes-core/tasks/task-poky-tools.bb | 1 + meta/recipes-kernel/systemtap/systemtap_git.bb | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-)create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb
meta/conf/distro/include/poky-default-revisions.inc +1
-0@@ -165,6 +165,7 @@ SRCREV_pn-screenshot ??= "292" SRCREV_pn-settings-daemon ??= "2059" SRCREV_pn-swabber-native ??= "a0792390c5d6d5a5bade7ab155c80eef3f30fa52" SRCREV_pn-sysprof ??= "38a6af1f0a45e528fd2842983da71e0f23c70d6a" +SRCREV_pn-systemtap ??= "4ab3a1863bf4f472acae7a809bf2b38d91658aa8" SRCREV_pn-table ??= "4b267533ce16656cba4104fc39dc12709c1bdddf" SRCREV_pn-tasks ??= "ea52d46d691c5fce4473ea4e24a35411381f3a65" TRACECMDREV ?= "6c696cec3f264a9399241b6e648f58bc97117d49"meta/recipes-core/tasks/task-poky-tools.bb +1
-0@@ -51,6 +51,7 @@ RRECOMMENDS_task-poky-tools-profile = "\ kernel-module-oprofile \ blktrace \ sysprof \ + systemtap \ " # exmap-consolemeta/recipes-kernel/systemtap/systemtap_git.bb new file +0
-0
meta/recipes-kernel/systemtap/systemtap_git.bb line 5
Quoted 5 lines
meta/recipes-kernel/systemtap/systemtap_git.bb new file +5
-0@@ -0,0 +1,28 @@ +DESCRIPTION = "SystemTap - script-directed dynamic tracing and performance analysis tool for Linux" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "elfutils"
I remember (from a couple years ago) systemtap being very dependent on the elfutils version. Do we need to have a way to indicate a specific version - or minimum version - so that systemtap doesn't suddenly break without a helpful warning?
Otherwise, looks good to me.
Signature · 2 lines
Darren Hart Yocto Linux Kernel
Re: [PATCH 1/1] systemtap: new package
Quoted 44 lines · Darren Hart
Quoted 43 lines · Tom Zanussi
Add systemtap, a general-purpose script-directed dynamic tracing and performance analysis tool for Linux.
Signed-off-by Tom Zanussi<[email protected]>--- .../conf/distro/include/poky-default-revisions.inc | 1 + meta/recipes-core/tasks/task-poky-tools.bb | 1 + meta/recipes-kernel/systemtap/systemtap_git.bb | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-)create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb
meta/conf/distro/include/poky-default-revisions.inc +1
-0@@ -165,6 +165,7 @@ SRCREV_pn-screenshot ??= "292" SRCREV_pn-settings-daemon ??= "2059" SRCREV_pn-swabber-native ??= "a0792390c5d6d5a5bade7ab155c80eef3f30fa52" SRCREV_pn-sysprof ??= "38a6af1f0a45e528fd2842983da71e0f23c70d6a" +SRCREV_pn-systemtap ??= "4ab3a1863bf4f472acae7a809bf2b38d91658aa8" SRCREV_pn-table ??= "4b267533ce16656cba4104fc39dc12709c1bdddf" SRCREV_pn-tasks ??= "ea52d46d691c5fce4473ea4e24a35411381f3a65" TRACECMDREV ?= "6c696cec3f264a9399241b6e648f58bc97117d49"meta/recipes-core/tasks/task-poky-tools.bb +1
-0@@ -51,6 +51,7 @@ RRECOMMENDS_task-poky-tools-profile = "\ kernel-module-oprofile \ blktrace \ sysprof \ + systemtap \ " # exmap-consolemeta/recipes-kernel/systemtap/systemtap_git.bb new file +2
-0@@ -0,0 +1,28 @@ +DESCRIPTION = "SystemTap - script-directed dynamic tracing and performance analysis tool for Linux" +LICENSE = "GPLv2"
Quoted 9 lines
meta/recipes-kernel/systemtap/systemtap_git.bb line 5
Quoted 3 lines
meta/recipes-kernel/systemtap/systemtap_git.bb new file +3
-0+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "elfutils"I remember (from a couple years ago) systemtap being very dependent on the elfutils version. Do we need to have a way to indicate a specific version - or minimum version - so that systemtap doesn't suddenly break without a helpful warning?
Yeah, if it's that fragile, we probably want to lock down a known good version...
Quoted 2 lines
Otherwise, looks good to me.
Thanks for reviewing it!
Tom
Re: [PATCH 1/1] systemtap: new package
In reply to Tom ZanussiQuoted 56 lines · Tom Zanussi
Add systemtap, a general-purpose script-directed dynamic tracing and performance analysis tool for Linux.
Signed-off-by Tom Zanussi<[email protected]>--- .../conf/distro/include/poky-default-revisions.inc | 1 + meta/recipes-core/tasks/task-poky-tools.bb | 1 + meta/recipes-kernel/systemtap/systemtap_git.bb | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-)create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb
meta/conf/distro/include/poky-default-revisions.inc +1
-0@@ -165,6 +165,7 @@ SRCREV_pn-screenshot ??= "292" SRCREV_pn-settings-daemon ??= "2059" SRCREV_pn-swabber-native ??= "a0792390c5d6d5a5bade7ab155c80eef3f30fa52" SRCREV_pn-sysprof ??= "38a6af1f0a45e528fd2842983da71e0f23c70d6a" +SRCREV_pn-systemtap ??= "4ab3a1863bf4f472acae7a809bf2b38d91658aa8" SRCREV_pn-table ??= "4b267533ce16656cba4104fc39dc12709c1bdddf" SRCREV_pn-tasks ??= "ea52d46d691c5fce4473ea4e24a35411381f3a65" TRACECMDREV ?= "6c696cec3f264a9399241b6e648f58bc97117d49"meta/recipes-core/tasks/task-poky-tools.bb +1
-0@@ -51,6 +51,7 @@ RRECOMMENDS_task-poky-tools-profile = "\ kernel-module-oprofile \ blktrace \ sysprof \ + systemtap \ " # exmap-consolemeta/recipes-kernel/systemtap/systemtap_git.bb new file +15
-0@@ -0,0 +1,28 @@ +DESCRIPTION = "SystemTap - script-directed dynamic tracing and performance analysis tool for Linux" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "elfutils" + +PR = r0 +PV = "1.4+git${SRCPV}" + +SRC_URI = "git://sources.redhat.com/git/systemtap.git;protocol=git \ + " + +EXTRA_OECONF = "--prefix=${D} --with-libelf=${STAGING_DIR_TARGET} --without-rpm \ + ac_cv_file__usr_include_nss=no \ + ac_cv_file__usr_include_nss3=no \
meta/recipes-kernel/systemtap/systemtap_git.bb line 25
Quoted 10 lines
meta/recipes-kernel/systemtap/systemtap_git.bb new file +10
-0+ ac_cv_file__usr_include_nspr=no \ + ac_cv_file__usr_include_nspr4=no \ + ac_cv_file__usr_include_avahi_client=no \ + ac_cv_file__usr_include_avahi_common=no " + +SRC_URI[md5sum] = "cb202866ed704c44a876d041f788bdee" +SRC_URI[sha256sum] = "8ffe35caec0d937bd23fd78a3a8d94b58907cc0de0330b35e38f9f764815c459" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuppc|emenlow|crownbay|atom-pc|n450)" +
Tom,
Will this work for PPC hardware also such as the beagleboard? I am just looking at the COMPATIBLE_MACHINE list and wondering.
Recently Richard suggested that we could use regular expressions here and negate the incompatible machine.
The more I think about this, we may need to extend this to work for generalized arches, not just machines. I will work on writing an RFC for this.
Sau!
Quoted 3 lines
meta/recipes-kernel/systemtap/systemtap_git.bb new file +3
-0+S = "${WORKDIR}/git" + +inherit autotools
Re: [PATCH 1/1] systemtap: new package
Quoted 69 lines · Saul
Quoted 56 lines · Tom Zanussi
Add systemtap, a general-purpose script-directed dynamic tracing and performance analysis tool for Linux.
Signed-off-by Tom Zanussi<[email protected]>--- .../conf/distro/include/poky-default-revisions.inc | 1 + meta/recipes-core/tasks/task-poky-tools.bb | 1 + meta/recipes-kernel/systemtap/systemtap_git.bb | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-)create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb
meta/conf/distro/include/poky-default-revisions.inc +1
-0@@ -165,6 +165,7 @@ SRCREV_pn-screenshot ??= "292" SRCREV_pn-settings-daemon ??= "2059" SRCREV_pn-swabber-native ??= "a0792390c5d6d5a5bade7ab155c80eef3f30fa52" SRCREV_pn-sysprof ??= "38a6af1f0a45e528fd2842983da71e0f23c70d6a" +SRCREV_pn-systemtap ??= "4ab3a1863bf4f472acae7a809bf2b38d91658aa8" SRCREV_pn-table ??= "4b267533ce16656cba4104fc39dc12709c1bdddf" SRCREV_pn-tasks ??= "ea52d46d691c5fce4473ea4e24a35411381f3a65" TRACECMDREV ?= "6c696cec3f264a9399241b6e648f58bc97117d49"meta/recipes-core/tasks/task-poky-tools.bb +1
-0@@ -51,6 +51,7 @@ RRECOMMENDS_task-poky-tools-profile = "\ kernel-module-oprofile \ blktrace \ sysprof \ + systemtap \ " # exmap-consolemeta/recipes-kernel/systemtap/systemtap_git.bb new file +15
-0@@ -0,0 +1,28 @@ +DESCRIPTION = "SystemTap - script-directed dynamic tracing and performance analysis tool for Linux" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "elfutils" + +PR = r0 +PV = "1.4+git${SRCPV}" + +SRC_URI = "git://sources.redhat.com/git/systemtap.git;protocol=git \ + " + +EXTRA_OECONF = "--prefix=${D} --with-libelf=${STAGING_DIR_TARGET} --without-rpm \ + ac_cv_file__usr_include_nss=no \ + ac_cv_file__usr_include_nss3=no \meta/recipes-kernel/systemtap/systemtap_git.bb line 25
Quoted 10 lines
meta/recipes-kernel/systemtap/systemtap_git.bb new file +10
-0+ ac_cv_file__usr_include_nspr=no \ + ac_cv_file__usr_include_nspr4=no \ + ac_cv_file__usr_include_avahi_client=no \ + ac_cv_file__usr_include_avahi_common=no " + +SRC_URI[md5sum] = "cb202866ed704c44a876d041f788bdee" +SRC_URI[sha256sum] = "8ffe35caec0d937bd23fd78a3a8d94b58907cc0de0330b35e38f9f764815c459" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuppc|emenlow|crownbay|atom-pc|n450)" +Tom,
Quoted 3 lines
Will this work for PPC hardware also such as the beagleboard? I am just looking at the
COMPATIBLE_MACHINElist and wondering.
I only included the machines I was able to test directly (or were close enough to what I tested).
I did test qemuarm, and while a simple helloworld script worked, the other ones didn't, so I concluded that arm systemtap support was broken, and probably wouldn't work on real arm hardware either, so I didn't include any as compatible machines. There was a single consistent compile error with the other scripts on qemuarm, so it's probably a simple fix, but who knows - it's something to look into and submit patches to systemtap if/when we want to get that working...
qemuppc worked fine, but that's all I have wrt that arch, so included only that.
Tom
Quoted 13 lines
Recently Richard suggested that we could use regular expressions here and negate the incompatible machine.
The more I think about this, we may need to extend this to work for generalized arches, not just machines. I will work on writing an RFC for this.
Sau!
Quoted 3 lines
meta/recipes-kernel/systemtap/systemtap_git.bb new file +3
-0+S = "${WORKDIR}/git" + +inherit autotools
Saul Wold
AppliedQuoted 45 lines · Tom Zanussi
Add systemtap, one of the tracing/profiling tools mentioned in the Yocto v1.0 tracing/profiling tools list posted here:
https://lists.yoctoproject.org/pipermail/yocto/2010-November/000281.html
This patch adds the recipe for systemtap support for the architectures that I was able to get working and test - basically x86, x86-64, qemux86, and qemuppc (arm (tried qemuarm) apparently needs some work upstream, and mips isn't supported).
There is an accompanying kernel config patch that's also needed for systemtap to work.
In addition to the systemtap recipe and kernel options posted here, there's also a small amount of setup needed on the host system in order to run systemtap scripts on a target system - basically, installing systemtap on the host. I also hacked up a shell script ('crosstap') to make it easier to compile and execute systemtap scripts on a target system - if you want to use that, you should replace the variables in that script with appropriate values for your system (I actually started out having the build system generate the script, but decided to do that later if it ended up being desirable).
Detailed instructions on the setup as well as the 'crosstap' script can be found in a new section on the wiki I've added for tracing and profiling to the Yocto wiki:
https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#systemtap
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: tzanussi/systemtap.v3
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=tzanussi/systemtap.v3Thanks,
Tom Zanussi<[email protected]>
---Tom Zanussi (1):
systemtap: new package.../conf/distro/include/poky-default-revisions.inc | 1 + meta/recipes-core/tasks/task-poky-tools.bb | 1 + meta/recipes-kernel/systemtap/systemtap_git.bb | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-)
Quoted 7 lines
create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Merged into Master
Sau!