From: Michael Tretter <m.tretter@pengutronix.de>
To: ptxdist@pengutronix.de,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] libtraceevent: new package
Date: Wed, 8 May 2024 11:59:02 +0200 [thread overview]
Message-ID: <ZjtM5u8mjdcZjx-B@pengutronix.de> (raw)
In-Reply-To: <20240508090845.2143026-1-u.kleine-koenig@pengutronix.de>
On Wed, 08 May 2024 11:08:45 +0200, Uwe Kleine-König wrote:
> This is required for perf (PTXCONF_KERNEL_TOOL_PERF) to work with
> tracepoints and enable the subcommands kmem, kwork, lock, sched and
> timechart. The perf recipe is adapted accordingly to make use of it.
Nice. Thanks for the patch.
Maybe the addition of libtraceevent and the change to use it in perf
could be separate patches.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> rules/kernel.in | 1 +
> rules/kernel.make | 1 -
> rules/libtraceevent.in | 8 +++++
> rules/libtraceevent.make | 75 ++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 84 insertions(+), 1 deletion(-)
> create mode 100644 rules/libtraceevent.in
> create mode 100644 rules/libtraceevent.make
>
> diff --git a/rules/kernel.in b/rules/kernel.in
> index 817481577..862d52598 100644
> --- a/rules/kernel.in
> +++ b/rules/kernel.in
> @@ -6,6 +6,7 @@ menuconfig KERNEL
> select LIBELF_LIBDW if KERNEL_TOOL_PERF
> select SLANG if KERNEL_TOOL_PERF
> select BINUTILS if KERNEL_TOOL_PERF
> + select LIBTRACEEVENT if KERNEL_TOOL_PERF
> select LIBUNWIND if KERNEL_TOOL_PERF
>
> if KERNEL
> diff --git a/rules/kernel.make b/rules/kernel.make
> index d82aa27fb..0fe4f1e1b 100644
> --- a/rules/kernel.make
> +++ b/rules/kernel.make
> @@ -223,7 +223,6 @@ KERNEL_TOOL_PERF_OPTS := \
> NO_LIBBIONIC=1 \
> NO_LIBCRYPTO=1 \
> NO_LIBDW_DWARF_UNWIND= \
> - NO_LIBTRACEEVENT=1 \
> NO_PERF_READ_VDSO32=1 \
> NO_PERF_READ_VDSOX32=1 \
> NO_ZLIB= \
> 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
The section is wrong: Maybe SECTION=system_libraries
> +
> +config LIBTRACEEVENT
> + bool
> + prompt "libtraceevent"
> + select HOST_MESON
> + help
> + FIXME
Add a help text: Maybe "Linux kernel trace event library"
> diff --git a/rules/libtraceevent.make b/rules/libtraceevent.make
> new file mode 100644
> index 000000000..6017a983c
> --- /dev/null
> +++ b/rules/libtraceevent.make
> @@ -0,0 +1,75 @@
> +# -*-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
LIBTRACEEVENT_LICENSE := LGPL-2.1 AND GPL-2.0
Maybe set LIBTRACEEVENT_LICENSE_FILES, too.
> +
> +# ----------------------------------------------------------------------------
> +# Get
> +# ----------------------------------------------------------------------------
> +
> +#$(LIBTRACEEVENT_SOURCE):
> +# @$(call targetinfo)
> +# @$(call get, LIBTRACEEVENT)
Drop the empty get stage.
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#LIBTRACEEVENT_CONF_ENV := $(CROSS_ENV)
> +
> +#
> +# meson
> +#
> +LIBTRACEEVENT_CONF_TOOL := meson
> +LIBTRACEEVENT_CONF_OPT := \
> + $(CROSS_MESON_USR) \
> + -Ddoc=false
The list isn't complete. Use the scripts/configure_helper.py to
explicitly set all options.
> +
> +# ----------------------------------------------------------------------------
> +# 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)
> +
> + @$(call install_finish, libtraceevent)
> +
> + @$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/libtraceevent.clean:
> +# @$(call targetinfo)
> +# @$(call clean_pkg, LIBTRACEEVENT)
Drop the empty clean stage.
Michael
> +
> +# vim: syntax=make
> --
> 2.39.2
>
>
>
prev parent reply other threads:[~2024-05-08 9:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 9:08 Uwe Kleine-König
2024-05-08 9:59 ` Michael Tretter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZjtM5u8mjdcZjx-B@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=ptxdist@pengutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox