2009-07-30 22:54:32 +02:00
|
|
|
---
|
|
|
|
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(-)
|
|
|
|
|
2011-09-25 01:02:34 +02:00
|
|
|
--- a/Makefile.am
|
|
|
|
+++ b/Makefile.am
|
2009-07-30 22:54:32 +02:00
|
|
|
@@ -25,6 +25,7 @@ SUBDIRS = \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+AUTOMAKE_OPTIONS = foreign
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
|
|
|
# The module will not build under distcheck
|
2011-09-25 01:02:34 +02:00
|
|
|
--- a/agents/jvmpi/Makefile.am
|
|
|
|
+++ b/agents/jvmpi/Makefile.am
|
2009-07-30 22:54:32 +02:00
|
|
|
@@ -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
|
|
|
|
|
2011-09-25 01:02:34 +02:00
|
|
|
--- a/agents/jvmti/Makefile.am
|
|
|
|
+++ b/agents/jvmti/Makefile.am
|
2009-07-30 22:54:32 +02:00
|
|
|
@@ -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
|
|
|
|
|
2011-09-25 01:02:34 +02:00
|
|
|
--- a/libopagent/Makefile.am
|
|
|
|
+++ b/libopagent/Makefile.am
|
2009-07-30 22:54:32 +02:00
|
|
|
@@ -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
|
2011-09-25 01:02:34 +02:00
|
|
|
--- a/m4/builtinexpect.m4
|
|
|
|
+++ b/m4/builtinexpect.m4
|
2009-07-30 22:54:32 +02:00
|
|
|
@@ -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",
|
2011-09-25 01:02:34 +02:00
|
|
|
--- a/m4/mallocattribute.m4
|
|
|
|
+++ b/m4/mallocattribute.m4
|
2009-07-30 22:54:32 +02:00
|
|
|
@@ -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
|
|
|
|
]
|
|
|
|
)
|
2011-09-25 01:02:34 +02:00
|
|
|
--- a/utils/opcontrol
|
|
|
|
+++ b/utils/opcontrol
|
|
|
|
@@ -482,10 +482,19 @@ get_image_range()
|
2009-07-30 22:54:32 +02:00
|
|
|
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
|