From 9d5785311843703b93914f9948289529978b13c6b9d89b0f5e7a27f8e24090a7 Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Fri, 24 May 2013 02:08:00 +0000 Subject: [PATCH] Accepting request 176456 from home:jones_tony:branches:devel:tools Update version. OBS-URL: https://build.opensuse.org/request/show/176456 OBS-URL: https://build.opensuse.org/package/show/devel:tools/systemtap?expand=0&rev=61 --- systemtap-2.0.tar.gz | 3 - systemtap-2.2.1.tar.gz | 3 + systemtap-build-source-dir.patch | 6 +- systemtap-docs-autoconf-version.diff | 4 +- systemtap-docs.changes | 5 + systemtap-docs.spec | 2 +- ...ix-for-kernels-without-vm_executable.patch | 212 ------------------ systemtap.changes | 11 + systemtap.spec | 6 +- 9 files changed, 27 insertions(+), 225 deletions(-) delete mode 100644 systemtap-2.0.tar.gz create mode 100644 systemtap-2.2.1.tar.gz delete mode 100644 systemtap-fix-for-kernels-without-vm_executable.patch diff --git a/systemtap-2.0.tar.gz b/systemtap-2.0.tar.gz deleted file mode 100644 index 9f09410..0000000 --- a/systemtap-2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b5e4740c697506768be42cbbcc238f1b0184747dd43938a46ab0393682eee63 -size 2461359 diff --git a/systemtap-2.2.1.tar.gz b/systemtap-2.2.1.tar.gz new file mode 100644 index 0000000..c1f2526 --- /dev/null +++ b/systemtap-2.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6d1274d699b953bd073a162cf8622aaa0c15294ca87e9c8a05ace3360b8b45d +size 2588174 diff --git a/systemtap-build-source-dir.patch b/systemtap-build-source-dir.patch index 9937b66..9058368 100644 --- a/systemtap-build-source-dir.patch +++ b/systemtap-build-source-dir.patch @@ -26,7 +26,7 @@ necessary headers. --- a/session.cxx +++ b/session.cxx -@@ -90,6 +90,7 @@ systemtap_session::systemtap_session (): +@@ -97,6 +97,7 @@ systemtap_session::systemtap_session (): kernel_release = string (buf.release); release = kernel_release; kernel_build_tree = "/lib/modules/" + kernel_release + "/build"; @@ -34,7 +34,7 @@ necessary headers. architecture = machine = normalize_machine(buf.machine); for (unsigned i=0; i<5; i++) perpass_verbose[i]=0; -@@ -258,6 +259,7 @@ systemtap_session::systemtap_session (co +@@ -271,6 +272,7 @@ systemtap_session::systemtap_session (co { release = kernel_release = kern; kernel_build_tree = "/lib/modules/" + kernel_release + "/build"; @@ -42,7 +42,7 @@ necessary headers. architecture = machine = normalize_machine(arch); setup_kernel_release(kern.c_str()); native_build = false; // assumed; XXX: could be computed as in check_options() -@@ -1540,21 +1542,39 @@ systemtap_session::setup_kernel_release +@@ -1710,21 +1712,39 @@ systemtap_session::setup_kernel_release // normal search in tapsets.cxx. Without CONFIG_DEBUG_INFO, we'd // need heuristics such as this one: diff --git a/systemtap-docs-autoconf-version.diff b/systemtap-docs-autoconf-version.diff index 0b12843..c99dec6 100644 --- a/systemtap-docs-autoconf-version.diff +++ b/systemtap-docs-autoconf-version.diff @@ -10,12 +10,12 @@ Signed-off-by: Tony Jones --- a/configure.ac +++ b/configure.ac -@@ -30,7 +30,7 @@ AC_SUBST(CFLAGS) +@@ -33,7 +33,7 @@ AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SYS_LARGEFILE AM_GNU_GETTEXT(external) -AM_GNU_GETTEXT_VERSION(0.17) +AM_GNU_GETTEXT_VERSION(0.18) AC_CHECK_FUNCS(ppoll) + AC_CHECK_FUNCS(openat) - dnl Handle the prologues option. diff --git a/systemtap-docs.changes b/systemtap-docs.changes index aa37232..f87eb6f 100644 --- a/systemtap-docs.changes +++ b/systemtap-docs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 22 17:47:56 UTC 2013 - tonyj@suse.com + +- Update to version 2.2.1. See systemtap.spec for changelog + ------------------------------------------------------------------- Sat Jan 12 05:10:48 UTC 2013 - tonyj@suse.com diff --git a/systemtap-docs.spec b/systemtap-docs.spec index 17e69e1..cc63c4e 100644 --- a/systemtap-docs.spec +++ b/systemtap-docs.spec @@ -26,7 +26,7 @@ BuildRequires: pkg-config BuildRequires: fop BuildRequires: latex2html BuildRequires: xmlto -Version: 2.0 +Version: 2.2.1 Release: 0 Summary: Documents and examples for systemtap License: GPL-2.0+ diff --git a/systemtap-fix-for-kernels-without-vm_executable.patch b/systemtap-fix-for-kernels-without-vm_executable.patch deleted file mode 100644 index 69f04d5..0000000 --- a/systemtap-fix-for-kernels-without-vm_executable.patch +++ /dev/null @@ -1,212 +0,0 @@ -From: Josh Stone -Date: Fri Oct 12 14:45:55 2012 -0700 -Subject: PR14172: Fix for kernels without VM_EXECUTABLE -Git-commit: 529c7eaed7360776b596af31c86d4e4712a1a3db - - We were using VM_EXECUTABLE in two ways: - - 1) In task_finder for locating the process executable among all the - vmas. Since around 2.6.26 there is also mm->exe_file, which will serve - this purpose just fine. - - 2) In uprobes to avoid relocation offset for semaphores in ET_EXEC - files. This is actually incorrect, but harmless, because the callback - path for ET_EXEC targets already sets relocation=offset=0 anyway. So we - can just remove the special case for VM_EXECUTABLE altogether. - - * runtime/task_finder_vma.c (stap_find_exe_file): New, locate the - process executable either by VM_EXECUTABLE or mm->exe_file. - * runtime/linux/task_finder.c (__stp_get_mm_path): Use stap_find_exe_file. - * runtime/linux/task_finder2.c (__stp_get_mm_path): Ditto. - * runtime/linux/uprobes-common.c (stap_uprobe_change_plus): Don't - special case for VM_EXECUTABLE (and add a comment why). - * runtime/linux/uprobes-inode.c (stapiu_change_plus): Ditto. - (stapiu_get_task_inode): Use stap_find_exe_file. - -diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h -index e167be6..783f199 100644 ---- a/runtime/linux/runtime.h -+++ b/runtime/linux/runtime.h -@@ -163,13 +163,13 @@ void *kallsyms_task_work_cancel; - #include "copy.c" - #include "regs.c" - #include "regs-ia64.c" -+#include "sym.c" - - #if (defined(CONFIG_UTRACE) || defined(STAPCONF_UTRACE_VIA_TRACEPOINTS)) - #define HAVE_TASK_FINDER - #include "task_finder.c" - #endif - --#include "sym.c" - #ifdef STP_PERFMON - #include "perf.c" - #endif -diff --git a/runtime/linux/task_finder.c b/runtime/linux/task_finder.c -index 2b1e22f..d718e80 100644 ---- a/runtime/linux/task_finder.c -+++ b/runtime/linux/task_finder.c -@@ -440,7 +440,7 @@ __stp_task_finder_cleanup(void) - static char * - __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen) - { -- struct vm_area_struct *vma; -+ struct file *vm_file; - char *rc = NULL; - - // The down_read() function can sleep, so we'll call -@@ -451,17 +451,12 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen) - return ERR_PTR(-ENOENT); - } - -- vma = mm->mmap; -- while (vma) { -- if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file) -- break; -- vma = vma->vm_next; -- } -- if (vma) { -+ vm_file = stap_find_exe_file(mm); -+ if (vm_file) { - #ifdef STAPCONF_DPATH_PATH -- rc = d_path(&(vma->vm_file->f_path), buf, buflen); -+ rc = d_path(&(vm_file->f_path), buf, buflen); - #else -- rc = d_path(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt, -+ rc = d_path(vm_file->f_dentry, vm_file->f_vfsmnt, - buf, buflen); - #endif - } -diff --git a/runtime/linux/task_finder2.c b/runtime/linux/task_finder2.c -index 680b428..5cee195 100644 ---- a/runtime/linux/task_finder2.c -+++ b/runtime/linux/task_finder2.c -@@ -425,7 +425,7 @@ __stp_task_finder_cleanup(void) - static char * - __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen) - { -- struct vm_area_struct *vma; -+ struct file *vm_file; - char *rc = NULL; - - // The down_read() function can sleep, so we'll call -@@ -436,17 +436,12 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen) - return ERR_PTR(-ENOENT); - } - -- vma = mm->mmap; -- while (vma) { -- if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file) -- break; -- vma = vma->vm_next; -- } -- if (vma) { -+ vm_file = stap_find_exe_file(mm); -+ if (vm_file) { - #ifdef STAPCONF_DPATH_PATH -- rc = d_path(&(vma->vm_file->f_path), buf, buflen); -+ rc = d_path(&(vm_file->f_path), buf, buflen); - #else -- rc = d_path(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt, -+ rc = d_path(vm_file->f_dentry, vm_file->f_vfsmnt, - buf, buflen); - #endif - } -diff --git a/runtime/linux/uprobes-common.c b/runtime/linux/uprobes-common.c -index 64b62cc..cdfb5a6 100644 ---- a/runtime/linux/uprobes-common.c -+++ b/runtime/linux/uprobes-common.c -@@ -77,13 +77,10 @@ static int stap_uprobe_change_plus (struct task_struct *tsk, unsigned long reloc - - sdt_sem_pid = (sups->return_p ? sup->urp.u.pid : sup->up.pid); - if (sups->sdt_sem_offset && (sdt_sem_pid != tsk->tgid || sup->sdt_sem_address == 0)) { -- /* If the probe is in the executable itself, the offset *is* the address. */ -- if (vm_flags & VM_EXECUTABLE) { -- sup->sdt_sem_address = relocation + sups->sdt_sem_offset; -- } -- else { -- sup->sdt_sem_address = (relocation - offset) + sups->sdt_sem_offset; -- } -+ /* If the probe is in an ET_EXEC binary, then the sdt_sem_offset already -+ * is a real address. But stap_uprobe_process_found calls us in this -+ * case with relocation=offset=0, so we don't have to worry about it. */ -+ sup->sdt_sem_address = (relocation - offset) + sups->sdt_sem_offset; - } /* sdt_sem_offset */ - if (slotted_p) { - struct stap_uprobe *sup = & stap_uprobes[i]; -diff --git a/runtime/linux/uprobes-inode.c b/runtime/linux/uprobes-inode.c -index 578123c..9d4d867 100644 ---- a/runtime/linux/uprobes-inode.c -+++ b/runtime/linux/uprobes-inode.c -@@ -406,9 +406,14 @@ stapiu_change_plus(struct stapiu_target* target, struct task_struct *task, - if (!p->tgid) { - p->tgid = task->tgid; - p->relocation = relocation; -- p->base = relocation; -- if (!(vm_flags & VM_EXECUTABLE)) -- p->base -= offset; -+ -+ /* The base is used for relocating semaphores. If the -+ * probe is in an ET_EXEC binary, then that offset -+ * already is a real address. But stapiu_process_found -+ * calls us in this case with relocation=offset=0, so -+ * we don't have to worry about it. */ -+ p->base = relocation - offset; -+ - list_add(&p->target_process, &target->processes); - break; - } -@@ -491,7 +496,7 @@ static struct inode * - stapiu_get_task_inode(struct task_struct *task) - { - struct mm_struct *mm; -- struct vm_area_struct *vma; -+ struct file* vm_file; - struct inode *inode = NULL; - - // Grab the inode associated with the task. -@@ -507,15 +512,9 @@ stapiu_get_task_inode(struct task_struct *task) - } - - down_read(&mm->mmap_sem); -- vma = mm->mmap; -- while (vma) { -- if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file -- && vma->vm_file->f_path.dentry != NULL) { -- inode = vma->vm_file->f_path.dentry->d_inode; -- break; -- } -- vma = vma->vm_next; -- } -+ vm_file = stap_find_exe_file(mm); -+ if (vm_file && vm_file->f_path.dentry) -+ inode = vm_file->f_path.dentry->d_inode; - - up_read(&mm->mmap_sem); - return inode; -diff --git a/runtime/task_finder_vma.c b/runtime/task_finder_vma.c -index 7c872ba..1c1bfbc 100644 ---- a/runtime/task_finder_vma.c -+++ b/runtime/task_finder_vma.c -@@ -371,3 +371,21 @@ stap_drop_vma_maps(struct task_struct *tsk) - write_unlock_irqrestore(&__stp_tf_vma_lock, flags); - return 0; - } -+ -+/* Find the main executable for this mm. -+ * NB: mmap_sem should be held already. */ -+static struct file* -+stap_find_exe_file(struct mm_struct* mm) -+{ -+ /* VM_EXECUTABLE was killed in kernel commit e9714acf, but in kernels -+ * that new we can just use mm->exe_file anyway. (PR14172) */ -+#ifdef VM_EXECUTABLE -+ struct vm_area_struct *vma; -+ for (vma = mm->mmap; vma; vma = vma->vm_next) -+ if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file) -+ return vma->vm_file; -+ return NULL; -+#else -+ return mm->exe_file; -+#endif -+} diff --git a/systemtap.changes b/systemtap.changes index 6c0b924..0ac9efc 100644 --- a/systemtap.changes +++ b/systemtap.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed May 22 17:42:53 UTC 2013 - tonyj@suse.com + +- Upgrade to version 2.2.1 + Drop patch: systemtap-fix-for-kernels-without-vm_executable.patch + Refresh patch (context): systemtap-build-source-dir.patch + + Changelog: + 2.1: http://sourceware.org/ml/systemtap/2013-q1/msg00130.html + 2.2.1: http://sourceware.org/ml/systemtap/2013-q2/msg00138.html + ------------------------------------------------------------------- Fri Feb 22 06:30:58 UTC 2013 - tonyj@suse.com diff --git a/systemtap.spec b/systemtap.spec index 3f1660c..c2c63e8 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -27,7 +27,7 @@ BuildRequires: mozilla-nss-tools BuildRequires: pkg-config BuildRequires: sqlite-devel BuildRequires: systemd -Version: 2.0 +Version: 2.2.1 Release: 0 Summary: Instrumentation System License: GPL-2.0+ @@ -36,8 +36,7 @@ Url: http://sourceware.org/systemtap/ Source: http://sourceware.org/systemtap/ftp/releases/systemtap-%{version}.tar.gz Source2: README-BEFORE-ADDING-PATCHES Source3: stap-server.conf -Patch1: systemtap-fix-for-kernels-without-vm_executable.patch -Patch2: systemtap-build-source-dir.patch +Patch1: systemtap-build-source-dir.patch Obsoletes: systemtap-client < 1.5 Requires: %{name}-runtime = %{version}-%{release} Requires: libebl1 @@ -87,7 +86,6 @@ This package contains the support tools for static probes. %prep %setup -q %patch1 -p1 -%patch2 -p1 %build %configure --disable-docs --docdir=%{_docdir}/systemtap