OBS User unknown 2008-11-20 15:06:19 +00:00 committed by Git OBS Bridge
parent 41d842317c
commit ae342347bf
3 changed files with 121 additions and 6 deletions

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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
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

View File

@ -25,11 +25,12 @@ Group: Development/Tools/Other
AutoReqProv: on
PreReq: /usr/sbin/groupadd /usr/sbin/useradd
Version: 0.9.4
Release: 48
Release: 49
Summary: System-Wide Profiler for Linux Systems
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: jvmpi.h
Patch: %{name}-%{version}.diff
%description
@ -103,12 +104,15 @@ Authors:
%prep
%setup -q
%patch
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
autoreconf -fi
./configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
--prefix=/usr --mandir=%{_mandir} --libdir=%{_libdir} \
--with-kernel-support --with-java=%_libdir/jvm/java \
--with-kernel-support --with-java=$PWD/java \
--with-qt-libraries=%_libdir/qt3/%_lib
make %{?jobs:-j%jobs}
@ -146,6 +150,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libopagent.so
%changelog
* 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
@ -200,7 +206,7 @@ rm -rf $RPM_BUILD_ROOT
- Update to oprofile 0.8.2.
* Thu Nov 04 2004 schwab@suse.de
- Update to oprofile 0.8.1.
* Sat Sep 04 2004 schwab@suse.de
* Fri Sep 03 2004 schwab@suse.de
- Update to oprofile 0.8.
* Mon Jun 28 2004 skh@suse.de
- more fixes for #40468
@ -253,7 +259,7 @@ rm -rf $RPM_BUILD_ROOT
- 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
* Mon Mar 10 2003 ro@suse.de
- remove k_deflt from neededforbuild (cycle)
* Mon Mar 10 2003 mmj@suse.de
- Fix typo