* [ptxdist] [PATCH v2 1/2] libtraceevent: new package
2024-05-14 16:45 [ptxdist] [PATCH v2 0/2] add libtraceevent for perf Uwe Kleine-König
@ 2024-05-14 16:45 ` Uwe Kleine-König
2024-05-14 16:45 ` [ptxdist] [PATCH v2 2/2] kernel/perf: Make use of libtraceevent Uwe Kleine-König
1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2024-05-14 16:45 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Tretter
This is required for perf (PTXCONF_KERNEL_TOOL_PERF) to work with
tracepoints and enable the subcommands kmem, kwork, lock, sched and
timechart.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
rules/libtraceevent.in | 8 +++++
rules/libtraceevent.make | 70 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+)
create mode 100644 rules/libtraceevent.in
create mode 100644 rules/libtraceevent.make
diff --git a/rules/libtraceevent.in b/rules/libtraceevent.in
new file mode 100644
index 000000000..de1c7675f
--- /dev/null
+++ b/rules/libtraceevent.in
@@ -0,0 +1,8 @@
+## SECTION=project_specific
+
+config LIBTRACEEVENT
+ bool
+ prompt "libtraceevent"
+ select HOST_MESON
+ help
+ FIXME
diff --git a/rules/libtraceevent.make b/rules/libtraceevent.make
new file mode 100644
index 000000000..7acc9c965
--- /dev/null
+++ b/rules/libtraceevent.make
@@ -0,0 +1,70 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2024 by Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBTRACEEVENT) += libtraceevent
+
+#
+# Paths and names
+#
+LIBTRACEEVENT_VERSION := 1.8.2
+LIBTRACEEVENT_MD5 := 671645965e835ef4236b96851fb889c9
+LIBTRACEEVENT := libtraceevent-$(LIBTRACEEVENT_VERSION)
+LIBTRACEEVENT_SUFFIX := tar.xz
+LIBTRACEEVENT_URL := https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;tag=libtraceevent-$(LIBTRACEEVENT_VERSION)
+LIBTRACEEVENT_SOURCE := $(SRCDIR)/$(LIBTRACEEVENT).$(LIBTRACEEVENT_SUFFIX)
+LIBTRACEEVENT_DIR := $(BUILDDIR)/$(LIBTRACEEVENT)
+LIBTRACEEVENT_LICENSE := LGPL-2.1 + GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#LIBTRACEEVENT_CONF_ENV := $(CROSS_ENV)
+
+#
+# meson
+#
+LIBTRACEEVENT_CONF_TOOL := meson
+
+# There are some more configuration variables that don't have any effect given
+# -Ddoc=false.
+# Currently these are: docbook-suppress-sp, docbook-xls-172, htmldir, man-bold-literal
+#
+# The variable plugindir defaults to '' which is then interpreted as
+# join_paths(libdir, 'traceevent/plugins')
+LIBTRACEEVENT_CONF_OPT := \
+ $(CROSS_MESON_USR) \
+ -Ddoc=false \
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libtraceevent.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libtraceevent)
+ @$(call install_fixup, libtraceevent, PRIORITY, optional)
+ @$(call install_fixup, libtraceevent, SECTION, base)
+ @$(call install_fixup, libtraceevent, AUTHOR, "Uwe Kleine-König <u.kleine-koenig@pengutronix.de>")
+ @$(call install_fixup, libtraceevent, DESCRIPTION, missing)
+
+ @$(call install_lib, libtraceevent, 0, 0, 0644, libtraceevent)
+
+ @for plugin in cfg80211 function futex hrtimer jbd2 kmem kvm mac80211 sched_switch scsi tlb xen; do \
+ $(call install_lib, libtraceevent, 0, 0, 0644, libtraceevent/plugins/plugin_$${plugin}); \
+ done
+
+ @$(call install_finish, libtraceevent)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread