Accepting request 145122 from home:jones_tony:branches:devel:tools

- Update to version 0.9.8.   
- Support for pre-2.6 kernels has been removed
- The sample data format has changed (see bug #3309794 below for details)
- A new 'operf' program is now available that allows non-root users to profile
  single processes. 'operf' can also be used for system-wide profiling, but
  root authority is required.  This capability requires a kernel version of
  2.6.31 or greater.
- New Processors Support:
  Tilera (tile64 tilepro tile-gx)
  IBM (System z10 z196)
  Intel Ivy Bridge
  ARMv7 (Cortex-A5 Cortex-A15 Cortex-A7)
- Numerous bugfixes

OBS-URL: https://build.opensuse.org/request/show/145122
OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=25
This commit is contained in:
Tony Jones 2012-12-11 19:01:54 +00:00 committed by Git OBS Bridge
parent 947d4e2db3
commit 30510b72e2
8 changed files with 102 additions and 160 deletions

View File

@ -1,34 +0,0 @@
---
agents/jvmpi/jvmpi_oprofile.cpp | 2 ++
libutil++/bfd_support.cpp | 3 +++
2 files changed, 5 insertions(+)
--- a/agents/jvmpi/jvmpi_oprofile.cpp
+++ b/agents/jvmpi/jvmpi_oprofile.cpp
@@ -24,12 +24,14 @@
*
*/
+#include <inttypes.h>
#include <iostream>
#include <map>
#include <string>
#include <cstring>
#include <stdexcept>
#include <cerrno>
+#include <cstring>
extern "C" {
#include <stdint.h>
--- a/libutil++/bfd_support.cpp
+++ b/libutil++/bfd_support.cpp
@@ -370,6 +370,9 @@ bool interesting_symbol(asymbol * sym)
if (!(sym->section->flags & SEC_LOAD))
return false;
+ if (sym->flags & BSF_SECTION_SYM)
+ return false;
+
return true;
}

View File

@ -1,110 +0,0 @@
---
Makefile.am | 1 +
agents/jvmpi/Makefile.am | 4 ++--
agents/jvmti/Makefile.am | 4 ++--
libopagent/Makefile.am | 4 ++--
m4/builtinexpect.m4 | 2 +-
m4/mallocattribute.m4 | 4 ++--
utils/opcontrol | 13 +++++++++++--
7 files changed, 21 insertions(+), 11 deletions(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,7 @@ SUBDIRS = \
+AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
# The module will not build under distcheck
--- a/agents/jvmpi/Makefile.am
+++ b/agents/jvmpi/Makefile.am
@@ -1,6 +1,6 @@
-pkglib_LTLIBRARIES = libjvmpi_oprofile.la
+lib_LTLIBRARIES = libjvmpi_oprofile.la
-libjvmpi_oprofile_la_CXXFLAGS = -W -Wall -fPIC
+libjvmpi_oprofile_la_LDFLAGS = -module -avoid-version
libjvmpi_oprofile_la_SOURCES = jvmpi_oprofile.cpp
--- a/agents/jvmti/Makefile.am
+++ b/agents/jvmti/Makefile.am
@@ -1,8 +1,8 @@
AM_CFLAGS = @OP_CFLAGS@
-pkglib_LTLIBRARIES = libjvmti_oprofile.la
+lib_LTLIBRARIES = libjvmti_oprofile.la
-libjvmti_oprofile_la_CFLAGS = $(AM_CFLAGS) -fPIC
+libjvmti_oprofile_la_LDFLAGS = -module -avoid-version
libjvmti_oprofile_la_LIBADD = ../../libopagent/libopagent.la
--- a/libopagent/Makefile.am
+++ b/libopagent/Makefile.am
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libopagent.la
+lib_LTLIBRARIES = libopagent.la
# install opagent.h to include directory
include_HEADERS = opagent.h
@@ -10,7 +10,7 @@ libopagent_la_SOURCES = opagent.c \
EXTRA_DIST = opagent_symbols.ver
-libopagent_la_CFLAGS = -fPIC -I ${top_srcdir}/libop -I ${top_srcdir}/libutil
+libopagent_la_CPPFLAGS = -I ${top_srcdir}/libop -I ${top_srcdir}/libutil
libopagent_la_LIBADD = $(BFD_LIBS)
# Do not increment the major version for this library except to
--- a/m4/builtinexpect.m4
+++ b/m4/builtinexpect.m4
@@ -5,7 +5,7 @@ AC_MSG_CHECKING([whether __builtin_expec
SAVE_CFLAGS=$CFLAGS
CFLAGS="-Werror $CFLAGS"
AC_TRY_LINK(,[
-int i;
+int i = 0;
if (__builtin_expect(i, 0)) { }
],
AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK",
--- a/m4/mallocattribute.m4
+++ b/m4/mallocattribute.m4
@@ -4,9 +4,9 @@ AC_DEFUN([AX_MALLOC_ATTRIBUTE],
AC_MSG_CHECKING([whether malloc attribute is understood])
SAVE_CFLAGS=$CFLAGS
CFLAGS="-Werror $CFLAGS"
-AC_TRY_COMPILE(,[
+AC_TRY_COMPILE([
void monkey() __attribute__((malloc));
-],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no]))
+],,AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no]))
CFLAGS=$SAVE_CFLAGS
]
)
--- a/utils/opcontrol
+++ b/utils/opcontrol
@@ -482,10 +482,19 @@ get_image_range()
exit 1
fi
+ kernel_file=$FILE_IMAGE
+ case $(file -L $kernel_file) in
+ *"gzip compressed"*)
+ kernel_file=$(mktemp /tmp/opcXXXXXX) || exit 1
+ trap "rm -f $kernel_file" EXIT
+ gzip -cd $FILE_IMAGE > $kernel_file
+ ;;
+ esac
+
# start at the start of .text, and end at _etext
- range_info=`objdump -h $FILE_IMAGE 2>/dev/null | grep " .text "`
+ range_info=`objdump -h $kernel_file 2>/dev/null | grep " .text "`
tmp1=`echo $range_info | awk '{print $4}'`
- tmp2=`objdump -t $FILE_IMAGE 2>/dev/null | grep "_etext$" | awk '{ print $1 }'`
+ tmp2=`objdump -t $kernel_file 2>/dev/null | grep "_etext$" | awk '{ print $1 }'`
if test -z "$tmp1" -o -z "$tmp2"; then
echo "The specified file $FILE_IMAGE does not seem to be valid" >&2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:34ae290c9be9675f925721561f569abc8d7e960d5a0f4a70adf224b16cca6d43
size 1047960

3
oprofile-0.9.8.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f143b69b9c60bef6bc9b700ebcfc9c4f98a603cddec6f2764a7f02abeec2687d
size 1087805

View File

@ -0,0 +1,33 @@
From: Tony Jones
Subject: all compressed kernel when determining range
Upstream: no
Extracted from 0.9.7 patch 'oprofile-0.9.5-buildfixes.diff'.
This needs further investigation as purpose is unclear, since compressed image
isn't supported by underlying sampling code.
--- a/utils/opcontrol
+++ b/utils/opcontrol
@@ -482,10 +482,19 @@ get_image_range()
exit 1
fi
+ kernel_file=$FILE_IMAGE
+ case $(file -L $kernel_file) in
+ *"gzip compressed"*)
+ kernel_file=$(mktemp /tmp/opcXXXXXX) || exit 1
+ trap "rm -f $kernel_file" EXIT
+ gzip -cd $FILE_IMAGE > $kernel_file
+ ;;
+ esac
+
# start at the start of .text, and end at _etext
- range_info=`objdump -h $FILE_IMAGE 2>/dev/null | grep " .text "`
+ range_info=`objdump -h $kernel_file 2>/dev/null | grep " .text "`
tmp1=`echo $range_info | awk '{print $4}'`
- tmp2=`objdump -t $FILE_IMAGE 2>/dev/null | grep "_etext$" | awk '{ print $1 }'`
+ tmp2=`objdump -t $kernel_file 2>/dev/null | grep "_etext$" | awk '{ print $1 }'`
if test -z "$tmp1" -o -z "$tmp2"; then
echo "The specified file $FILE_IMAGE does not seem to be valid" >&2

View File

@ -0,0 +1,33 @@
From: Tony Jones <tonyj@suse.de>
Subject: Build libjvm[pt]i as so only
Upstream: no
Only expected user is Java.
Extracted from 0.9.7 patch 'oprofile-0.9.5-buildfixes.diff'
---
agents/jvmpi/Makefile.am | 1 +
agents/jvmti/Makefile.am | 1 +
2 files changed, 2 insertions(+)
--- a/agents/jvmpi/Makefile.am
+++ b/agents/jvmpi/Makefile.am
@@ -1,6 +1,7 @@
pkglib_LTLIBRARIES = libjvmpi_oprofile.la
libjvmpi_oprofile_la_CXXFLAGS = -W -Wall -fPIC
+libjvmpi_oprofile_la_LDFLAGS = -module -avoid-version
libjvmpi_oprofile_la_SOURCES = jvmpi_oprofile.cpp
--- a/agents/jvmti/Makefile.am
+++ b/agents/jvmti/Makefile.am
@@ -3,6 +3,7 @@ AM_CFLAGS = @OP_CFLAGS@
pkglib_LTLIBRARIES = libjvmti_oprofile.la
libjvmti_oprofile_la_CFLAGS = $(AM_CFLAGS) -fPIC
+libjvmti_oprofile_la_LDFLAGS = -module -avoid-version
libjvmti_oprofile_la_LIBADD = ../../libopagent/libopagent.la

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Mon Dec 10 20:37:17 UTC 2012 - tonyj@suse.com
- Update to version 0.9.8.
- Support for pre-2.6 kernels has been removed
- The sample data format has changed (see bug #3309794 below for details)
- A new 'operf' program is now available that allows non-root users to profile
single processes. 'operf' can also be used for system-wide profiling, but
root authority is required. This capability requires a kernel version of
2.6.31 or greater.
- New Processors Support:
Tilera (tile64 tilepro tile-gx)
IBM (System z10 z196)
Intel Ivy Bridge
ARMv7 (Cortex-A5 Cortex-A15 Cortex-A7)
- Numerous bugfixes
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 25 10:42:15 UTC 2011 - coolo@suse.com Fri Nov 25 10:42:15 UTC 2011 - coolo@suse.com

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: oprofile Name: oprofile
BuildRequires: binutils-devel BuildRequires: binutils-devel
BuildRequires: fdupes BuildRequires: fdupes
@ -26,10 +27,10 @@ BuildRequires: qt-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
Url: http://oprofile.sourceforge.net/ Url: http://oprofile.sourceforge.net/
PreReq: /usr/sbin/groupadd /usr/sbin/useradd PreReq: /usr/sbin/groupadd /usr/sbin/useradd
Version: 0.9.7 Version: 0.9.8
Release: 0 Release: 0
Summary: System-Wide Profiler for Linux Systems Summary: System-Wide Profiler for Linux Systems
License: GPL-2.0+ ; LGPL-2.1+ License: GPL-2.0+ and LGPL-2.1+
Group: Development/Tools/Other Group: Development/Tools/Other
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
@ -38,8 +39,8 @@ Source2: %{name}.rpmlintrc
Source3: baselibs.conf Source3: baselibs.conf
Source4: jvmpi.h Source4: jvmpi.h
Source5: README-BEFORE-ADDING-PATCHES Source5: README-BEFORE-ADDING-PATCHES
Patch1: oprofile-0.9.5-buildfixes.diff Patch1: %{name}-compressed-kernel.patch
Patch2: oprofile-0.9.4-fixes.diff Patch2: %{name}-no-libjvm-version.patch
%description %description
OProfile is a system-wide profiler for Linux systems, capable of OProfile is a system-wide profiler for Linux systems, capable of
@ -65,7 +66,8 @@ This is the package containing the userspace tools.
%package devel %package devel
Summary: System-Wide Profiler for Linux Systems Summary: System-Wide Profiler for Linux Systems
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: libopagent1 = %{version}-%{release} binutils-devel Requires: binutils-devel
Requires: libopagent1 = %{version}-%{release}
%description devel %description devel
OProfile is a system-wide profiler for Linux systems, capable of OProfile is a system-wide profiler for Linux systems, capable of
@ -99,11 +101,10 @@ ln -s %_libdir/jvm/java/include/* java/include
test -f java/include/jvmpi.h || ln -s %{S:4} java/include test -f java/include/jvmpi.h || ln -s %{S:4} java/include
%build %build
autoreconf -fi sh autogen.sh
./configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ ./configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
--prefix=/usr --mandir=%{_mandir} --libdir=%{_libdir} \ --prefix=/usr --mandir=%{_mandir} --libdir=%{_libdir} \
--with-kernel-support --with-java=$PWD/java \ --with-java=$PWD/java --enable-gui=qt4
--enable-gui=qt4
# Change DATE/TIME macros to use last change time of oprofile.changes # Change DATE/TIME macros to use last change time of oprofile.changes
# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html # See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
@ -116,7 +117,7 @@ make %{?jobs:-j%jobs}
%install %install
make DESTDIR=$RPM_BUILD_ROOT htmldir=%{_docdir}/oprofile install make DESTDIR=$RPM_BUILD_ROOT htmldir=%{_docdir}/oprofile install
%suse_update_desktop_file -i %name Development Profiling %suse_update_desktop_file -i %name Development Profiling
rm -vf $RPM_BUILD_ROOT%{_libdir}/libopagent.*a rm -f $RPM_BUILD_ROOT%{_libdir}/oprofile/libopagent.*a
# Hardlink duplicate files automatically (from package fdupes): # Hardlink duplicate files automatically (from package fdupes):
# It doesn't save much, but it keeps rpmlint from breaking the package build. # It doesn't save much, but it keeps rpmlint from breaking the package build.
%fdupes $RPM_BUILD_ROOT %fdupes $RPM_BUILD_ROOT
@ -138,8 +139,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/applications/*.desktop /usr/share/applications/*.desktop
/usr/share/oprofile /usr/share/oprofile
%{_mandir}/man1/* %{_mandir}/man1/*
%{_libdir}/libjvm[tp]i_oprofile.so %{_libdir}/oprofile/libjvm[tp]i_oprofile.so
%exclude %{_libdir}/libjvm[tp]i_oprofile.*a %exclude %{_libdir}/oprofile/libjvm[tp]i_oprofile.*a
%doc doc/oprofile.html doc/internals.html doc/opreport.xsd %doc doc/oprofile.html doc/internals.html doc/opreport.xsd
%doc COPYING README TODO ChangeLog-* %doc COPYING README TODO ChangeLog-*
@ -147,10 +148,12 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root) %defattr(-,root,root)
/usr/include/* /usr/include/*
%doc doc/op-jit-devel.html %doc doc/op-jit-devel.html
%{_libdir}/libopagent.so %dir %{_libdir}/oprofile
%{_libdir}/oprofile/libopagent.so
%files -n libopagent1 %files -n libopagent1
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libopagent.so.1* %dir %{_libdir}/oprofile
%{_libdir}/oprofile/libopagent.so.1*
%changelog %changelog