diff options
Diffstat (limited to 'poky/meta/recipes-kernel/trace-cmd')
5 files changed, 136 insertions, 0 deletions
diff --git a/poky/meta/recipes-kernel/trace-cmd/kernelshark_git.bb b/poky/meta/recipes-kernel/trace-cmd/kernelshark_git.bb new file mode 100644 index 000000000..9a5e8006c --- /dev/null +++ b/poky/meta/recipes-kernel/trace-cmd/kernelshark_git.bb @@ -0,0 +1,33 @@ +SUMMARY = "Graphical trace viewer for Ftrace" +LICENSE = "GPLv2" + +require trace-cmd.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e" + +DEPENDS = "gtk+ libxml2" +RDEPENDS_${PN} = "trace-cmd" + +inherit distro_features_check +ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}" + +EXTRA_OEMAKE = "\ + 'prefix=${prefix}' \ + 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \ + 'libdir=${libdir}' \ + NO_PYTHON=1 \ + gui \ +" +do_configure_prepend() { + # Make sure the recompile is OK + rm -f ${B}/.*.d +} + +do_install() { + oe_runmake DESTDIR="${D}" install_gui + rm ${D}${bindir}/trace-cmd + rm -rf ${D}${libdir}/trace-cmd + rm -rf ${D}${sysconfdir}/bash_completion.d/trace-cmd.bash + rmdir ${D}${libdir} +} diff --git a/poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc new file mode 100644 index 000000000..0a1789c45 --- /dev/null +++ b/poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc @@ -0,0 +1,13 @@ +SRCREV = "7d0147bbba3ed1d5ef6eea4eec3f0ad4c98f02b5" +PV = "2.7" + +inherit pkgconfig + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \ + file://blktrace-api-compatibility.patch \ + file://0001-Include-limits.h-so-that-PATH_MAX-is-defined-an-issu.patch \ +" + +S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-kernel/trace-cmd/trace-cmd/0001-Include-limits.h-so-that-PATH_MAX-is-defined-an-issu.patch b/poky/meta/recipes-kernel/trace-cmd/trace-cmd/0001-Include-limits.h-so-that-PATH_MAX-is-defined-an-issu.patch new file mode 100644 index 000000000..576308356 --- /dev/null +++ b/poky/meta/recipes-kernel/trace-cmd/trace-cmd/0001-Include-limits.h-so-that-PATH_MAX-is-defined-an-issu.patch @@ -0,0 +1,27 @@ +From 9488f92c1d0c7931c3e17950d1f9eea2aeb3e2bd Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 14 Jun 2017 15:56:18 +0300 +Subject: [PATCH] Include limits.h so that PATH_MAX is defined (an issue on + musl). + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + trace-listen.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/trace-listen.c b/trace-listen.c +index 17ff9d8..838d6bc 100644 +--- a/trace-listen.c ++++ b/trace-listen.c +@@ -31,6 +31,7 @@ + #include <fcntl.h> + #include <signal.h> + #include <errno.h> ++#include <limits.h> + + #include "trace-local.h" + #include "trace-msg.h" +-- +2.11.0 + diff --git a/poky/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch b/poky/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch new file mode 100644 index 000000000..320db6a32 --- /dev/null +++ b/poky/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch @@ -0,0 +1,29 @@ +trace-cmd: Add blktrace_api compatibility for TC_BARRIER + +Newer kernels replace TC_BARRIER with TC_FLUSH. Ensure trace-cmd +can build regardless of the linux-kernel-headers version. + +Upstream-Status: Inappropriate [Stop gap] + +Signed-off-by: Darren Hart <dvhart@linux.intel.com> + +diff --git a/plugin_blk.c b/plugin_blk.c +index 9327b17..c8e5e1c 100644 +--- a/plugin_blk.c ++++ b/plugin_blk.c +@@ -44,6 +44,15 @@ struct blk_data { + unsigned short pdu_len; + }; + ++/* ++ * Newer kernels don't define BLK_TC_BARRIER and have replaced it with ++ * BLK_TC_FLUSH. In this case, define it here and report FLUSHES as BARRIERS as ++ * a workaround, as described in: ++ * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=c09c47caedc9854d59378d6e34c989e51cfdd2b4 ++ */ ++#ifndef BLK_TC_BARRIER ++#define BLK_TC_BARRIER 1<<2 ++#endif + static void fill_rwbs(char *rwbs, int action, unsigned int bytes) + { + int i = 0; diff --git a/poky/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb b/poky/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb new file mode 100644 index 000000000..27c7c1975 --- /dev/null +++ b/poky/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb @@ -0,0 +1,34 @@ +SUMMARY = "User interface to Ftrace" +HOMEPAGE = "http://git.kernel.org/" +LICENSE = "GPLv2 & LGPLv2.1" + +require trace-cmd.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \ + file://COPYING.LIB;md5=edb195fe538e4552c1f6ca0fd7bf4f0a \ + file://trace-input.c;beginline=5;endline=8;md5=3ec82f43bbe0cfb5951ff414ef4d44d0 \ +" + +EXTRA_OEMAKE = "\ + 'prefix=${prefix}' \ + 'bindir=${bindir}' \ + 'man_dir=${mandir}' \ + 'html_install=${datadir}/kernelshark/html' \ + 'img_install=${datadir}/kernelshark/html/images' \ + \ + 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \ + 'libdir=${libdir}' \ + \ + NO_PYTHON=1 \ +" + +do_compile_prepend() { + # Make sure the recompile is OK + rm -f ${B}/.*.d +} + +do_install() { + oe_runmake DESTDIR="${D}" install +} + |