Skip to contentSkip to conversation

package/uftrace: new package

PATCH New Asaf Kahlon 2 participants 2 messages Apr 23, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 package/uftrace: new package

The uftrace tool is to trace and analyze execution of a program written in C/C++.

--
v3->v4:
* define unsupported options exlicitly
* Use TARGET_MAKE_ENV instead of TARGET_CONFIGURE_OPTS

---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/uftrace/Config.in    | 19 ++++++++++++++++
 package/uftrace/uftrace.hash |  3 +++
 package/uftrace/uftrace.mk   | 43 ++++++++++++++++++++++++++++++++++++
 5 files changed, 67 insertions(+)
 create mode 100644 package/uftrace/Config.in
 create mode 100644 package/uftrace/uftrace.hash
 create mode 100644 package/uftrace/uftrace.mk
DEVELOPERS +1 -0
index 95b52d76be..573d8d84de 100644
@@ -240,6 +240,7 @@ F:	package/python*
 F:	package/snmpclitools/
 F:	package/spdlog/
 F:	package/uftp/
+F:	package/uftrace/
 F:	package/uvw/
 F:	package/zeromq/
 
package/Config.in +1 -0
index b9d277428d..6181aaac2c 100644
@@ -144,6 +144,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/trace-cmd/Config.in"
 	source "package/trinity/Config.in"
 	source "package/uclibc-ng-test/Config.in"
+	source "package/uftrace/Config.in"
 	source "package/valgrind/Config.in"
 	source "package/vmtouch/Config.in"
 	source "package/whetstone/Config.in"
package/uftrace/Config.in new file +19 -0
new file mode 100644
index 0000000000..a8c6b4ff8a
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_UFTRACE_ARCH_SUPPORTS
+	bool
+	default y if BR2_ARM_CPU_ARMV6 || BR2_ARM_CPU_ARMV7A
+	default y if BR2_aarch64
+	default y if BR2_i386
+	default y if BR2_x86_64
+
+config BR2_PACKAGE_UFTRACE
+	bool "uftrace"
+	depends on BR2_PACKAGE_UFTRACE_ARCH_SUPPORTS
+	help
+	  The uftrace tool is to trace and analyze execution of a
+	  program written in C/C++. It was heavily inspired by the
+	  ftrace framework of the Linux kernel (especially function
+	  graph tracer) and supports userspace programs.
+	  It supports various kind of commands and filters to help
+	  analysis of the program execution and performance.
+
+	  https://github.com/namhyung/uftrace
package/uftrace/uftrace.hash new file +3 -0
new file mode 100644
index 0000000000..fb1e116be6
@@ -0,0 +1,3 @@
+# Locally computed
+sha256	418d30c959d3b6d0dcafd55e588a5d414a9984b30f2522a5af004a268824a5a2  uftrace-0.9.4.tar.gz
+sha256	8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/uftrace/uftrace.mk new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
2.30.2
#1 lore raw

PATCH v4 1/1 package/uftrace: new package

Hello Asaf,

Quoted 10 lines · On Fri, 23 Apr 2021 20:26:01 +0300 Asaf Kahlon <[email protected]> wrote:

The uftrace tool is to trace and analyze execution of a program written in C/C++.

--
v3->v4:
* define unsupported options exlicitly
* Use TARGET_MAKE_ENV instead of TARGET_CONFIGURE_OPTS

Quoted 10 lines
---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/uftrace/Config.in    | 19 ++++++++++++++++
 package/uftrace/uftrace.hash |  3 +++
 package/uftrace/uftrace.mk   | 43 ++++++++++++++++++++++++++++++++++++
 5 files changed, 67 insertions(+)
 create mode 100644 package/uftrace/Config.in
 create mode 100644 package/uftrace/uftrace.hash
 create mode 100644 package/uftrace/uftrace.mk

So I've applied, but there were a number of issues left:

- It didn't build with uClibc or musl, due to the use of argp, which is a glibc-only feature. I had to add a dependency on argp-standalone and pass -largp in the linker flags on musl || uclibc configurations.

- On uClibc, it still wasn't building due to a <personality.h> value missing, and another <elf.h> value missing.

- The --without-libstdc++ was not really appropriate, as we do have C++ support in Buildroot obviously.

Do not hesitate to check the final commit to make sure I didn't mess up anything. Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com