From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../configure-allow-to-disable-libvirt.patch | 39 ++++++++ .../systemtap/systemtap/docproc-build-fix.patch | 19 ++++ .../systemtap/obsolete_automake_macros.patch | 15 +++ .../systemtap/systemtap/scheduler-stp.patch | 109 +++++++++++++++++++++ .../systemtap/systemtap/system_map_location.patch | 23 +++++ .../systemtap/tapset-linux-sendfile-syscall.patch | 22 +++++ 6 files changed, 227 insertions(+) create mode 100644 meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/system_map_location.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch (limited to 'meta/recipes-kernel/systemtap/systemtap') diff --git a/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch new file mode 100644 index 0000000000..b4f2fbc066 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch @@ -0,0 +1,39 @@ +From 5eb10d90af9178edb65e6091ae939d1b5b19bb78 Mon Sep 17 00:00:00 2001 +From: Wenzong Fan +Date: Tue, 23 Sep 2014 04:47:10 -0400 +Subject: [PATCH] systemtap: allow to disable libvirt + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan +--- + configure.ac | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a631ae7..cb4885b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -525,10 +525,15 @@ dnl Check for the libvirt and libxml2 devel packages + + dnl We require libvirt >= 1.0.2 because stapvirt relies on the + dnl virDomainOpenChannel function, which was implemented in 1.0.2. +-PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ +- have_libvirt=yes +- AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) +- ], [have_libvirt=no]) ++AC_ARG_ENABLE([libvirt], ++ AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present])) ++ ++if test "$enable_libvirt" != no; then ++ PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ ++ have_libvirt=yes ++ AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) ++ ], [have_libvirt=no]) ++fi + AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"]) + PKG_CHECK_MODULES([libxml2], [libxml-2.0], [ + have_libxml2=yes +-- +1.7.9.5 + diff --git a/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch b/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch new file mode 100644 index 0000000000..33a89940ae --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch @@ -0,0 +1,19 @@ +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Tom Zanussi + +Index: git/doc/SystemTap_Tapset_Reference/Makefile.am +=================================================================== +--- git.orig/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 08:43:46.263339003 -0500 ++++ git/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 09:31:22.470083915 -0500 +@@ -27,6 +27,10 @@ + noinst_PROGRAMS = docproc + SRCTREE=$(abs_top_srcdir)/ + DOCPROC=$(abs_builddir)/docproc ++docproc_LINK = $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ ++ ++docproc.o: $(srcdir)/docproc.c ++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/docproc.c + + all: $(PDFDOCS) stamp-htmldocs stamp-mandocs + tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp') diff --git a/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch b/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch new file mode 100644 index 0000000000..988cda4f0c --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch @@ -0,0 +1,15 @@ +Upstream-Status: Pending + +Signed-off-by: Marko Lindqvist +Index: git/configure.ac +=================================================================== +--- git.orig/configure.ac ++++ git/configure.ac +@@ -19,7 +19,6 @@ AC_PROG_LN_S + AC_PROG_CC + AC_PROG_CXX + AC_PROG_CPP +-AM_PROG_CC_STDC + AM_PROG_CC_C_O + AC_PROG_RANLIB + AC_OBJEXT diff --git a/meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch b/meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch new file mode 100644 index 0000000000..9897e481a3 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch @@ -0,0 +1,109 @@ +scheduler.stp: Handle missing symbols. + +Compiler output code optimization leads to missing debug data for some +target variables, in particular some inline functions parameters, e.g. +context_switch. + +Handle this by testing for variable name resolvability and provide default +variable values in case no suitable target data is available through variable +name. Affected functions: ctxswitch,wakeup. + +This fix does not affect the intended context switch tracing. + + +Upstream-Status: Pending + +Signed-off-by: George Nita + + +diff --git a/tapset/linux/scheduler.stp b/tapset/linux/scheduler.stp +index 7596a46..539a0f1 100644 +--- a/tapset/linux/scheduler.stp ++++ b/tapset/linux/scheduler.stp +@@ -120,7 +120,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + %( arch != "x86_64" && arch != "ia64" && arch != "arm" %? + kernel.function("__switch_to") + %: +- kernel.function("context_switch") ++ kernel.function("prepare_task_switch") + %) + { + name = "ctxswitch" +@@ -140,7 +140,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + prev_task_name = task_execname($prev_p) + prevtsk_state = $prev_p->state + } +- else { ++ else if (@defined($prev)) { + prev_priority = $prev->prio + prev_pid = $prev->tgid + prev_tid = $prev->pid +@@ -148,6 +148,15 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + prev_task_name = task_execname($prev) + prevtsk_state = $prev->state + } ++ else { ++ prev_priority = 0 ++ prev_pid = 0 ++ prev_tid = 0 ++ /* No prev_task, dummy */ ++ prev_task = task_current() ++ prev_task_name = "UNAVAILABLE" ++ prevtsk_state = 0 ++ } + + if (@defined($next)) { + next_priority = $next->prio +@@ -165,7 +174,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + next_task_name = task_execname($next_p) + nexttsk_state = $next_p->state + } +- else { ++ else if (@defined($new)) { + next_priority = $new->prio + next_pid = $new->tgid + next_tid = $new->pid +@@ -173,6 +182,14 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + next_task_name = task_execname($new) + nexttsk_state = $new->state + } ++ else { ++ next_task = task_current() ++ next_priority = task_prio(next_task) ++ next_pid = task_pid(next_task) ++ next_tid = task_tid(next_task) ++ next_task_name = task_execname(next_task) ++ nexttsk_state = task_state(next_task) ++ } + } + + +@@ -254,12 +271,22 @@ probe scheduler.wakeup = + kernel.function("try_to_wake_up") + { + name = "wakeup" +- task = $p +- task_pid = $p->tgid +- task_tid = $p->pid +- task_priority = $p->prio +- task_cpu = task_cpu($p) +- task_state = task_state($p) ++ if (@defined($p)) { ++ task = $p ++ task_pid = $p->tgid ++ task_tid = $p->pid ++ task_priority = $p->prio ++ task_cpu = task_cpu($p) ++ task_state = task_state($p) ++ } ++ else { ++ task = task_current() ++ task_pid = task_pid(task) ++ task_tid = task_tid(task) ++ task_priority = task_prio(task) ++ task_cpu = task_cpu(task) ++ task_state = task_state(task) ++ } + } + + /** diff --git a/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch new file mode 100644 index 0000000000..013af5c3a4 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch @@ -0,0 +1,23 @@ +systemtap: Cross compilation fix + +This is a cross compilation fix. It allows systemtap to find +the kernel map file in the right place, i.e. in the kernel build tree. +Without this fix it takes a map file from the build host, if available. + +Upstream-Status: Pending + +Signed-off-by: Mikhail Durnev + +Index: git/session.cxx +=================================================================== +--- git.orig/session.cxx ++++ git/session.cxx +@@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function + clog << _F("Kernel symbol table %s unavailable, (%s)", + system_map_path.c_str(), strerror(errno)) << endl; + +- system_map_path = "/boot/System.map-" + kernel_release; ++ system_map_path = kernel_build_tree + "/System.map-" + kernel_release; + system_map.clear(); + system_map.open(system_map_path.c_str(), ifstream::in); + if (! system_map.is_open()) diff --git a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch new file mode 100644 index 0000000000..f945760fde --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch @@ -0,0 +1,22 @@ +systemtap: Fixed probe syscall.sendfile failure + +compat_sendfile syscall is unavailable in kernels starting version 3.8. +Hence systemtap scripts like 'probe syscall.* { if (target()==pid()) log(name." ".argstr) }' fail. +This problem is solved by marking __syscall.compat_sendfile as optional in tapset/linux/syscalls2.stp + +Upstream-Status: Pending + +Signed-off-by: Mikhail Durnev + +diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp +--- old/tapset/linux/syscalls2.stp 2014-04-21 01:28:41.000000000 -0500 ++++ new/tapset/linux/syscalls2.stp 2014-04-21 01:38:14.961233914 -0500 +@@ -1953,7 +1953,7 @@ + # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd, + # compat_loff_t __user *, offset, compat_size_t, count) + # +-probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ++probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ? + { + name = "sendfile" + out_fd = __int32($out_fd) -- cgit v1.2.3-54-g00ecf