OBS User unknown 2009-07-30 20:54:32 +00:00 committed by Git OBS Bridge
parent 920c35fb4d
commit 8783cbb4bd
10 changed files with 241 additions and 548 deletions

104
jvmpi.h
View File

@ -1,104 +0,0 @@
#include "jni.h"
#define JVMPI_VERSION_1 (jint)0x10000001
struct _jobjectID;
typedef struct _jobjectID *jobjectID;
struct _JVMPI_RawMonitor;
typedef struct _JVMPI_RawMonitor *JVMPI_RawMonitor;
typedef struct
{
jint lineno;
jmethodID method_id;
} JVMPI_CallFrame;
typedef struct
{
JNIEnv *env_id;
jint num_frames;
JVMPI_CallFrame *frames;
} JVMPI_CallTrace;
typedef struct
{
char *method_name;
char *method_signature;
jint start_lineno;
jint end_lineno;
jmethodID method_id;
} JVMPI_Method;
typedef struct
{
char *field_name;
char *field_signature;
} JVMPI_Field;
typedef struct
{
jint offset;
jint lineno;
} JVMPI_Lineno;
typedef struct
{
jint event_type;
JNIEnv *env_id;
union
{
struct
{
const char *class_name;
char *source_name;
jint num_interfaces;
jint num_methods;
JVMPI_Method *methods;
jint num_static_fields;
JVMPI_Field *statics;
jint num_instance_fields;
JVMPI_Field *instances;
jobjectID class_id;
} class_load;
struct
{
jmethodID method_id;
void *code_addr;
jint code_size;
jint lineno_table_size;
JVMPI_Lineno *lineno_table;
} compiled_method_load;
} u;
} JVMPI_Event;
typedef struct
{
jint version;
void (*NotifyEvent) (JVMPI_Event *);
jint (*EnableEvent) (jint, void *);
jint (*DisableEvent) (jint, void *);
jint (*RequestEvent) (jint, void *);
void (*GetCallTrace) (JVMPI_CallTrace *, jint);
void (*ProfilerExit) (jint);
JVMPI_RawMonitor (*RawMonitorCreate) (char *);
void (*RawMonitorEnter) (JVMPI_RawMonitor);
void (*RawMonitorExit) (JVMPI_RawMonitor);
void (*RawMonitorWait) (JVMPI_RawMonitor, jlong);
void (*RawMonitorNotifyAll) (JVMPI_RawMonitor);
void (*RawMonitorDestroy) (JVMPI_RawMonitor);
jlong (*GetCurrentThreadCpuTime) (void);
void (*SuspendThread) (JNIEnv *);
void (*ResumeThread) (JNIEnv *);
jint (*GetThreadStatus) (JNIEnv *);
jboolean (*ThreadHasRun) (JNIEnv *);
jint (*CreateSystemThread) (char *, jint, void (*)(void *));
void (*SetThreadLocalStorage) (JNIEnv *, void *);
void *(*GetThreadLocalStorage) (JNIEnv *);
void (*DisableGC) (void);
void (*EnableGC) (void);
void (*RunGC) (void);
jobjectID (*GetThreadObject) (JNIEnv *);
jobjectID (*GetMethodClass) (jmethodID);
jobject (*jobjectID2jobject) (jobjectID);
jobjectID (*jobject2jobjectID) (jobject);
void (*SuspendThreadList) (jint, JNIEnv **, jint *);
void (*ResumeThreadList) (jint, JNIEnv **, jint *);
} JVMPI_Interface;
#define JVMPI_EVENT_COMPILED_METHOD_LOAD 7
#define JVMPI_EVENT_COMPILED_METHOD_UNLOAD 8
#define JVMPI_EVENT_CLASS_LOAD 42
#define JVMPI_EVENT_CLASS_UNLOAD 43
#define JVMPI_EVENT_JVM_SHUT_DOWN 47

37
oprofile-0.9.4-fixes.diff Normal file
View File

@ -0,0 +1,37 @@
---
agents/jvmpi/jvmpi_oprofile.cpp | 2 ++
libutil++/bfd_support.cpp | 3 +++
2 files changed, 5 insertions(+)
Index: b/agents/jvmpi/jvmpi_oprofile.cpp
===================================================================
--- a/agents/jvmpi/jvmpi_oprofile.cpp
+++ b/agents/jvmpi/jvmpi_oprofile.cpp
@@ -24,11 +24,13 @@
*
*/
+#include <inttypes.h>
#include <iostream>
#include <map>
#include <string>
#include <stdexcept>
#include <cerrno>
+#include <cstring>
extern "C" {
#include <jvmpi.h>
Index: b/libutil++/bfd_support.cpp
===================================================================
--- 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,243 +0,0 @@
--- Makefile.am
+++ Makefile.am
@@ -25,6 +25,7 @@ SUBDIRS = \
+AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
# The module will not build under distcheck
--- agents/jvmpi/Makefile.am
+++ 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
--- agents/jvmpi/jvmpi_oprofile.cpp
+++ agents/jvmpi/jvmpi_oprofile.cpp
@@ -16,6 +16,7 @@
#include <string>
#include <stdexcept>
#include <cerrno>
+#include <cstring>
extern "C" {
#include <jvmpi.h>
--- agents/jvmti/Makefile.am
+++ 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
--- configure.in
+++ configure.in
@@ -140,7 +140,7 @@ AX_CHECK_DOCBOOK
dnl finally restore the original libs setting
LIBS="$ORIG_SAVE_LIBS"
LIBERTY_LIBS="-liberty $DL_LIB $INTL_LIB"
-BFD_LIBS="-lbfd -liberty $DL_LIB $INTL_LIB"
+BFD_LIBS="-lbfd -liberty $Z_LIB $DL_LIB $INTL_LIB"
POPT_LIBS="-lpopt"
AC_SUBST(LIBERTY_LIBS)
AC_SUBST(BFD_LIBS)
--- libopagent/Makefile.am
+++ 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
--- libutil++/bfd_support.cpp
+++ libutil++/bfd_support.cpp
@@ -364,6 +364,9 @@ bool interesting_symbol(asymbol * sym)
if (!strcmp("gcc2_compiled.", sym->name))
return false;
+ if (sym->flags & BSF_SECTION_SYM)
+ return false;
+
return true;
}
--- libutil++/file_manip.cpp
+++ libutil++/file_manip.cpp
@@ -44,7 +44,7 @@ bool copy_file(string const & source, st
if (!in)
return false;
- int fd = open(destination.c_str(), O_RDWR|O_CREAT);
+ int fd = open(destination.c_str(), O_RDWR|O_CREAT, 0600);
if (fd < 0)
return false;
close(fd);
--- libutil++/op_bfd.cpp
+++ libutil++/op_bfd.cpp
@@ -91,6 +91,11 @@ bool op_bfd_symbol::operator<(op_bfd_sym
return filepos() < rhs.filepos();
}
+unsigned long op_bfd_symbol::symbol_endpos(void) const
+{
+ return bfd_symbol->section->filepos + bfd_symbol->section->size;
+}
+
op_bfd::op_bfd(string const & fname, string_filter const & symbol_filter,
extra_images const & extra_images, bool & ok)
@@ -245,7 +250,8 @@ void op_bfd::get_symbols(op_bfd::symbols
while (it != symbols.end()) {
symbols_found_t::iterator temp = it;
++temp;
- if (temp != symbols.end() && (it->vma() == temp->vma())) {
+ if (temp != symbols.end() && (it->vma() == temp->vma()) &&
+ (it->filepos() == temp->filepos())) {
if (boring_symbol(*it, *temp)) {
it = symbols.erase(it);
} else {
@@ -382,7 +388,12 @@ size_t op_bfd::symbol_size(op_bfd_symbol
op_bfd_symbol const * next) const
{
unsigned long long start = sym.filepos();
- unsigned long long end = next ? next->filepos() : file_size;
+ unsigned long long end;
+
+ if (next && (sym.section() != next->section()))
+ end = sym.symbol_endpos();
+ else
+ end = next ? next->filepos() : file_size;
return end - start;
}
--- libutil++/op_bfd.h
+++ libutil++/op_bfd.h
@@ -50,6 +50,8 @@ public:
bfd_vma vma() const { return symb_value + section_vma; }
unsigned long value() const { return symb_value; }
unsigned long filepos() const { return symb_value + section_filepos; }
+ unsigned long symbol_endpos(void) const;
+ asection const * section(void) const { return bfd_symbol->section; }
std::string const & name() const { return symb_name; }
asymbol const * symbol() const { return bfd_symbol; }
size_t size() const { return symb_size; }
--- libutil++/op_spu_bfd.cpp
+++ libutil++/op_spu_bfd.cpp
@@ -45,7 +45,8 @@ op_bfd::op_bfd(uint64_t spu_offset, stri
archive_path(extra_images.get_archive_path()),
extra_found_images(extra_images),
file_size(-1),
- embedding_filename(fname)
+ embedding_filename(fname),
+ anon_obj(false)
{
int fd;
struct stat st;
--- m4/binutils.m4
+++ m4/binutils.m4
@@ -8,11 +8,12 @@ AC_CHECK_FUNCS(xcalloc)
AC_CHECK_FUNCS(xmemdup)
AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl"; DL_LIB="-ldl", DL_LIB="")
AC_CHECK_LIB(intl, main, LIBS="$LIBS -lintl"; INTL_LIB="-lintl", INTL_LIB="")
+AC_CHECK_LIB(z, zlibVersion, LIBS="$LIBS -lz"; Z_LIB=-lz, Z_LIB=)
AC_CHECK_LIB(bfd, bfd_openr,, AC_MSG_ERROR([bfd library not found]))
AC_LANG_PUSH(C)
SAVE_LIBS=$LIBS
-LIBS=" -lbfd -liberty "
+LIBS=" -lbfd -liberty -lz"
# Determine if bfd_get_synthetic_symtab macro is available
OS="`uname`"
if test "$OS" = "Linux"; then
--- m4/builtinexpect.m4
+++ 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",
--- m4/cellspubfdsupport.m4
+++ m4/cellspubfdsupport.m4
@@ -12,7 +12,7 @@ AC_DEFUN([AX_CELL_SPU],
AC_LANG_PUSH(C)
SAVE_LIBS=$LIBS
-LIBS=" -lbfd -liberty "
+LIBS=" -lbfd -liberty -lz"
AC_CHECK_LIB(bfd, bfd_openr_iovec,
[bfd_openr_iovec_exists="yes"],
--- m4/mallocattribute.m4
+++ 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
]
)
--- utils/opcontrol
+++ utils/opcontrol
@@ -508,10 +508,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
--- agents/jvmpi/jvmpi_oprofile.cpp 2009-03-01 16:07:09.000000000 +0000
+++ agents/jvmpi/jvmpi_oprofile.cpp 2009-03-01 16:11:37.000000000 +0000
@@ -11,6 +11,7 @@
*
*/
+#include <inttypes.h>
#include <iostream>
#include <map>
#include <string>

View File

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

View File

@ -0,0 +1,124 @@
---
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(-)
Index: Makefile.am
===================================================================
--- Makefile.am.orig
+++ Makefile.am
@@ -25,6 +25,7 @@ SUBDIRS = \
+AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
# The module will not build under distcheck
Index: agents/jvmpi/Makefile.am
===================================================================
--- agents/jvmpi/Makefile.am.orig
+++ 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
Index: agents/jvmti/Makefile.am
===================================================================
--- agents/jvmti/Makefile.am.orig
+++ 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
Index: libopagent/Makefile.am
===================================================================
--- libopagent/Makefile.am.orig
+++ 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
Index: m4/builtinexpect.m4
===================================================================
--- m4/builtinexpect.m4.orig
+++ 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",
Index: m4/mallocattribute.m4
===================================================================
--- m4/mallocattribute.m4.orig
+++ 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
]
)
Index: utils/opcontrol
===================================================================
--- utils/opcontrol.orig
+++ utils/opcontrol
@@ -481,10 +481,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,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:81881aa05e3950ab0dfc715baed0e9906306bed51ecd6ecfaf0af3d19c17e0e2
size 958342

View File

@ -1,24 +0,0 @@
From: Tony Jones <tonyj@suse.de>
Subject: Include libgen.h
Upstream: yes
Include libgen.h. This forces C++ to use xpg definition of basename which
matches what libiberty expects (default is ISO C++ version in string.h)
Otherwise build fails with:
/usr/include/libiberty.h:105: error: new declaration char* basename(const
char*)
/usr/include/string.h:599: error: ambiguates old declaration const char*
basename(const char*)
--- oprofile-0.9.4/configure.in.orig 2009-04-08 13:43:42.000000000 -0400
+++ oprofile-0.9.4/configure.in 2009-04-08 13:43:45.000000000 -0400
@@ -15,6 +15,7 @@ AC_INIT(libop/op_config.h)
AM_INIT_AUTOMAKE(oprofile, 0.9.4)
AM_CONFIG_HEADER(config.h)
+AC_CHECK_DECLS([basename], [], [], [[#include <libgen.h>]])
AC_PROG_RANLIB
AC_PROG_LIBTOOL

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Jul 29 13:49:06 CEST 2009 - jblunck@suse.de
- Move libopagent1 to its own package.
-------------------------------------------------------------------
Wed Jul 29 12:06:30 CEST 2009 - jblunck@suse.de
- Update to version 0.9.5-rc2.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 10 20:23:19 CEST 2009 - tonyj@suse.de Wed Jun 10 20:23:19 CEST 2009 - tonyj@suse.de

7
oprofile.rpmlintrc Normal file
View File

@ -0,0 +1,7 @@
# This line is mandatory to access the configuration functions
from Config import *
# Because reference via bfd_abort()
addFilter ("oprofile.*shared-lib-calls-exit")
# Because the library is called libopagent1
addFilter ("oprofile-devel.*no-dependency-on")

View File

@ -1,5 +1,5 @@
# #
# spec file for package oprofile (Version 0.9.4) # spec file for package oprofile (Version 0.9.5)
# #
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -18,21 +18,21 @@
Name: oprofile Name: oprofile
BuildRequires: binutils-devel java2-devel-packages libxslt popt-devel qt3-devel update-desktop-files BuildRequires: binutils-devel fdupes java2-devel-packages libxslt popt-devel qt3-devel update-desktop-files
Url: http://oprofile.sourceforge.net/ Url: http://oprofile.sourceforge.net/
License: GPL v2 or later License: GPL v2 or later
Group: Development/Tools/Other Group: Development/Tools/Other
AutoReqProv: on AutoReqProv: on
PreReq: /usr/sbin/groupadd /usr/sbin/useradd PreReq: /usr/sbin/groupadd /usr/sbin/useradd
Version: 0.9.4 Version: 0.9.5
Release: 53 Release: 1
Summary: System-Wide Profiler for Linux Systems Summary: System-Wide Profiler for Linux Systems
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{name}-%{version}.tar.gz Source: %{name}-%{version}-rc2.tar.bz2
Source1: %{name}.desktop Source1: %{name}.desktop
Source2: jvmpi.h Source2: %{name}.rpmlintrc
Patch1: %{name}-%{version}.diff Patch1: oprofile-0.9.5-buildfixes.diff
Patch2: oprofile-basename.diff Patch2: oprofile-0.9.4-fixes.diff
%description %description
OProfile is a system-wide profiler for Linux systems, capable of OProfile is a system-wide profiler for Linux systems, capable of
@ -67,9 +67,9 @@ Authors:
%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++
License: GPL v2 or later; LGPL v2.1 or later License: GPL v2 or later ; LGPL v2.1 or later
AutoReqProv: on AutoReqProv: on
Requires: oprofile = %{version}-%{release} binutils-devel Requires: libopagent1 = %{version}-%{release} binutils-devel
%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
@ -95,6 +95,43 @@ virtual machines.
Authors:
--------
John Levon <moz@compsoc.man.ac.uk>
Philippe Elie <phil_e@clubinternet.fr>
Dave Jones <davej@suse.de>
Bob Montgomery <bobm@fc.hp.com>
%package -n libopagent1
Summary: System-Wide Profiler for Linux Systems
Group: Development/Libraries/C and C++
License: GPL v2 or later ; LGPL v2.1 or later
AutoReqProv: on
%description -n libopagent1
OProfile is a system-wide profiler for Linux systems, capable of
profiling all running code at low overhead. OProfile is released under
the GNU GPL.
It consists of a kernel module and a daemon for collecting sample data,
and several post-profiling tools for turning data into information.
OProfile leverages the CPU hardware performance counters to enable
profiling of a wide variety of interesting statistics, which can also
be used for basic time-spent profiling. All code is profiled: hardware
and software interrupt handlers, kernel modules, the kernel, shared
libraries, and applications (the only exception being the oprofile
interrupt handler itself).
OProfile is currently in alpha status; however it has proven stable
over a large number of differing configurations. As always, there is no
warranty.
This package contains the files needed to develop JIT agents for other
virtual machines.
Authors: Authors:
-------- --------
John Levon <moz@compsoc.man.ac.uk> John Levon <moz@compsoc.man.ac.uk>
@ -103,12 +140,9 @@ Authors:
Bob Montgomery <bobm@fc.hp.com> Bob Montgomery <bobm@fc.hp.com>
%prep %prep
%setup -q %setup -q -n %{name}-%{version}-rc2
%patch1 %patch1
%patch2 -p1 %patch2 -p1
mkdir -p java/include
ln -s %_libdir/jvm/java/include/* java/include
test -f java/include/jvmpi.h || ln -s %{S:2} java/include
%build %build
autoreconf -fi autoreconf -fi
@ -121,14 +155,18 @@ 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.la
# Hardlink duplicate files automatically (from package fdupes):
# It doesn't save much, but it keeps rpmlint from breaking the package build.
%fdupes $RPM_BUILD_ROOT
%pre %pre
/usr/sbin/groupadd -r oprofile 2>/dev/null || : /usr/sbin/groupadd -r oprofile 2>/dev/null || :
/usr/sbin/useradd -r -g oprofile -d /var/lib/empty -s /bin/false -c "Special user account to be used by OProfile" oprofile 2>/dev/null || : /usr/sbin/useradd -r -g oprofile -d /var/lib/empty -s /bin/false -c "Special user account to be used by OProfile" oprofile 2>/dev/null || :
%post -p /sbin/ldconfig %post -n libopagent1 -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -n libopagent1 -p /sbin/ldconfig
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -138,8 +176,6 @@ rm -rf $RPM_BUILD_ROOT
/usr/bin/* /usr/bin/*
/usr/share/applications/*.desktop /usr/share/applications/*.desktop
/usr/share/oprofile /usr/share/oprofile
%{_libdir}/*.so*
%exclude %{_libdir}/libopagent.so
%{_mandir}/man1/* %{_mandir}/man1/*
%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
@ -148,161 +184,11 @@ 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}/*.*a %{_libdir}/libopagent.a
%{_libdir}/libopagent.so %{_libdir}/libopagent.so
%files -n libopagent1
%defattr(-,root,root)
%{_libdir}/*.so.1*
%changelog %changelog
* Wed Jun 10 2009 tonyj@suse.de
- Fix definition clash for basename
* Sun Mar 01 2009 coolo@suse.de
- fix compilation with gcc 4.4
* Thu Nov 20 2008 schwab@suse.de
- Properly handle SPE overlays.
* Wed Nov 19 2008 schwab@suse.de
- Work around broken java support.
* Wed Oct 29 2008 schwab@suse.de
- Fix uninitialized variable.
* Thu Oct 23 2008 schwab@suse.de
- Ignore section symbols.
* Tue Oct 21 2008 schwab@suse.de
- Fix jvm agent libs.
* Fri Jul 18 2008 schwab@suse.de
- Update to oprofile 0.9.4.
http://oprofile.sourceforge.net/release-notes/oprofile-0.9.4
* Fri Jul 11 2008 schwab@suse.de
- Update binutils check.
* Mon Nov 26 2007 schwab@suse.de
- Fix open call.
* Tue Oct 16 2007 schwab@suse.de
- Fix event mapping on 970MP [#333487].
* Thu Oct 11 2007 schwab@suse.de
- Fix missing includes.
* Tue Jul 17 2007 schwab@suse.de
- Update to oprofile 0.9.3.
* Wed Jul 04 2007 schwab@suse.de
- Update to oprofile 0.9.3-rc2.
* Mon Jun 18 2007 schwab@suse.de
- Update to oprofile 0.9.3-rc1.
* Thu Jan 11 2007 schwab@suse.de
- Add binutils-devel to BuildRequires.
* Mon Sep 18 2006 schwab@suse.de
- Update to oprofile 0.9.2 (no summary available).
* Fri Aug 18 2006 schwab@suse.de
- Avoid crash in find_nearest_line [#193622].
* Wed May 31 2006 schwab@suse.de
- Fix invalid string operation.
* Thu May 04 2006 schwab@suse.de
- Fix last change.
* Mon Feb 27 2006 schwab@suse.de
- Add events for Power5+ [#152494].
* Fri Jan 27 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 25 2006 schwab@suse.de
- Integrate fixes for ppc64 events and groups [#130910, #137665].
* Mon Dec 12 2005 schwab@suse.de
- Update to oprofile 0.9.1.
* Tue Nov 08 2005 dmueller@suse.de
- don't build as root
* Wed Sep 28 2005 schwab@suse.de
- Fix invalid C++.
* Wed Jul 06 2005 schwab@suse.de
- Unpack compressed vmlinux [#52767].
- Use RPM_OPT_FLAGS.
* Tue Jun 07 2005 schwab@suse.de
- Update to oprofile 0.9.
* Thu Mar 24 2005 schwab@suse.de
- Update to oprofile 0.8.2.
* Thu Nov 04 2004 schwab@suse.de
- Update to oprofile 0.8.1.
* Fri Sep 03 2004 schwab@suse.de
- Update to oprofile 0.8.
* Mon Jun 28 2004 skh@suse.de
- more fixes for #40468
- fixed print statement in op_help.c
- more power 4 events
- fixed incorrect event counter settings for power 4
* Tue Jun 08 2004 skh@suse.de
- Update to fix for #40468: use correct event numbers for power5
events.
* Wed May 26 2004 skh@suse.de
- Added default CYCLES event to the Power 4 and Power 5 event
files. (#40468)
* Tue May 25 2004 skh@suse.de
- add user space support for ppc64 (#40468)
* Sun May 09 2004 ak@suse.de
- Increase minimum count on P4 to 5000 for all events
- Automatically add the module path of the current kernel to oprofpp
(#36825)
- Fix 64bit uncleanness in symbol resolution (#36825)
* Sat Apr 10 2004 aj@suse.de
- Remove kernel-source requirement.
* Wed Feb 04 2004 skh@suse.de
- Updated to version 0.7.1
- Removed subpackage km_oprofile (it is part of the main kernel
distribution as of kernel 2.6)
- Don't build as root.
* Mon Oct 06 2003 ak@suse.de
- Check if APIC is enabled instead of crashing (#31774)
Needs updated kernel.
* Sat Aug 16 2003 adrian@suse.de
- add desktop file
* Thu Jul 31 2003 skh@suse.de
- Updated to 0.6
* Fri Jun 20 2003 mmj@suse.de
- Up to 0.5.4
* Fri Jun 13 2003 mmj@suse.de
- Package all dirs
* Wed Jun 04 2003 mmj@suse.de
- Make sure we get the right location for qt.
* Wed May 28 2003 mmj@suse.de
- Update to 0.5.3
* Tue May 13 2003 mmj@suse.de
- Use %%defattr
- Package forgotten files
* Mon Mar 31 2003 mmj@suse.de
- Update to 0.5.2 including:
· Docu overhaul
· Feature additions
- Bzip2'ed sources
- Folded both automake patches into one patch
* Tue Mar 11 2003 kukuk@suse.de
- Don't call depmod
* Tue Mar 11 2003 ro@suse.de
- remove k_deflt from neededforbuild (cycle)
* Mon Mar 10 2003 mmj@suse.de
- Fix typo
* Sat Mar 08 2003 mmj@suse.de
- A go at fixing km_oprofile
* Mon Mar 03 2003 duwe@suse.de
- split off km_oprofile
- tiny version update includes patches
* Mon Feb 24 2003 mmj@suse.de
- Add patch from davej to make it not crash the box
* Sat Feb 15 2003 adrian@suse.de
- minor dependency clean up
* Fri Feb 07 2003 mmj@suse.de
- Really fix build on x86_64
* Tue Feb 04 2003 mmj@suse.de
- Fix build on x86_64
* Tue Feb 04 2003 mmj@suse.de
- Update to oprofile 0.5:
· Pentium IV support, including support for HyperThreading, is
supported for 2.5 kernels (currently only in the -mm patchset).
· Timer interrupt support for PA-RISC, ppc64, and sparc64 in 2.5
kernels is available. Userspace Alpha support has been added.
· HyperThreading support for Pentium IV on 2.4 kernels is not yet
available. Note that PA-RISC and Alpha require kernel patches
not yet available in a released kernel tree.
· Support for the IA-64 architecture has been added for 2.4 kernels.
· OProfile's userspace now works correctly on all 64-bit platforms.
· A new script, opcontrol, has been added to unify control of the
OProfile daemon and sample files. On 2.5, this allows separate
daemon startup and starting/stopping profiling.
· Fixed upstream to compile with gcc 3.3
· Several bugfixes
* Wed Jan 29 2003 ro@suse.de
- fix build with gcc-3.3 (sluggish c++)
* Thu Nov 07 2002 mmj@suse.de
- Update to 0.4 which now has kernel 2.5 support
* Thu Sep 12 2002 mmj@suse.de
- Initial package, version 0.3 (x86 only for now)