OBS User autobuild 2010-01-07 12:04:09 +00:00 committed by Git OBS Bridge
parent 37bedb9d14
commit c3b7d97560
4 changed files with 53 additions and 118 deletions

View File

@ -1,43 +0,0 @@
--- configure.in
+++ configure.in
@@ -656,6 +656,17 @@
],
GLIBC_VERSION="2.10")
+AC_EGREP_CPP([GLIBC_211], [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 11)
+ GLIBC_211
+ #endif
+#endif
+],
+GLIBC_VERSION="2.11")
+
+
AC_EGREP_CPP([AIX5_LIBC], [
#include <standards.h>
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
@@ -742,6 +753,13 @@
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.11)
+ AC_MSG_RESULT(2.11 family)
+ AC_DEFINE([GLIBC_2_11], 1, [Define to 1 if you're using glibc 2.11.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
aix5)
AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
@@ -755,7 +773,7 @@
*)
AC_MSG_RESULT(unsupported version)
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.10])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.11])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
AC_MSG_ERROR([or Darwin libc])
;;

View File

@ -1,22 +1,22 @@
Index: include/valgrind.h
===================================================================
--- include/valgrind.h (revision 10894)
--- include/valgrind.h (revision 7276)
+++ include/valgrind.h (working copy)
@@ -3648,7 +3648,11 @@
VG_USERREQ__STACK_CHANGE = 0x1503,
/* Wine support */
- VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601
+ VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
@@ -3625,7 +3625,11 @@
/* Stack support. */
VG_USERREQ__STACK_REGISTER = 0x1501,
VG_USERREQ__STACK_DEREGISTER = 0x1502,
- VG_USERREQ__STACK_CHANGE = 0x1503
+ VG_USERREQ__STACK_CHANGE = 0x1503,
+
+ /* JIT support */
+ VG_USERREQ__JIT_REGISTER_MAP = 0x1701,
+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1702
+ VG_USERREQ__JIT_REGISTER_MAP = 0x1601,
+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1602
} Vg_ClientRequest;
#if !defined(__GNUC__)
@@ -4009,7 +4013,21 @@
fd, ptr, total_size, delta, 0); \
@@ -3904,7 +3908,21 @@
id, start, end, 0, 0); \
}
+#define VALGRIND_JIT_REGISTER_MAP(name, start, end) \
@ -39,20 +39,13 @@ Index: include/valgrind.h
#undef PLAT_ppc32_linux
Index: coregrind/m_debuginfo/debuginfo.c
===================================================================
--- coregrind/m_debuginfo/debuginfo.c (revision 10894)
--- coregrind/m_debuginfo/debuginfo.c (revision 7276)
+++ coregrind/m_debuginfo/debuginfo.c (working copy)
@@ -47,6 +47,7 @@
#include "pub_core_oset.h"
#include "pub_core_stacktrace.h" // VG_(get_StackTrace) XXX: circular dependency
#include "pub_core_ume.h"
+#include "pub_core_mallocfree.h"
#include "priv_misc.h" /* dinfo_zalloc/free */
#include "priv_d3basics.h" /* ML_(pp_GX) */
@@ -1131,6 +1132,132 @@
#endif /* defined(VGO_aix5) */
@@ -576,6 +576,132 @@
return True;
}
+
+/* Storing and retrieving information caused by JITted code. TODO:
+ move somewhere more suitable. */
+
@ -78,13 +71,13 @@ Index: coregrind/m_debuginfo/debuginfo.c
+ if (jit_entry_count + 1 >= jit_entries_size) {
+ if (jit_entries == NULL) {
+ jit_entries = VG_(arena_calloc)(
+ VG_AR_DINFO, "jit-register",
+ VG_AR_SYMTAB,
+ JITSYMS_START_SIZE, sizeof(JitEntry)
+ );
+ jit_entries_size = JITSYMS_START_SIZE;
+ } else {
+ jit_entries = VG_(arena_realloc)(
+ VG_AR_DINFO, "jit-register", jit_entries,
+ VG_AR_SYMTAB, jit_entries,
+ (jit_entries_size + JITSYMS_INCREMENT)
+ * sizeof(JitEntry)
+ );
@ -118,7 +111,7 @@ Index: coregrind/m_debuginfo/debuginfo.c
+ jit_entries [j] = jit_entries [j-1];
+ }
+
+ jit_entries [slot].name = VG_(strdup)("jit-register", name);
+ jit_entries [slot].name = VG_(strdup)(name);
+ jit_entries [slot].start = start;
+ jit_entries [slot].end = start + len;
+ jit_entry_count++;
@ -152,7 +145,7 @@ Index: coregrind/m_debuginfo/debuginfo.c
+}
+
+static
+JitEntry* jit_lookup ( Addr pc, Char* buf, Int nbuf )
+Bool jit_lookup ( Addr pc, Char* buf, Int nbuf )
+{
+ Int l, u, mid;
+ JitEntry* e = NULL;
@ -173,43 +166,32 @@ Index: coregrind/m_debuginfo/debuginfo.c
+ }
+ if (e != NULL && pc >= e->start && pc < e->end){
+ VG_(strncpy_safely)(buf, e->name, nbuf);
+ return e;
+ }
+ return NULL;
+}
+
+
/*------------------------------------------------------------*/
/*--- ---*/
/*--- TOP LEVEL: QUERYING EXISTING DEBUG INFO ---*/
@@ -1263,8 +1390,19 @@
PtrdiffT offset;
search_all_symtabs ( a, &di, &sno, match_anywhere_in_sym, findText );
- if (di == NULL)
+ if (di == NULL)
+ {
+ if (findText)
+ {
+ JitEntry* je = jit_lookup (a, buf, nbuf);
+ if (!je)
+ return False;
+ if (offsetP)
+ *offsetP = a - je->start;
+ return True;
+ }
return False;
+ return False;
+}
+
/* ppc64-linux only: find the TOC pointer (R2 value) that should be in
force at the entry point address of the function containing
guest_code_addr. Returns 0 if not known. */
@@ -894,6 +1020,10 @@
buf_dirname, BUF_LEN, &know_dirinfo,
&lineno
);
+ if (!know_fnname){
+ know_fnname = jit_lookup (eip, buf_fn, BUF_LEN);
+ }
+
if (VG_(clo_xml)) {
VG_(demangle) ( do_cxx_demangling, do_z_demangling,
di->symtab[sno].name, buf, nbuf );
Bool human_readable = True;
Index: coregrind/pub_core_debuginfo.h
===================================================================
--- coregrind/pub_core_debuginfo.h (revision 10894)
--- coregrind/pub_core_debuginfo.h (revision 7276)
+++ coregrind/pub_core_debuginfo.h (working copy)
@@ -106,6 +106,10 @@
extern
Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf );
@@ -75,6 +75,10 @@
extern Bool VG_(get_fnname_nodemangle)( Addr a,
Char* fnname, Int n_fnname );
+/* Register/deregister symbols created by JITs. */
+extern void VG_(register_jited_code)( Char* name, Addr start, SizeT len );
@ -220,11 +202,19 @@ Index: coregrind/pub_core_debuginfo.h
/*MOD*/Addr* spP,
Index: coregrind/m_scheduler/scheduler.c
===================================================================
--- coregrind/m_scheduler/scheduler.c (revision 10894)
--- coregrind/m_scheduler/scheduler.c (revision 7276)
+++ coregrind/m_scheduler/scheduler.c (working copy)
@@ -1478,6 +1478,16 @@
goto my_default;
}
@@ -83,6 +83,7 @@
#include "pub_core_tooliface.h"
#include "pub_core_translate.h" // For VG_(translate)()
#include "pub_core_transtab.h"
+#include "pub_core_debuginfo.h" // VG_({un}register_jited_code)
#include "priv_sema.h"
#include "pub_core_scheduler.h" // self
@@ -1367,6 +1368,16 @@
SET_CLREQ_RETVAL( tid, VG_(get_n_errs_found)() );
break;
+ case VG_USERREQ__JIT_REGISTER_MAP:
+ VG_(register_jited_code)( (Char*)arg[1], arg[2], arg[3] );
@ -237,5 +227,5 @@ Index: coregrind/m_scheduler/scheduler.c
+ break;
+
default:
my_default:
if (os_client_request(tid, arg)) {
// do nothing, os_client_request() handled it

View File

@ -1,13 +1,3 @@
-------------------------------------------------------------------
Wed Jan 6 17:54:54 CET 2010 - dmueller@suse.de
- fix build against glibc 2.11
-------------------------------------------------------------------
Wed Dec 2 22:25:34 CET 2009 - dmueller@suse.de
- update and reenable jit-register-unregister.diff
-------------------------------------------------------------------
Tue Nov 3 19:09:50 UTC 2009 - coolo@novell.com

View File

@ -32,9 +32,8 @@ Release: 2
Source0: %{name}-%{version}.tar.bz2
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_2_1 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH > 3_2_BRANCH.diff
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_2_1 svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH > VEX_3_2_BRANCH.diff
Patch1: jit-register-unregister.diff
Patch1: jit-runtime-support.diff
Patch2: deprecated.diff
Patch3: glibc-211.diff
Provides: callgrind = %version
Obsoletes: callgrind < %version
ExclusiveArch: %ix86 x86_64 ppc ppc64
@ -117,9 +116,8 @@ Authors:
%setup -q -n %{name}-%{version}
cd VEX
cd ..
%patch1
#%patch1
%patch2
%patch3
%build
export CFLAGS="$RPM_OPT_FLAGS"