Pull request for branch for-2012.02/lttng
Hello,
Here is a set of patches that integrate the new generation LTTng tracing infrastructure into Buildroot. There are several components in this infrastructure:
* lttng-modules are kernel modules that implement the kernel side of lttng. So far they are compatible with 2.6.38, 2.6.39, 3.0 and 3.1, and they don't require any kernel patches, they are simple external kernel modules.
* lttng-tools are the userspace tools to start/stop and configure tracing sessions. They are typically installed on the target.
* liburcu is an implementation of the RCU algorithm in userspace, used by lttng-tools.
* lttng-babeltrace is the utility that allows to convert the binary traces generated by lttng-tools into a human-readable text format. A host variant of lttng-babeltrace is automatically built as a dependency of lttng-tools, because running babeltrace on the host machine is probably the most common use case. But building lttng-babeltrace for the target is also possible.
* lttng-libust is an userspace library that allows applications to create their own trace events, which are combined with all other kernel events by lttng.
Some updates to the popt and util-linux packages are also required in order to have an host variant of those packages, required to build the host variant of lttng-babeltrace.
See http://lttng.org/lttng2.0 for more details.
Changes since v1:
* Remove 'bleh.patch', leftover from previous tests/debugging.
* Fix indentation in Config.in files
* Make sure each file ends with a newline
Regards,
Thomas
The following changes since commit ef3fe1bef6581c66af3858d540343e011cb9fdd6:
cdrkit: bump to version 1.1.11 and adjust style (2011-12-21 23:02:31 +0100)
are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git for-2012.02/lttng
Thomas Petazzoni (7):
liburcu: new package
lttng-modules: new package
lttng-tools: new package
popt: add host variant for host-lttng-babeltrace
util-linux: add host variant for host-lttng-babeltrace
lttng-babeltrace: new package
lttng-libust: new package
package/Config.in | 5 ++++ package/liburcu/Config.in | 9 +++++++ package/liburcu/liburcu.mk | 8 ++++++ package/lttng-babeltrace/Config.in | 22 ++++++++++++++++ package/lttng-babeltrace/lttng-babeltrace.mk | 17 +++++++++++++ package/lttng-libust/Config.in | 10 +++++++ .../lttng-libust-fix-overflow-32-bits.patch | 26 ++++++++++++++++++++ package/lttng-libust/lttng-libust.mk | 8 ++++++ package/lttng-modules/Config.in | 18 +++++++++++++ package/lttng-modules/lttng-modules.mk | 16 ++++++++++++ package/lttng-tools/Config.in | 19 ++++++++++++++ package/lttng-tools/lttng-tools.mk | 12 +++++++++ package/popt/popt.mk | 1 + package/util-linux/util-linux.mk | 9 +++++++ 14 files changed, 180 insertions(+), 0 deletions(-) create mode 100644 package/liburcu/Config.in create mode 100644 package/liburcu/liburcu.mk create mode 100644 package/lttng-babeltrace/Config.in create mode 100644 package/lttng-babeltrace/lttng-babeltrace.mk create mode 100644 package/lttng-libust/Config.in create mode 100644 package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch create mode 100644 package/lttng-libust/lttng-libust.mk create mode 100644 package/lttng-modules/Config.in create mode 100644 package/lttng-modules/lttng-modules.mk create mode 100644 package/lttng-tools/Config.in create mode 100644 package/lttng-tools/lttng-tools.mk
Thanks,
Signature · 1 line
Thomas Petazzoni
PATCH 1/7 liburcu: new package
--- package/Config.in | 1 + package/liburcu/Config.in | 9 +++++++++ package/liburcu/liburcu.mk | 8 ++++++++ 3 files changed, 18 insertions(+), 0 deletions(-) create mode 100644 package/liburcu/Config.in create mode 100644 package/liburcu/liburcu.mk
package/Config.in +1 -0
@@ -365,6 +365,7 @@ source "package/libffi/Config.in" source "package/libglib2/Config.in" source "package/libnspr/Config.in" source "package/libsigc/Config.in" +source "package/liburcu/Config.in" source "package/orc/Config.in" source "package/poco/Config.in" source "package/startup-notification/Config.in"
package/liburcu/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBURCU + bool "liburcu" + help + Userspace implementation of the Read-Copy-Update (RCU) + synchronization mechanism. This library is mainly used by + the LTTng tracing infrastructure, but can be used for other + purposes as well. + + http://lttng.org/urcu
package/liburcu/liburcu.mk new file +8 -0
@@ -0,0 +1,8 @@ +LIBURCU_VERSION = 0.6.7 +LIBURCU_SITE = http://lttng.org/files/bundles/20111214/ +LIBURCU_SOURCE = userspace-rcu-$(LIBURCU_VERSION).tar.bz2 + +LIBURCU_INSTALL_STAGING = YES + +$(eval $(call AUTOTARGETS)) +
Signature · 1 line
1.7.4.1
PATCH 2/7 lttng-modules: new package
In reply to Thomas Petazzoni--- package/Config.in | 1 + package/lttng-modules/Config.in | 18 ++++++++++++++++++ package/lttng-modules/lttng-modules.mk | 16 ++++++++++++++++ 3 files changed, 35 insertions(+), 0 deletions(-) create mode 100644 package/lttng-modules/Config.in create mode 100644 package/lttng-modules/lttng-modules.mk
package/Config.in +1 -0
@@ -24,6 +24,7 @@ source "package/kexec/Config.in" source "package/lmbench/Config.in" source "package/lsof/Config.in" source "package/ltp-testsuite/Config.in" +source "package/lttng-modules/Config.in" source "package/ltrace/Config.in" source "package/memstat/Config.in" source "package/netperf/Config.in"
package/lttng-modules/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_LTTNG_MODULES + bool "lttng-modules" + depends on BR2_LINUX_KERNEL + help + Kernel modules for the LTTng 2.0 kernel tracing + infrastructure. + + Your kernel must have CONFIG_TRACEPOINTS enabled for this + package to build something useful. You may also want to have + CONFIG_PERF_EVENTS to access perf event counters from + ltt-ng. Note that system call tracing is only available on + architectures that support CONFIG_HAVE_SYSCALL_TRACEPOINTS. + + The packaged version is compatible with kernel 2.6.38, + 2.6.39, 3.0 and 3.1.0. See + http://lttng.org/files/bundles/20111214/README.compatible.kernels.txt + + http://lttng.org
package/lttng-modules/lttng-modules.mk new file +16 -0
@@ -0,0 +1,16 @@ +LTTNG_MODULES_VERSION = 2.0-pre11 +LTTNG_MODULES_SITE = http://lttng.org/files/bundles/20111214/ +LTTNG_MODULES_SOURCE = lttng-modules-$(LTTNG_MODULES_VERSION).tar.bz2 + +LTTNG_MODULES_DEPENDENCIES = linux + +define LTTNG_MODULES_BUILD_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) +endef + +define LTTNG_MODULES_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) modules_install +endef + +$(eval $(call GENTARGETS)) +
Signature · 1 line
1.7.4.1
PATCH 2/7 lttng-modules: new package
Hi Thomas,
Quoted 53 lines · Thomas Petazzoni
Signed-off-by Thomas Petazzoni <[email protected]>---
?package/Config.in ? ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?package/lttng-modules/Config.in ? ? ? ?| ? 18 ++++++++++++++++++ ?package/lttng-modules/lttng-modules.mk | ? 16 ++++++++++++++++?3 files changed, 35 insertions(+), 0 deletions(-) ?create mode 100644 package/lttng-modules/Config.in ?create mode 100644
package/lttng-modules/lttng-modules.mkpackage/Config.in +0
-0@@ -24,6 +24,7 @@ source "package/kexec/Config.in"?source "package/lmbench/Config.in"
?source "package/lsof/Config.in"
?source "package/ltp-testsuite/Config.in"
+source "package/lttng-modules/Config.in"
?source "package/ltrace/Config.in"
?source "package/memstat/Config.in"
?source "package/netperf/Config.in"package/lttng-modules/Config.in new file +18
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_LTTNG_MODULES + ? ? ? bool "lttng-modules" + ? ? ? depends on BR2_LINUX_KERNEL + ? ? ? help + ? ? ? ? Kernel modules for the LTTng 2.0 kernel tracing + ? ? ? ? infrastructure. + + ? ? ? ? Your kernel must have CONFIG_TRACEPOINTS enabled for this + ? ? ? ? package to build something useful. You may also want to have + ? ? ? ? CONFIG_PERF_EVENTS to access perf event counters from + ? ? ? ? ltt-ng. Note that system call tracing is only available on + ? ? ? ? architectures that support CONFIG_HAVE_SYSCALL_TRACEPOINTS. + + ? ? ? ? The packaged version is compatible with kernel 2.6.38, + ? ? ? ? 2.6.39, 3.0 and 3.1.0. See + ? ? ? ? http://lttng.org/files/bundles/20111214/README.compatible.kernels.txt + + ? ? ? ? http://lttng.orgpackage/lttng-modules/lttng-modules.mk new file +2
-0@@ -0,0 +1,16 @@ +LTTNG_MODULES_VERSION = 2.0-pre11 +LTTNG_MODULES_SITE ? ?= http://lttng.org/files/bundles/20111214/
package/lttng-modules/lttng-modules.mk line 12
Quoted 10 lines
package/lttng-modules/lttng-modules.mk new file +10
-0+LTTNG_MODULES_SOURCE ?= lttng-modules-$(LTTNG_MODULES_VERSION).tar.bz2 + +LTTNG_MODULES_DEPENDENCIES = linux + +define LTTNG_MODULES_BUILD_CMDS + ? ? ? $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) +endef + +define LTTNG_MODULES_INSTALL_TARGET_CMDS + ? ? ? $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) modules_install
On an old system, I have noticed a problem with this approach. With the above line, the 'depmod' utility of the host will be used instead of the depmod that was built with the linux kernel in $(LINUX_DIR). If the host depmod is very old, a segmentation fault occurs.
To fix this, one should add DEPMOD="$(HOST_DIR)/usr/sbin/depmod" to the command, just as linux/linux.mk does it.
In fact, since building kernel modules from buildroot is not uncommon anymore (there are some packages in the tree that do it, plus user-specific packages, wouldn't it be a good idea to provide a small infrastructure for building kernel modules? This would prevent such mistakes. Instead of gentargets, we could have something like kernelmodule.
What do you think about that?
Best regards,
Thomas
Quoted 11 lines
package/lttng-modules/lttng-modules.mk new file +4
-1+endef + +$(eval $(call GENTARGETS)) + --1.7.4.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/7 lttng-modules: new package
Le Thu, 22 Dec 2011 14:03:14 +0100,
Thomas De Schampheleire <[email protected]> a ?crit :
Quoted 7 lines
On an old system, I have noticed a problem with this approach. With the above line, the 'depmod' utility of the host will be used instead of the depmod that was built with the linux kernel in $(LINUX_DIR). If the host depmod is very old, a segmentation fault occurs.
To fix this, one should add DEPMOD="$(HOST_DIR)/usr/sbin/depmod" to the command, just as
linux/linux.mkdoes it.
Ah, ok. Then maybe this DEPMOD=... variable should be part of LINUX_MAKE_FLAGS.
Quoted 7 lines
In fact, since building kernel modules from buildroot is not uncommon anymore (there are some packages in the tree that do it, plus user-specific packages, wouldn't it be a good idea to provide a small infrastructure for building kernel modules? This would prevent such mistakes. Instead of gentargets, we could have something like kernelmodule.
What do you think about that?
I don't know. I am not exactly sure because there is no real standard way for packaging external kernel modules. If you look at linux-fusion, RTAI or lttng-modules, you'll see that the build mechanism is very different. I'm not sure there is a real pattern here that we can factorize nicely in an infrastructure. Which pattern do you see?
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/7 lttng-modules: new package
Quoted 8 lines · On Thursday 22 December 2011 14:16:05 Thomas Petazzoni wrote:
Quoted 7 lines
In fact, since building kernel modules from buildroot is not uncommon anymore (there are some packages in the tree that do it, plus user-specific packages, wouldn't it be a good idea to provide a small infrastructure for building kernel modules? This would prevent such mistakes. Instead of gentargets, we could have something like kernelmodule.
What do you think about that?
Quoted 5 lines
I don't know. I am not exactly sure because there is no real standard way for packaging external kernel modules. If you look at linux-fusion, RTAI or lttng-modules, you'll see that the build mechanism is very different. I'm not sure there is a real pattern here that we can factorize nicely in an infrastructure. Which pattern do you see?
RTAI is different because it is much more than a kernel module. But I
do see a pattern for linux-fusion, lttng-modules and others I've been using locally. They generally have a Makefile that tries to be smart about the kernel sources, and eventually calls a sub-make as
$(MAKE) -C $(KERNELDIR) M=$(PWD) <extracflags> <target>
I think we can do the latter directly from buildroot.
In some cases there is a user-space component in the same package, but
that normally can be built separately as well.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 3/7 lttng-tools: new package
In reply to Thomas Petazzoni--- package/Config.in | 1 + package/lttng-tools/Config.in | 19 +++++++++++++++++++ package/lttng-tools/lttng-tools.mk | 12 ++++++++++++ 3 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 package/lttng-tools/Config.in create mode 100644 package/lttng-tools/lttng-tools.mk
package/Config.in +1 -0
@@ -25,6 +25,7 @@ source "package/lmbench/Config.in" source "package/lsof/Config.in" source "package/ltp-testsuite/Config.in" source "package/lttng-modules/Config.in" +source "package/lttng-tools/Config.in" source "package/ltrace/Config.in" source "package/memstat/Config.in" source "package/netperf/Config.in"
package/lttng-tools/Config.in new file +19 -0
@@ -0,0 +1,19 @@ +config BR2_PACKAGE_LTTNG_TOOLS + bool "lttng-tools" + depends on BR2_PACKAGE_LTTNG_MODULES + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_POPT + help + Userspace utilities for the LTTng 2.0 tracing + infrastructure. + + Those utilities are required on the target system to start + and stop tracing sessions. Analysis of the trace can be done + on the host machine using the babeltrace utility. This + utility is automatically built by Buildroot in + $(O)/host/usr/bin/babeltrace, as a dependency of + lttng-tools. However, there is also a lttng-babeltrace + package for the target, if babeltrace on the target is + interesting. + + http://lttng.org
package/lttng-tools/lttng-tools.mk new file +12 -0
@@ -0,0 +1,12 @@ +LTTNG_TOOLS_VERSION = 2.0-pre15 +LTTNG_TOOLS_SITE = http://lttng.org/files/bundles/20111214/ +LTTNG_TOOLS_SOURCE = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2 + +# The host-lttng-babeltrace technically isn't a required build +# dependency. However, having the babeltrace utilities built for the +# host is very useful, since those tools allow to convert the binary +# trace format into an human readable format. +LTTNG_TOOLS_DEPENDENCIES = liburcu popt host-lttng-babeltrace + +$(eval $(call AUTOTARGETS)) +
Signature · 1 line
1.7.4.1
PATCH 4/7 popt: add host variant for host-lttng-babeltrace
In reply to Thomas Petazzoni--- package/popt/popt.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
package/popt/popt.mk +1 -0
@@ -16,3 +16,4 @@ POPT_CONF_OPT += --with-libiconv-prefix=$(STAGING_DIR)/usr endif $(eval $(call AUTOTARGETS)) +$(eval $(call AUTOTARGETS,host))
Signature · 1 line
1.7.4.1
PATCH 5/7 util-linux: add host variant for host-lttng-babeltrace
In reply to Thomas Petazzonilttng-babeltrace needs libuuid, which is provided by util-linux, and since we want to build lttng-babeltrace for the host, we need to build libuuid for the host. It's a shame that libuuid is part of such a big package as util-linux.
--- package/util-linux/util-linux.mk | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
package/util-linux/util-linux.mk +9 -0
@@ -67,7 +67,16 @@ UTIL_LINUX_CONF_OPT += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-login-utils) \ $(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write) +HOST_UTIL_LINUX_CONF_OPT += \ + --enable-libuuid \ + --disable-mount --disable-fsck --disable-libmount \ + --disable-uuidd --disable-libblkid --disable-agetty \ + --disable-cramfs --disable-switch_root --disable-pivot_root \ + --disable-fallocate --disable-unshare --disable-rename \ + --disable-schedutils --disable-wall --disable-partx + $(eval $(call AUTOTARGETS)) +$(eval $(call AUTOTARGETS,host)) # MKINSTALLDIRS comes from tweaked m4/nls.m4, but autoreconf uses staging # one, so it disappears
Signature · 1 line
1.7.4.1
PATCH 5/7 util-linux: add host variant for host-lttng-babeltrace
Quoted 16 lines · On Thursday 22 December 2011 10:57:21 Thomas Petazzoni wrote:
lttng-babeltrace needs libuuid, which is provided by util-linux, and since we want to build lttng-babeltrace for the host, we need to build libuuid for the host. It's a shame that libuuid is part of such a big package as util-linux.
Signed-off-by Thomas Petazzoni <[email protected]>--- package/util-linux/util-linux.mk | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)package/util-linux/util-linux.mk +0
-0@@ -67,7 +67,16 @@ UTIL_LINUX_CONF_OPT += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-login-utils) \
package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPT += \ · line 77
Quoted 10 lines
package/util-linux/util-linux.mk +8
-0$(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write) +HOST_UTIL_LINUX_CONF_OPT += \ + --enable-libuuid \ + --disable-mount --disable-fsck --disable-libmount \ + --disable-uuidd --disable-libblkid --disable-agetty \ + --disable-cramfs --disable-switch_root --disable-pivot_root \ + --disable-fallocate --disable-unshare --disable-rename \ + --disable-schedutils --disable-wall --disable-partx +
I would put (part of) the comment of the commit message right here in the
mk file. Else, two years down the road someone will look at this and wonder what the hell is going on...
Regards,
Arnout
Quoted 6 lines
package/util-linux/util-linux.mk +1
-0$(eval $(call AUTOTARGETS)) +$(eval $(call AUTOTARGETS,host)) # MKINSTALLDIRS comes from tweaked m4/nls.m4, but autoreconf uses staging # one, so it disappears
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 5/7 util-linux: add host variant for host-lttng-babeltrace
Le Thu, 12 Jan 2012 23:12:13 +0100,
Arnout Vandecappelle <[email protected]> a ?crit :
Quoted 3 lines
I would put (part of) the comment of the commit message right here
in the mk file. Else, two years down the road someone will look at this and wonder what the hell is going on...
Good idea, will do.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 6/7 lttng-babeltrace: new package
In reply to Thomas Petazzoni--- package/Config.in | 1 + package/lttng-babeltrace/Config.in | 22 ++++++++++++++++++++++ package/lttng-babeltrace/lttng-babeltrace.mk | 17 +++++++++++++++++ 3 files changed, 40 insertions(+), 0 deletions(-) create mode 100644 package/lttng-babeltrace/Config.in create mode 100644 package/lttng-babeltrace/lttng-babeltrace.mk
package/Config.in +1 -0
@@ -24,6 +24,7 @@ source "package/kexec/Config.in" source "package/lmbench/Config.in" source "package/lsof/Config.in" source "package/ltp-testsuite/Config.in" +source "package/lttng-babeltrace/Config.in" source "package/lttng-modules/Config.in" source "package/lttng-tools/Config.in" source "package/ltrace/Config.in"
package/lttng-babeltrace/Config.in new file +22 -0
@@ -0,0 +1,22 @@ +config BR2_PACKAGE_LTTNG_BABELTRACE + bool "lttng-babeltrace" + depends on BR2_PACKAGE_LTTNG_TOOLS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_LIBGLIB2 + help + Babeltrace is part of the LTTng 2.x project. + + This project provides trace read and write libraries, as + well as a trace converter. A plugin can be created for any + trace format to allow its conversion to/from another trace + format. + + Having this tool on the target is not mandatory. You can + transfer the binary trace output from the target to your + development workstation, and use babeltrace here. Buildroot + automatically builds a host babeltrace in + $(O)/host/usr/bin/babeltrace as a dependency of the + lttng-tools package. + + http://lttng.org
package/lttng-babeltrace/lttng-babeltrace.mk new file +17 -0
@@ -0,0 +1,17 @@ +LTTNG_BABELTRACE_SITE = http://lttng.org/files/bundles/20111214/ +LTTNG_BABELTRACE_VERSION = 0.8 +LTTNG_BABELTRACE_SOURCE = babeltrace-$(LTTNG_BABELTRACE_VERSION).tar.bz2 + +# Needed to fix libtool handling, otherwise the build fails when +# building the ctf-parser-test program, which depends on libctf-ast.so +# which itself depends on libbabeltrace_types.so.0 (and libtool gets +# lost in the middle of this). +LTTNG_BABELTRACE_AUTORECONF = YES +HOST_LTTNG_BABELTRACE_AUTORECONF = YES + +LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2 + +HOST_LTTNG_BABELTRACE_DEPENDENCIES = host-popt host-libglib2 host-util-linux + +$(eval $(call AUTOTARGETS)) +$(eval $(call AUTOTARGETS,host))
Signature · 1 line
1.7.4.1
PATCH 7/7 lttng-libust: new package
In reply to Thomas Petazzoni--- package/Config.in | 1 + package/lttng-libust/Config.in | 10 +++++++ .../lttng-libust-fix-overflow-32-bits.patch | 26 ++++++++++++++++++++ package/lttng-libust/lttng-libust.mk | 8 ++++++ 4 files changed, 45 insertions(+), 0 deletions(-) create mode 100644 package/lttng-libust/Config.in create mode 100644 package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch create mode 100644 package/lttng-libust/lttng-libust.mk
package/Config.in +1 -0
@@ -369,6 +369,7 @@ source "package/libglib2/Config.in" source "package/libnspr/Config.in" source "package/libsigc/Config.in" source "package/liburcu/Config.in" +source "package/lttng-libust/Config.in" source "package/orc/Config.in" source "package/poco/Config.in" source "package/startup-notification/Config.in"
package/lttng-libust/Config.in new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_LTTNG_LIBUST + bool "lttng-libust" + select BR2_PACKAGE_LIBURCU + help + Userspace tracing library for the Lttng tracing + infrastructure. It allows userspace programs to create + custom trace events that are integrated with all other + events gathered by LTTng. + + http://lttng.org
package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch new file +26 -0
@@ -0,0 +1,26 @@ +From dc190cc1f8ddccfa7b0b8323ed157afb29a0ebb7 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers <[email protected]> +Date: Wed, 21 Dec 2011 16:24:48 -0500 +Subject: [PATCH] Fix clock source overflow on 32-bit archs + +Signed-off-by: Mathieu Desnoyers <[email protected]> +--- + liblttng-ust/clock.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/liblttng-ust/clock.h b/liblttng-ust/clock.h +index b5d3e77..23294d2 100644 +--- a/liblttng-ust/clock.h ++++ b/liblttng-ust/clock.h +@@ -39,7 +39,7 @@ static __inline__ uint64_t trace_clock_read64(void) + struct timespec ts; + + clock_gettime(CLOCK_MONOTONIC, &ts); +- return (ts.tv_sec * 1000000000) + ts.tv_nsec; ++ return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec; + } + + static __inline__ uint32_t trace_clock_freq_scale(void) +-- +1.7.2.5 +
package/lttng-libust/lttng-libust.mk new file +8 -0
@@ -0,0 +1,8 @@ +LTTNG_LIBUST_SITE = http://lttng.org/files/bundles/20111214/ +LTTNG_LIBUST_VERSION = 1.9.2 +LTTNG_LIBUST_SOURCE = lttng-ust-$(LTTNG_LIBUST_VERSION).tar.gz + +LTTNG_LIBUST_INSTALL_STAGING = YES +LTTNG_LIBUST_DEPENDENCIES = liburcu + +$(eval $(call AUTOTARGETS))
Signature · 1 line
1.7.4.1