- Feature detection of perf_events API (required) was failing causing the

build to fail.  Reported by DimStar Build problem notification email.
  New patch: oprofile-autoconf-fix-perf_events-detection.patch

OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=68
This commit is contained in:
Tony Jones 2024-11-08 21:32:47 +00:00 committed by Git OBS Bridge
commit eef738ff6c
13 changed files with 1143 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,13 @@
All patches need to have a patch description header similar to what is used in
SuSE kernel git tree. Patches added without this will be reverted. Thanks.
From: Name <email>
Subject: Summary of fix
Date: date
References: bnc#xxxxxx (bugzilla reference if applicable)
Upstream: yes (provide repo/commit-id in description) or no (provide reason)
Signed-Off-by: Name <email> (same as From: if committer is patch author)
Short paragraph describing problem/fix.
References to upstream repo-path/commit-id if applicable.

2
baselibs.conf Normal file
View File

@ -0,0 +1,2 @@
oprofile
libopagent1

104
jvmpi.h Normal file
View File

@ -0,0 +1,104 @@
#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

3
oprofile-1.4.0.tar.gz Normal file
View File

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

View File

@ -0,0 +1,28 @@
From: Tony Jones <tonyj@suse.de>
Date: Fri Nov 8 01:23:51 PM PST 2024
Subject: fix autoconf detection of perf_events
Upstream: pending
References: Message-ID: <169524738639.21909.3072410117418186253@localhost>
From: DimStar / Dominique Leuenberger <dimstar@opensuse.org>
Subject: openSUSE:Factory - oprofile - Build problem notification
Feature detection of perf_events API (required) was failing causing build
to fail. Fix forwarded to oprofile maintainer.
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index dc447f89..363bd440 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,6 +116,7 @@ if test "$kernel_may_have_perf_events_support" = "yes"; then
rm -f test-for-PERF_EVENT_OPEN
AC_LANG_CONFTEST(
[AC_LANG_PROGRAM([[#include <linux/perf_event.h>
+ #include <unistd.h>
#include <asm/unistd.h>
#include <sys/types.h>
#include <string.h>

42
oprofile-binutils.patch Normal file
View File

@ -0,0 +1,42 @@
From: Antoine Belvire <antoine.belvire@opensuse.org>
Subject: Fix linking on openSUSE Tumbleweed
Date: Sun Apr 30 17:19:41 UTC 2023
References: <none>
Upstream: no - not sure whether problem is generic or specific to Tumbleweed's binutils
Signed-Off-by: Antoine Belvire <antoine.belvire@opensuse.org>
--
diff -up oprofile-1.4.0/configure.ac.orig oprofile-1.4.0/configure.ac
--- oprofile-1.4.0/configure.ac.orig 2023-04-30 19:27:30.316426363 +0200
+++ oprofile-1.4.0/configure.ac 2023-04-30 19:56:37.828498811 +0200
@@ -333,7 +333,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 $Z_LIB"
+BFD_LIBS="-lbfd -liberty $DL_LIB $INTL_LIB $Z_LIB $SFRAME_LIB"
POPT_LIBS="-lpopt"
AC_SUBST(LIBERTY_LIBS)
AC_SUBST(BFD_LIBS)
diff -up oprofile-1.4.0/m4/binutils.m4.orig oprofile-1.4.0/m4/binutils.m4
--- oprofile-1.4.0/m4/binutils.m4.orig 2023-04-30 18:19:47.848257943 +0200
+++ oprofile-1.4.0/m4/binutils.m4 2023-04-30 21:40:11.412756411 +0200
@@ -10,12 +10,14 @@ 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(bfd, bfd_openr, LIBS="-lbfd $LIBS"; Z_LIB="",
+AC_CHECK_LIB(bfd, bfd_openr, LIBS="-lbfd $LIBS"; Z_LIB=""; SFRAME_LIB="",
[AC_CHECK_LIB(z, compress,
-dnl Use a different bfd function here so as not to use cached result from above
- [AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="-lbfd -lz $LIBS"; Z_LIB="-lz",
- [AC_MSG_ERROR([bfd library not found])], -lz)
- ],
+dnl Use different bfd functions below so as not to use cached results from above
+ [AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="-lbfd -lz $LIBS"; Z_LIB="-lz"; SFRAME_LIB="",
+ [AC_CHECK_LIB(bfd, bfd_openstreamr, LIBS="-lbfd -lz -lsframe -lzstd $LIBS"; Z_LIB="-lz"; SFRAME_LIB="-lsframe -lzstd",
+ [AC_MSG_ERROR([bfd library not found])], -lz -lsframe -lzstd)
+ ], -lz)
+ ],
[AC_MSG_ERROR([libz library not found; required by libbfd])])
]
)

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

21
oprofile-pfm-ppc.patch Normal file
View File

@ -0,0 +1,21 @@
From: Tony Jones <tonyj@suse.de>
Subject: enable pfm detection for 32bit ppc
Upstream: no
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: oprofile-1.1.0/configure.ac
===================================================================
--- oprofile-1.1.0.orig/configure.ac
+++ oprofile-1.1.0/configure.ac
@@ -205,7 +205,7 @@ rm -f test-for-precise-ip*
AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HAVE_PERF_EVENTS, [Kernel support for perf_events exists])
AC_CANONICAL_HOST
PFM_LIB=
-if test "$host_cpu" = "powerpc64le" -o "$host_cpu" = "powerpc64"; then
+if test "$host_cpu" = "powerpc64le" -o "$host_cpu" = "powerpc64" -o "$host_cpu" = "powerpc32"; then
AC_CHECK_HEADER(perfmon/pfmlib.h,,[AC_MSG_ERROR([pfmlib.h not found; may be provided by libpfm devel or papi devel package])])
AC_CHECK_LIB(pfm,pfm_get_os_event_encoding, HAVE_LIBPFM3='0'; HAVE_LIBPFM='1', [
AC_CHECK_LIB(pfm, pfm_get_event_name, HAVE_LIBPFM3='1'; HAVE_LIBPFM='1',

695
oprofile.changes Normal file
View File

@ -0,0 +1,695 @@
-------------------------------------------------------------------
Fri Nov 8 21:30:32 UTC 2024 - Tony Jones <tonyj@suse.com>
- Feature detection of perf_events API (required) was failing causing the
build to fail. Reported by DimStar Build problem notification email.
New patch: oprofile-autoconf-fix-perf_events-detection.patch
-------------------------------------------------------------------
Thu Sep 28 01:52:52 UTC 2023 - Tony Jones <tonyj@suse.com>
- Fix build error, change user/group pre handling to procedure specified
at https://en.opensuse.org/Packaging/Users_And_Groups
-------------------------------------------------------------------
Sun Apr 30 17:19:41 UTC 2023 - Antoine Belvire <antoine.belvire@opensuse.org>
- Fix linking on Tumbleweed:
* Add oprofile-binutils.patch.
* Add build dependency on libzstd-devel.
-------------------------------------------------------------------
Sat Jan 16 18:21:11 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 1.4.0:
* New/updated Processor Support
* Marvell (Cavium) ThunderX2
* Hygon Dhyana CPU
* Bugfixes
* Does not build with binutils-gdb master.
* ocount leaves orphan process on error
- remove oprofile-handle-empty-event-name-spec-gracefully-for-ppc.patch,
oprofile-handle-binutils-2_34.patch: upstream
-------------------------------------------------------------------
Tue Oct 13 10:06:24 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Do not suppress error text output from useradd.
-------------------------------------------------------------------
Wed Apr 8 12:11:10 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>
- Add upstream patch:
* oprofile-handle-binutils-2_34.patch
- Spec cleanup
-------------------------------------------------------------------
Thu Jan 23 22:12:54 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Use docbook-utils-minimal for manpage generation, avoids
texlive dependency.
-------------------------------------------------------------------
Mon Oct 29 21:07:04 UTC 2018 - Tony Jones <tonyj@suse.com>
- Handle empty event name gracefully on ppc.
New patch: oprofile-handle-empty-event-name-spec-gracefully-for-ppc.patch
-------------------------------------------------------------------
Thu Jul 26 15:57:53 UTC 2018 - tonyj@suse.com
- Update to version 1.3.0
- New/updated Processor Support for Intel Goldmont Plus
- Minor bug fixes
Release notes: http://oprofile.sourceforge.net/release-notes/oprofile-1.3.0
-------------------------------------------------------------------
Mon Oct 2 21:39:00 UTC 2017 - jengelh@inai.de
- Rectify RPM groups. Update summary of -devel subpackage.
Do not ignore errors from useradd/groupadd.
Avoid running fdupes across partitions.
-------------------------------------------------------------------
Mon Sep 25 15:10:23 UTC 2017 - fcrozat@suse.com
- Remove qt-devel from BuildRequires, it is no needed anymore.
-------------------------------------------------------------------
Mon Aug 7 23:54:02 UTC 2017 - tonyj@suse.com
- Update to version 1.2.0
- New/updated Processor Support
* ARM Cortex A17
* IBM Power 9
* IBM Power 8NV and NVL variants
* IBM z13
* Intel Goldmont
* Intel Kabylake
* Intel Xeon Phi (Knights Landing)
* Achitecture specific events for Applied Micro X-Gene
- Bug fixes
* #286 - Compilation error: left shift of negative value
* #288 - oprofile fails to build with --enable-pch and gcc-6.2
- Other fixes
* Fixed compile warning and errors when using GCC 6 or GCC 7
* Avoid using deprecated readdir_r function
* Store samples in the archive and search the appropriate places
for samples
* Only start the application if the perf events setup was successful
* Corrections in the code and i386 events so "make check" tests pass
- Drop local patch oprofile-1.1.0-gcc6.patch (upstream)
-------------------------------------------------------------------
Sat May 20 19:14:15 UTC 2017 - tchvatal@suse.com
- Depend on java-devel instead of deprecated provide
-------------------------------------------------------------------
Sat Mar 11 20:53:29 UTC 2017 - sfalken@opensuse.org
- Edited %files to clear unpackaged files builderror in
openSUSE:Factory
-------------------------------------------------------------------
Sat Jul 2 18:17:27 UTC 2016 - i@marguerite.su
- add patch: oprofile-1.1.0-gcc6.patch, fixed boo#985359
* cherry picked upstream commit 39d4d4, so please
remember to drop it next release
* GCC 6 is pickier about some of the type conversions
avoid the intermediate bool type to make it happy
-------------------------------------------------------------------
Fri Dec 25 10:07:44 UTC 2015 - mpluskal@suse.com
- Update to 1.1.0
* New/updated Processor Support
+ Broadcom Brahmma-B15 CPU
+ Intel Skylake
+ Intel Airmont
+ Intel Xeon D
* Bug fixes
+ Prevent dropping of samples when the JVM changes memory
mappings
+ Better handling of IBM Power JVM generated zero-sized
mappings
+ Correct handling of anon_hugepage mmap entries for Java
+ Improved oparchive documentation and man page
+ Fixed compile error when using compile fortification
+ Support IBM Power 8 event code larger than sizeof int
+ Avoid changing POSIXLY_CORRECT environment variable for
processes monitored by operf and ocount
+ Ensure correct setting of the extra bits (edge, inv, cmask)
for Intel processors
+ Fix default unit masks for Intel Haswell and Broadwell
processors
+ Correctly initialize operf temporary file header information
- Cleanup spec file with spec-cleaner
- Use url for source
- Drop desktop file since binary it is calling is no longer
present (at least since version 1.0.0)
- Update dependencies
-------------------------------------------------------------------
Fri Sep 19 16:05:07 UTC 2014 - tonyj@suse.com
- Update to version 1.0.0. THIS IS A MAJOR OPROFILE RELEASE WITH SIGNIFICANT
CHANGES FROM THE PREVIOUS 0.9.9 RELEASE. See changelog below.
Drop patch: oprofile-add-support-for-intel-silvermont-processor.patch
Drop patch: oprofile-compressed-kernel.patch
Drop patch: oprofile-configure-error-message-for-missing-libpfm-is-not-informative-enough.patch
Drop patch: oprofile-enable-for-new-ppc64le-architecture.patch
Drop patch: oprofile-fix-unable-to-open-cpu_type-file-for-reading-for-ibm-power7.patch
Drop patch: oprofile-make-cpu-type-power8e-equivalent-to-power8.patch
Changelog:
Major changes:
- The legacy opcontrol-based profiler has been removed. operf is now the
only supported interface
- GUI component (i.e., oprof_start) has been removed.
- IBS events removed from AMD processors
- Following architectures have been removed (Alpha [except for EV67 which
is supported by operf/ocount], avr32, ia64, IBM Cell, P.A Semi PA64T)
- RTV (real time clock) mode has been removed
Other incompatibilities:
- Sample data collected with previous releases of OProfile are incompatible
with release 1.0.
- ophelp schema: Major version changed for removal of unit mask 'extra'
attribute and addition of unit mask 'name'.
New features:
- Enhance ocount to support millisecond time intervals
- Obtain kernel symbols from /proc/kallsyms if no vmlinux file specified
- New Processor Support (Freescale e6500, Freescale e500mc,
Intel Silvermont, ARMv7 Krait, APM X-Gene (ARMv8),
Intel Broadwell, ARMv8 Cortex A57, ARMv8 Cortex A53
- Added little endian support for IBM POWER8
- Update events for IBM POWER8
- Added edge-detect events for IBM POWER7
- Update events for Intel Haswell
Bug Fixes:
- opreport schema: Fix count field maxOccurs (changed to 'unbounded')
- Fix compile error on ppc/uClibc platform: 'AT_BASE_PLATFORM' undeclared'
- Duplicate event specs passed to ocount show up twice in output
- Fix operf/ocount default unit mask selection
- ocount: print the unit mask, kernel and user modes if specified for the
event
- ophelp schema is not included in installed files
- Remove unused 'extra' attribute from ophelp schema
- opreport from 'operf --callgraph' profile shows false recursive calls
- Fix handling of default named unit masks longer than 11 chars
- Print unit mask name where applicable in ophelp XML output
- Fix profiling of multi-threaded apps when using "--pid" option
- Fix operf/opreport kernel throttling detection
- Fix sample attribution problem when using multiple events
- exclude/include files option doesn't work for opannotate -a
- Fix behavior and documentation for '--threshold' option
- Remove hard-coded timeout for JIT dump conversion
- Update Alpha EV67 CPU support and remove all other Alpha CPU support
- operf main process improperly killing conversion process
- Fix up S390 support to work with operf/ocount
- Link ocount with librt for clock_gettime only when needed
- Fix 'Invalid argument' running 'opcontrol --start --callgraph=<n>' in
Timer mode
- Allow root to remove old jitdump files from /tmp/.oprofile/jitdump
- Remove opreport warnings for /no-vmlinux, [vdso], [hypervisor_bucket]
not found
- Fix event codes for marked architected events (IBM ppc64)
- Make operf/ocount detect invalid timer mode from opcontrol
- Reduce overhead of operf waiting for profiled app to end
- Fix "Unable to open cpu_type file for reading" for IBM POWER7+
- Allow all native events for IBM POWER8 in POWER7 compat mode
- Fix spurious "backtraces skipped due to no file mapping" log entries
- Fix the units for the reported CPU frequency
-------------------------------------------------------------------
Thu Aug 14 17:45:58 UTC 2014 - tonyj@suse.com
- Add support for Intel Silvermont processor (bnc#891892)
New patch: oprofile-add-support-for-intel-silvermont-processor.patch
-------------------------------------------------------------------
Thu Mar 6 19:40:06 UTC 2014 - tonyj@suse.com
- Support ppc64le/power8e (bnc#867091)
added patches:
* oprofile-configure-error-message-for-missing-libpfm-is-not-informative-enough.patch
* oprofile-enable-for-new-ppc64le-architecture.patch
* oprofile-fix-unable-to-open-cpu_type-file-for-reading-for-ibm-power7.patch
* oprofile-make-cpu-type-power8e-equivalent-to-power8.patch
modified patches:
* oprofile-pfm-ppc.patch
-------------------------------------------------------------------
Wed Aug 7 17:18:32 UTC 2013 - tonyj@suse.com
- Update to version 0.9.9
http://oprofile.sourceforge.net/release-notes/oprofile-0.9.9
- New 'ocount' program introduced for collecting raw event counts without
post processing.
- New processor support for Haswell, zEC12, Power8
- New support for AMD Generic Performance Events and IBM Power ISA 2.07 Architected Events
- Numerous bug fixes.
-------------------------------------------------------------------
Thu Jan 3 20:14:41 UTC 2013 - tonyj@suse.com
- Add dependancy on libpfm 4.3 for powerpc.
- Add patch 'oprofile-pfm-ppc.patch' (fix configure for 32bit powerpc)
-------------------------------------------------------------------
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
- add libtool as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Sat Sep 24 16:34:13 UTC 2011 - tonyj@suse.com
- Upgrade to version 0.9.7.
- Drop unneeded patches.
- Remove non-utf8 characters from changelog
-------------------------------------------------------------------
Tue May 3 03:02:55 UTC 2011 - idoenmez@novell.com
- Add oprofile-0.9.6-gcc46.patch to fix compilation with gcc 4.6
-------------------------------------------------------------------
Thu Apr 28 18:33:19 UTC 2011 - tonyj@novell.com
- Add support for building using qt4 (no bnc)
-------------------------------------------------------------------
Thu Apr 28 18:14:54 UTC 2011 - tonyj@novell.com
- Add README-BEFORE-ADDING-PATCHES local file documenting required patch
header
-------------------------------------------------------------------
Tue Jun 29 15:10:22 UTC 2010 - coolo@novell.com
- fix baselibs.conf
-------------------------------------------------------------------
Thu Jun 24 21:17:12 UTC 2010 - tonyj@novell.com
- Fix packaging of java agent libs bnc#576533
- Remove unnecessary verbage from %desc for oprofile-devel and libopagent
- Make %files of libopagent more specific to avoid future errors
-------------------------------------------------------------------
Wed Feb 3 17:00:54 CET 2010 - rguenther@suse.de
- Update to 0.9.6. Fixes
* opcontrol cannot start daemon in timer mode
* Improper handling of separate debuginfo files
* XML callgraph output has no symbol-level sample counts
-------------------------------------------------------------------
Mon Feb 1 12:14:05 UTC 2010 - jengelh@medozas.de
- Package baselibs.conf
-------------------------------------------------------------------
Tue Aug 4 03:28:28 CEST 2009 - tonyj@novell.com
- Update to 0.9.5 - i386/nehalem/events is the only difference from RC2
-------------------------------------------------------------------
Fri Jul 31 10:11:28 CEST 2009 - jblunck@suse.de
- Remove libopagent static libary. It is used to inject information from a VM
into the OProfile data and is therefore not suitable for being statically
linked into the VM itself.
-------------------------------------------------------------------
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
- Fix definition clash for basename
-------------------------------------------------------------------
Sun Mar 1 17:17:56 CET 2009 - coolo@suse.de
- fix compilation with gcc 4.4
-------------------------------------------------------------------
Thu Nov 20 17:50:40 CET 2008 - schwab@suse.de
- Properly handle SPE overlays.
-------------------------------------------------------------------
Wed Nov 19 15:18:30 CET 2008 - schwab@suse.de
- Work around broken java support.
-------------------------------------------------------------------
Wed Oct 29 10:34:33 CET 2008 - schwab@suse.de
- Fix uninitialized variable.
-------------------------------------------------------------------
Thu Oct 23 17:06:54 CEST 2008 - schwab@suse.de
- Ignore section symbols.
-------------------------------------------------------------------
Tue Oct 21 15:27:26 CEST 2008 - schwab@suse.de
- Fix jvm agent libs.
-------------------------------------------------------------------
Fri Jul 18 13:43:33 CEST 2008 - schwab@suse.de
- Update to oprofile 0.9.4.
http://oprofile.sourceforge.net/release-notes/oprofile-0.9.4
-------------------------------------------------------------------
Fri Jul 11 14:44:26 CEST 2008 - schwab@suse.de
- Update binutils check.
-------------------------------------------------------------------
Mon Nov 26 13:08:50 CET 2007 - schwab@suse.de
- Fix open call.
-------------------------------------------------------------------
Tue Oct 16 16:50:06 CEST 2007 - schwab@suse.de
- Fix event mapping on 970MP [#333487].
-------------------------------------------------------------------
Thu Oct 11 15:24:20 CEST 2007 - schwab@suse.de
- Fix missing includes.
-------------------------------------------------------------------
Tue Jul 17 14:08:54 CEST 2007 - schwab@suse.de
- Update to oprofile 0.9.3.
-------------------------------------------------------------------
Wed Jul 4 14:39:04 CEST 2007 - schwab@suse.de
- Update to oprofile 0.9.3-rc2.
-------------------------------------------------------------------
Mon Jun 18 17:19:04 CEST 2007 - schwab@suse.de
- Update to oprofile 0.9.3-rc1.
-------------------------------------------------------------------
Thu Jan 11 11:19:25 CET 2007 - schwab@suse.de
- Add binutils-devel to BuildRequires.
-------------------------------------------------------------------
Mon Sep 18 19:17:15 CEST 2006 - schwab@suse.de
- Update to oprofile 0.9.2 (no summary available).
-------------------------------------------------------------------
Fri Aug 18 15:23:52 CEST 2006 - schwab@suse.de
- Avoid crash in find_nearest_line [#193622].
-------------------------------------------------------------------
Wed May 31 11:18:29 CEST 2006 - schwab@suse.de
- Fix invalid string operation.
-------------------------------------------------------------------
Thu May 4 14:52:58 CEST 2006 - schwab@suse.de
- Fix last change.
-------------------------------------------------------------------
Mon Feb 27 18:31:44 CET 2006 - schwab@suse.de
- Add events for Power5+ [#152494].
-------------------------------------------------------------------
Fri Jan 27 02:18:47 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Jan 25 18:58:19 CET 2006 - schwab@suse.de
- Integrate fixes for ppc64 events and groups [#130910, #137665].
-------------------------------------------------------------------
Mon Dec 12 15:06:45 CET 2005 - schwab@suse.de
- Update to oprofile 0.9.1.
-------------------------------------------------------------------
Tue Nov 8 14:40:30 CET 2005 - dmueller@suse.de
- don't build as root
-------------------------------------------------------------------
Wed Sep 28 21:25:23 CEST 2005 - schwab@suse.de
- Fix invalid C++.
-------------------------------------------------------------------
Wed Jul 6 15:02:31 CEST 2005 - schwab@suse.de
- Unpack compressed vmlinux [#52767].
- Use RPM_OPT_FLAGS.
-------------------------------------------------------------------
Tue Jun 7 15:58:48 CEST 2005 - schwab@suse.de
- Update to oprofile 0.9.
-------------------------------------------------------------------
Thu Mar 24 10:49:32 CET 2005 - schwab@suse.de
- Update to oprofile 0.8.2.
-------------------------------------------------------------------
Thu Nov 4 15:16:52 CET 2004 - schwab@suse.de
- Update to oprofile 0.8.1.
-------------------------------------------------------------------
Fri Sep 3 23:04:58 CEST 2004 - schwab@suse.de
- Update to oprofile 0.8.
-------------------------------------------------------------------
Mon Jun 28 14:25:15 CEST 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 8 15:44:19 CEST 2004 - skh@suse.de
- Update to fix for #40468: use correct event numbers for power5
events.
-------------------------------------------------------------------
Wed May 26 16:19:40 CEST 2004 - skh@suse.de
- Added default CYCLES event to the Power 4 and Power 5 event
files. (#40468)
-------------------------------------------------------------------
Tue May 25 15:38:05 CEST 2004 - skh@suse.de
- add user space support for ppc64 (#40468)
-------------------------------------------------------------------
Sun May 9 18:02:14 CEST 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 18:12:25 CEST 2004 - aj@suse.de
- Remove kernel-source requirement.
-------------------------------------------------------------------
Wed Feb 4 19:47:37 CET 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 6 14:44:12 CEST 2003 - ak@suse.de
- Check if APIC is enabled instead of crashing (#31774)
Needs updated kernel.
-------------------------------------------------------------------
Sat Aug 16 09:48:06 CEST 2003 - adrian@suse.de
- add desktop file
-------------------------------------------------------------------
Thu Jul 31 16:26:58 CEST 2003 - skh@suse.de
- Updated to 0.6
-------------------------------------------------------------------
Fri Jun 20 15:07:26 CEST 2003 - mmj@suse.de
- Up to 0.5.4
-------------------------------------------------------------------
Fri Jun 13 12:19:11 CEST 2003 - mmj@suse.de
- Package all dirs
-------------------------------------------------------------------
Wed Jun 4 14:12:03 CEST 2003 - mmj@suse.de
- Make sure we get the right location for qt.
-------------------------------------------------------------------
Wed May 28 11:57:29 CEST 2003 - mmj@suse.de
- Update to 0.5.3
-------------------------------------------------------------------
Tue May 13 14:06:49 CEST 2003 - mmj@suse.de
- Use %defattr
- Package forgotten files
-------------------------------------------------------------------
Mon Mar 31 13:18:26 CEST 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 07:01:43 CET 2003 - kukuk@suse.de
- Don't call depmod
-------------------------------------------------------------------
Mon Mar 10 23:23:27 CET 2003 - ro@suse.de
- remove k_deflt from neededforbuild (cycle)
-------------------------------------------------------------------
Mon Mar 10 14:37:16 CET 2003 - mmj@suse.de
- Fix typo
-------------------------------------------------------------------
Sat Mar 8 00:51:48 CET 2003 - mmj@suse.de
- A go at fixing km_oprofile
-------------------------------------------------------------------
Mon Mar 3 17:56:14 CET 2003 - duwe@suse.de
- split off km_oprofile
- tiny version update includes patches
-------------------------------------------------------------------
Mon Feb 24 17:34:20 CET 2003 - mmj@suse.de
- Add patch from davej to make it not crash the box
-------------------------------------------------------------------
Sat Feb 15 16:29:30 CET 2003 - adrian@suse.de
- minor dependency clean up
-------------------------------------------------------------------
Fri Feb 7 18:12:45 CET 2003 - mmj@suse.de
- Really fix build on x86_64
-------------------------------------------------------------------
Tue Feb 4 21:29:58 CET 2003 - mmj@suse.de
- Fix build on x86_64
-------------------------------------------------------------------
Tue Feb 4 04:19:45 CET 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 02:13:55 CET 2003 - ro@suse.de
- fix build with gcc-3.3 (sluggish c++)
-------------------------------------------------------------------
Thu Nov 7 15:51:19 CET 2002 - mmj@suse.de
- Update to 0.4 which now has kernel 2.5 support
-------------------------------------------------------------------
Thu Sep 12 13:28:38 CEST 2002 - mmj@suse.de
- Initial package, version 0.3 (x86 only for now)
-------------------------------------------------------------------

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")

171
oprofile.spec Normal file
View File

@ -0,0 +1,171 @@
#
# spec file for package oprofile
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: oprofile
Version: 1.4.0
Release: 0
Summary: System-Wide Profiler for Linux Systems
License: GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Development/Tools/Other
URL: http://oprofile.sourceforge.net/
Source0: http://prdownloads.sourceforge.net/oprofile/oprofile-%{version}.tar.gz
Source2: %{name}.rpmlintrc
Source3: baselibs.conf
Source4: jvmpi.h
Source5: README-BEFORE-ADDING-PATCHES
Patch1: %{name}-no-libjvm-version.patch
Patch2: %{name}-pfm-ppc.patch
Patch3: %{name}-binutils.patch
Patch4: %{name}-autoconf-fix-perf_events-detection.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: binutils-devel
BuildRequires: docbook-utils-minimal
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: java-devel
BuildRequires: libICE-devel
BuildRequires: libtool
BuildRequires: libxslt
BuildRequires: libzstd-devel
BuildRequires: pkgconfig
BuildRequires: popt-devel
BuildRequires: zlib-devel
Requires(pre): pwdutils
%ifarch ppc ppc64 ppc64le
BuildRequires: libpfm-devel >= 4.3.0
%endif
%description
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 is the package containing the userspace tools.
%package devel
Summary: Development files for oprofile, a system-wide profiler for Linux
Group: Development/Libraries/C and C++
Requires: binutils-devel
Requires: libopagent1 = %{version}-%{release}
%description devel
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.
This package contains the files needed to develop JIT agents for other
virtual machines.
%package -n libopagent1
Summary: System-Wide Profiler for Linux Systems
Group: System/Libraries
%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.
This package contains the library needed at runtime when profiling JITed code
from supported virtual machines.
%prep
%autosetup -p1
mkdir -p java/include
# copy files necessary to build Java agent libraries
# libjvmpi_oprofile.so and libjvmti_oprofile.so
ln -s %{_libdir}/jvm/java/include/* java/include
test -f java/include/jvmpi.h || ln -s %{SOURCE4} java/include
%build
./autogen.sh
%configure \
--with-java=$PWD/java
# Change DATE/TIME macros to use last change time of oprofile.changes
# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec grep -E -e __DATE__ -e __TIME__ {} +
find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
%make_build
%install
%make_install htmldir=%{_docdir}/oprofile
rm -f %{buildroot}%{_libdir}/oprofile/libopagent.*a
# Hardlink duplicate files automatically (from package fdupes):
# It doesn't save much, but it keeps rpmlint from breaking the package build.
%fdupes %{buildroot}/%{_prefix}
%pre
getent group oprofile >/dev/null || groupadd -r oprofile 2> /dev/null
getent passwd oprofile >/dev/null || \
useradd -r -g oprofile -d %{_localstatedir}/lib/empty \
-s /bin/false -c "Special user account to be used by OProfile" \
oprofile 2> /dev/null
%post -n libopagent1 -p /sbin/ldconfig
%postun -n libopagent1 -p /sbin/ldconfig
%files
%{_bindir}/ocount
%{_bindir}/ophelp
%{_bindir}/opimport
%{_bindir}/opannotate
%{_bindir}/opgprof
%{_bindir}/opreport
%{_bindir}/oparchive
%{_bindir}/opjitconv
%{_bindir}/op-check-perfevents
%{_bindir}/operf
%{_datadir}/oprofile
%{_mandir}/man1/*
%{_libdir}/oprofile/libjvm[tp]i_oprofile.so
%exclude %{_libdir}/oprofile/libjvm[tp]i_oprofile.*a
%doc doc/oprofile.html doc/internals.html doc/opreport.xsd
%{_docdir}/%{name}/ophelp.xsd
%doc README TODO ChangeLog-*
%license COPYING
%files devel
%{_includedir}/*
%{_docdir}/%{name}/op-jit-devel.html
%dir %{_libdir}/oprofile
%{_libdir}/oprofile/libopagent.so
%files -n libopagent1
%dir %{_libdir}/oprofile
%{_libdir}/oprofile/libopagent.so.1*
%changelog