diff --git a/jvmpi.h b/jvmpi.h new file mode 100644 index 0000000..bd68bb6 --- /dev/null +++ b/jvmpi.h @@ -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 diff --git a/oprofile.changes b/oprofile.changes index eab11b9..24af1ba 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +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 diff --git a/oprofile.spec b/oprofile.spec index 95de83a..40a01d2 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -20,18 +20,19 @@ Name: oprofile BuildRequires: binutils-devel fdupes java2-devel-packages libxslt popt-devel qt3-devel update-desktop-files Url: http://oprofile.sourceforge.net/ -License: GPLv2+ +License: GPLv2+ ; LGPLv2.1+ Group: Development/Tools/Other AutoReqProv: on PreReq: /usr/sbin/groupadd /usr/sbin/useradd Version: 0.9.6 -Release: 1 +Release: 2 Summary: System-Wide Profiler for Linux Systems BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: %{name}-%{version}.tar.bz2 Source1: %{name}.desktop Source2: %{name}.rpmlintrc Source3: baselibs.conf +Source4: jvmpi.h Patch1: oprofile-0.9.5-buildfixes.diff Patch2: oprofile-0.9.4-fixes.diff @@ -77,20 +78,6 @@ 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. @@ -114,22 +101,8 @@ 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. +This package contains the library needed at runtime when profiling JITed code +from supported virtual machines. @@ -144,6 +117,12 @@ Authors: %setup -q %patch1 %patch2 -p1 +mkdir -p java/include +# copy files necessary to build Java agent libraries +# libjvmpi_oprofile.so and libjvmti_oprofile.so +# %S:4 is rpm speak for Source4 (jvmpi.h) +ln -s %_libdir/jvm/java/include/* java/include +test -f java/include/jvmpi.h || ln -s %{S:4} java/include %build autoreconf -fi @@ -178,6 +157,8 @@ rm -rf $RPM_BUILD_ROOT /usr/share/applications/*.desktop /usr/share/oprofile %{_mandir}/man1/* +%{_libdir}/libjvm[tp]i_oprofile.so +%exclude %{_libdir}/libjvm[tp]i_oprofile.*a %doc doc/oprofile.html doc/internals.html doc/opreport.xsd %doc COPYING README TODO ChangeLog @@ -189,6 +170,6 @@ rm -rf $RPM_BUILD_ROOT %files -n libopagent1 %defattr(-,root,root) -%{_libdir}/*.so.1* +%{_libdir}/libopagent.so.1* %changelog