Files
ftmemsim-valgrind/coregrind/Makefile.am
Philippe Waroquiers 53df23f0a6 This patch adds a 'de-duplicating memory pool allocator':
include/pub_tool_deduppoolalloc.h
  coregrind/pub_core_deduppoolalloc.h
  coregrind/m_deduppoolalloc.c
and uses it (currently only) for the strings in m_debuginfo/storage.c
The idea is that such ddup pool allocator will also be used for other
highly duplicated information (e.g. the DiCFSI information), where
significant gains can also be achieved.
The dedup pool for strings also decreases significantly the memory
needed by the read inline information (patch still to be committed,
see bug 278972).

When testing with a big executable (tacot_process),
this reduces the size of the dinfo arena from
  trunk:  158941184/109760512  max/curr mmap'd, 156775944/107882728 max/curr,
to
  ddup:   157892608/106614784  max/curr mmap'd, 156362160/101414712 max/curr

(so 3Mb less mmap-ed once debug info is read, 1Mb less mmap-ed in peak,
6Mb less allocated once debug info is read).

This is all gained due to the string which changes from:
  trunk:   17,434,704 in       266: di.storage.addStr.1
to
  ddup:    10,966,608 in       750: di.storage.addStr.1
(6.5Mb less memory used by strings)
The gain in mmap-ed memory is smaller due to fragmentation.
Probably one could decrease the fragmentation by using bigger
size for the dedup pool, but then we would lose memory on the last
allocated pool (and for small libraries, we often do not use much
of a big pool block).
Solution might be to increase the pool size but have a "shrink_block"
operation. To be looked at in the future.

In terms of performance, startup of a big executable (on an old pentium)
is not influenced significantly (something like 0.1 seconds on 15 seconds
startup for a big executable, on a slow pentium).

The dedup pool uses a hash table. The hash function used currently
is the VG_(adler32) check sum. It is reported (and visible also here)
that this checksum is not a very good hash function (many collisions).

To have statistics about collisions, use  --stats -v -v -v

As an example of the collisions, on the strings in debug info of memcheck tool on x86,
one obtain:
   --4789-- dedupPA:di.storage.addStr.1 9983 allocs (8174 uniq) 11 pools (4820 bytes free in last pool)
   --4789-- nr occurences of chains of len N, N-plicated keys, N-plicated elts
   --4789-- N: 0 : nr chain   6975, nr keys      0, nr elts      0
   --4789-- N: 1 : nr chain   3670, nr keys   6410, nr elts   8174
   --4789-- N: 2 : nr chain   1070, nr keys    226, nr elts      0
   --4789-- N: 3 : nr chain    304, nr keys    100, nr elts      0
   --4789-- N: 4 : nr chain    104, nr keys     84, nr elts      0
   --4789-- N: 5 : nr chain     72, nr keys     42, nr elts      0
   --4789-- N: 6 : nr chain     44, nr keys     34, nr elts      0
   --4789-- N: 7 : nr chain     18, nr keys     13, nr elts      0
   --4789-- N: 8 : nr chain     17, nr keys      8, nr elts      0
   --4789-- N: 9 : nr chain      4, nr keys      6, nr elts      0
   --4789-- N:10 : nr chain      9, nr keys      4, nr elts      0
   --4789-- N:11 : nr chain      1, nr keys      0, nr elts      0
   --4789-- N:13 : nr chain      1, nr keys      1, nr elts      0
   --4789-- total nr of unique   chains:  12289, keys   6928, elts   8174
which shows that on 8174 different strings, we have only 6410 strings which have
a unique hash value. As other examples, N:13 line shows we have 13 strings
mapping to the same key. N:14 line shows we have 4 groups of 10 strings mapping to the
same key, etc.
So, adler32 is definitely a bad hash function.
Trials have been done with another hash function, giving a much lower
collision rate. So, a better (but still fast) hash function would probably
be beneficial. To be looked at ...




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14029
2014-06-14 16:30:09 +00:00

649 lines
20 KiB
Makefile

# Be very careful when renaming any files, targets, whatever, in this
# Makefile. Various parts of the system rely on these names having
# particular forms.
include $(top_srcdir)/Makefile.all.am
#----------------------------------------------------------------------------
# Basics, flags
#----------------------------------------------------------------------------
AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ += \
-I$(top_srcdir)/coregrind \
-DVG_LIBDIR="\"$(pkglibdir)"\" \
-DVG_PLATFORM="\"@VGCONF_ARCH_PRI@-@VGCONF_OS@\""
if VGCONF_HAVE_PLATFORM_SEC
AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ += \
-I$(top_srcdir)/coregrind \
-DVG_LIBDIR="\"$(pkglibdir)"\" \
-DVG_PLATFORM="\"@VGCONF_ARCH_SEC@-@VGCONF_OS@\""
endif
EXTRA_DIST = \
m_debuginfo/UNUSED_STABS.txt \
m_debuginfo/README.txt \
m_gdbserver/README_DEVELOPERS \
docs/vgdb-manpage.xml
#----------------------------------------------------------------------------
# The launcher. Built for the primary target only.
#----------------------------------------------------------------------------
bin_PROGRAMS = \
valgrind \
vgdb
if VGCONF_OS_IS_LINUX
valgrind_SOURCES = \
launcher-linux.c \
m_debuglog.c
endif
if VGCONF_OS_IS_DARWIN
valgrind_SOURCES = \
launcher-darwin.c \
m_debuglog.c
endif
valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI)
valgrind_CFLAGS = $(AM_CFLAGS_PRI)
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
valgrind_LDFLAGS = $(AM_CFLAGS_PRI)
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
valgrind_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
# On Android we must ask for non-executable stack, not sure why.
if VGCONF_PLATVARIANT_IS_ANDROID
valgrind_CFLAGS += -static
valgrind_LDFLAGS += -Wl,-z,noexecstack
endif
vgdb_SOURCES = vgdb.c
if VGCONF_OS_IS_LINUX
if VGCONF_PLATVARIANT_IS_ANDROID
vgdb_SOURCES += vgdb-invoker-none.c
else
vgdb_SOURCES += vgdb-invoker-ptrace.c
endif
endif
if VGCONF_OS_IS_DARWIN
# Some darwin specific stuff is needed as ptrace is not
# fully supported on MacOS. Till we find someone courageous
# having access to Darwin, 'none' implementation is used.
vgdb_SOURCES += vgdb-invoker-none.c
endif
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
vgdb_CFLAGS = $(AM_CFLAGS_PRI)
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
vgdb_LDFLAGS = $(AM_CFLAGS_PRI)
if VGCONF_PLATVARIANT_IS_ANDROID
vgdb_CFLAGS += -static
endif
if !VGCONF_PLATVARIANT_IS_ANDROID
vgdb_LDADD = -lpthread
endif
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
vgdb_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
#----------------------------------------------------------------------------
# Darwin Mach stuff
#----------------------------------------------------------------------------
# Mach RPC interface definitions
# Here are some more .defs files that are not used, but could be in the
# future:
# clock.defs \
# clock_priv.defs \
# clock_reply.defs \
# exc.defs \
# host_priv.defs \
# host_security.defs \
# ledger.defs \
# lock_set.defs \
# mach_host.defs \
# mach_port.defs \
# notify.defs \
# processor.defs \
# processor_set.defs \
#
mach_user_srcs =
mach_server_srcs =
mach_hdrs =
mach_defs =
if VGCONF_OS_IS_DARWIN
mach_user_srcs += \
m_mach/mach_vmUser.c \
m_mach/taskUser.c \
m_mach/thread_actUser.c \
m_mach/vm_mapUser.c
mach_server_srcs += \
m_mach/mach_vmServer.c \
m_mach/taskServer.c \
m_mach/thread_actServer.c \
m_mach/vm_mapServer.c
mach_hdrs += \
m_mach/mach_vm.h \
m_mach/task.h \
m_mach/thread_act.h \
m_mach/vm_map.h
mach_defs += \
/usr/include/mach/mach_vm.defs \
/usr/include/mach/task.defs \
/usr/include/mach/thread_act.defs \
/usr/include/mach/vm_map.defs
endif
# Be careful w.r.t. parallel builds. See section 27.9 of the automake info
# page, "Handling Tools that Produce many Outputs".
$(abs_builddir)/m_mach:
mkdir -p $@
$(mach_user_srcs): $(mach_defs) $(abs_builddir)/m_mach
(cd m_mach && mig $(mach_defs))
$(mach_hdrs): $(mach_defs) $(mach_user_srcs) $(abs_builddir)/m_mach
(cd m_mach && mig $(mach_defs))
#----------------------------------------------------------------------------
# Headers
#----------------------------------------------------------------------------
noinst_HEADERS = \
pub_core_addrinfo.h \
pub_core_aspacehl.h \
pub_core_aspacemgr.h \
pub_core_basics.h \
pub_core_basics_asm.h \
pub_core_clientstate.h \
pub_core_clreq.h \
pub_core_commandline.h \
pub_core_coredump.h \
pub_core_cpuid.h \
pub_core_deduppoolalloc.h \
pub_core_debuginfo.h \
pub_core_debugger.h \
pub_core_debuglog.h \
pub_core_demangle.h \
pub_core_dispatch.h \
pub_core_dispatch_asm.h \
pub_core_errormgr.h \
pub_core_execontext.h \
pub_core_gdbserver.h \
pub_core_hashtable.h \
pub_core_initimg.h \
pub_core_inner.h \
pub_core_libcbase.h \
pub_core_libcassert.h \
pub_core_libcfile.h \
pub_core_libcprint.h \
pub_core_libcproc.h \
pub_core_libcsetjmp.h \
pub_core_libcsignal.h \
pub_core_mach.h \
pub_core_machine.h \
pub_core_mallocfree.h \
pub_core_options.h \
pub_core_oset.h \
pub_core_rangemap.h \
pub_core_redir.h \
pub_core_poolalloc.h \
pub_core_replacemalloc.h\
pub_core_sbprofile.h \
pub_core_scheduler.h \
pub_core_seqmatch.h \
pub_core_sigframe.h \
pub_core_signals.h \
pub_core_sparsewa.h \
pub_core_stacks.h \
pub_core_stacktrace.h \
pub_core_syscall.h \
pub_core_syswrap.h \
pub_core_threadstate.h \
pub_core_tooliface.h \
pub_core_trampoline.h \
pub_core_translate.h \
pub_core_transtab.h \
pub_core_transtab_asm.h \
pub_core_ume.h \
pub_core_vki.h \
pub_core_vkiscnums.h \
pub_core_vkiscnums_asm.h\
pub_core_wordfm.h \
pub_core_xarray.h \
m_aspacemgr/priv_aspacemgr.h \
m_debuginfo/priv_misc.h \
m_debuginfo/priv_storage.h \
m_debuginfo/priv_tytypes.h \
m_debuginfo/priv_readstabs.h \
m_debuginfo/priv_readpdb.h \
m_debuginfo/priv_d3basics.h \
m_debuginfo/priv_readdwarf.h \
m_debuginfo/priv_readdwarf3.h \
m_debuginfo/priv_readelf.h \
m_debuginfo/priv_readmacho.h \
m_debuginfo/priv_image.h \
m_debuginfo/lzoconf.h \
m_debuginfo/lzodefs.h \
m_debuginfo/minilzo.h \
m_demangle/ansidecl.h \
m_demangle/cp-demangle.h \
m_demangle/dyn-string.h \
m_demangle/demangle.h \
m_demangle/safe-ctype.h \
m_demangle/vg_libciface.h \
m_gdbserver/regcache.h \
m_gdbserver/regdef.h \
m_gdbserver/server.h \
m_gdbserver/target.h \
m_gdbserver/valgrind_low.h \
m_gdbserver/gdb/signals.h \
m_initimg/priv_initimg_pathscan.h \
m_scheduler/priv_sema.h \
m_scheduler/priv_sched-lock.h \
m_scheduler/priv_sched-lock-impl.h \
m_syswrap/priv_types_n_macros.h \
m_syswrap/priv_syswrap-generic.h \
m_syswrap/priv_syswrap-linux.h \
m_syswrap/priv_syswrap-linux-variants.h \
m_syswrap/priv_syswrap-darwin.h \
m_syswrap/priv_syswrap-main.h \
m_syswrap/priv_syswrap-xen.h \
m_ume/priv_ume.h \
vgdb.h
#----------------------------------------------------------------------------
# libcoregrind-<platform>.a
#----------------------------------------------------------------------------
BUILT_SOURCES = $(mach_user_srcs)
CLEANFILES = $(mach_user_srcs) $(mach_server_srcs) $(mach_hdrs)
pkglib_LIBRARIES = libcoregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
if VGCONF_HAVE_PLATFORM_SEC
pkglib_LIBRARIES += libcoregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
endif
COREGRIND_SOURCES_COMMON = \
m_addrinfo.c \
m_cache.c \
m_commandline.c \
m_clientstate.c \
m_cpuid.S \
m_deduppoolalloc.c \
m_debugger.c \
m_debuglog.c \
m_errormgr.c \
m_execontext.c \
m_poolalloc.c \
m_hashtable.c \
m_libcbase.c \
m_libcassert.c \
m_libcfile.c \
m_libcprint.c \
m_libcproc.c \
m_libcsetjmp.c \
m_libcsignal.c \
m_machine.c \
m_main.c \
m_mallocfree.c \
m_options.c \
m_oset.c \
m_rangemap.c \
m_redir.c \
m_sbprofile.c \
m_seqmatch.c \
m_signals.c \
m_sparsewa.c \
m_stacks.c \
m_stacktrace.c \
m_syscall.c \
m_threadstate.c \
m_tooliface.c \
m_trampoline.S \
m_translate.c \
m_transtab.c \
m_vki.c \
m_vkiscnums.c \
m_wordfm.c \
m_xarray.c \
m_aspacehl.c \
m_aspacemgr/aspacemgr-common.c \
m_aspacemgr/aspacemgr-linux.c \
m_coredump/coredump-elf.c \
m_coredump/coredump-macho.c \
m_debuginfo/misc.c \
m_debuginfo/d3basics.c \
m_debuginfo/debuginfo.c \
m_debuginfo/readdwarf.c \
m_debuginfo/readdwarf3.c \
m_debuginfo/readelf.c \
m_debuginfo/readmacho.c \
m_debuginfo/readpdb.c \
m_debuginfo/readstabs.c \
m_debuginfo/storage.c \
m_debuginfo/tytypes.c \
m_debuginfo/image.c \
m_debuginfo/minilzo-inl.c \
m_demangle/cp-demangle.c \
m_demangle/cplus-dem.c \
m_demangle/demangle.c \
m_demangle/dyn-string.c \
m_demangle/safe-ctype.c \
m_dispatch/dispatch-x86-linux.S \
m_dispatch/dispatch-amd64-linux.S \
m_dispatch/dispatch-ppc32-linux.S \
m_dispatch/dispatch-ppc64-linux.S \
m_dispatch/dispatch-arm-linux.S \
m_dispatch/dispatch-arm64-linux.S \
m_dispatch/dispatch-s390x-linux.S \
m_dispatch/dispatch-mips32-linux.S \
m_dispatch/dispatch-mips64-linux.S \
m_dispatch/dispatch-x86-darwin.S \
m_dispatch/dispatch-amd64-darwin.S \
m_gdbserver/inferiors.c \
m_gdbserver/m_gdbserver.c \
m_gdbserver/regcache.c \
m_gdbserver/remote-utils.c \
m_gdbserver/server.c \
m_gdbserver/signals.c \
m_gdbserver/target.c \
m_gdbserver/utils.c \
m_gdbserver/valgrind-low-x86.c \
m_gdbserver/valgrind-low-amd64.c \
m_gdbserver/valgrind-low-arm.c \
m_gdbserver/valgrind-low-arm64.c \
m_gdbserver/valgrind-low-ppc32.c \
m_gdbserver/valgrind-low-ppc64.c \
m_gdbserver/valgrind-low-s390x.c \
m_gdbserver/valgrind-low-mips32.c \
m_gdbserver/valgrind-low-mips64.c \
m_gdbserver/version.c \
m_initimg/initimg-linux.c \
m_initimg/initimg-darwin.c \
m_initimg/initimg-pathscan.c \
m_mach/mach_basics.c \
m_mach/mach_msg.c \
m_mach/mach_traps-x86-darwin.S \
m_mach/mach_traps-amd64-darwin.S \
m_replacemalloc/replacemalloc_core.c \
m_scheduler/scheduler.c \
m_scheduler/sema.c \
m_scheduler/sched-lock.c \
m_scheduler/sched-lock-generic.c \
m_sigframe/sigframe-x86-linux.c \
m_sigframe/sigframe-amd64-linux.c \
m_sigframe/sigframe-ppc32-linux.c \
m_sigframe/sigframe-ppc64-linux.c \
m_sigframe/sigframe-arm-linux.c \
m_sigframe/sigframe-arm64-linux.c \
m_sigframe/sigframe-s390x-linux.c \
m_sigframe/sigframe-mips32-linux.c \
m_sigframe/sigframe-mips64-linux.c \
m_sigframe/sigframe-x86-darwin.c \
m_sigframe/sigframe-amd64-darwin.c \
m_syswrap/syscall-x86-linux.S \
m_syswrap/syscall-amd64-linux.S \
m_syswrap/syscall-ppc32-linux.S \
m_syswrap/syscall-ppc64-linux.S \
m_syswrap/syscall-arm-linux.S \
m_syswrap/syscall-arm64-linux.S \
m_syswrap/syscall-s390x-linux.S \
m_syswrap/syscall-mips32-linux.S \
m_syswrap/syscall-mips64-linux.S \
m_syswrap/syscall-x86-darwin.S \
m_syswrap/syscall-amd64-darwin.S \
m_syswrap/syswrap-main.c \
m_syswrap/syswrap-generic.c \
m_syswrap/syswrap-linux.c \
m_syswrap/syswrap-linux-variants.c \
m_syswrap/syswrap-darwin.c \
m_syswrap/syswrap-x86-linux.c \
m_syswrap/syswrap-amd64-linux.c \
m_syswrap/syswrap-ppc32-linux.c \
m_syswrap/syswrap-ppc64-linux.c \
m_syswrap/syswrap-arm-linux.c \
m_syswrap/syswrap-arm64-linux.c \
m_syswrap/syswrap-s390x-linux.c \
m_syswrap/syswrap-mips32-linux.c \
m_syswrap/syswrap-mips64-linux.c \
m_syswrap/syswrap-x86-darwin.c \
m_syswrap/syswrap-amd64-darwin.c \
m_syswrap/syswrap-xen.c \
m_ume/elf.c \
m_ume/macho.c \
m_ume/main.c \
m_ume/script.c
libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
$(COREGRIND_SOURCES_COMMON)
nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
$(BUILT_SOURCES)
libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CCASFLAGS = \
$(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
if ENABLE_LINUX_TICKET_LOCK_PRIMARY
libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES += \
m_scheduler/ticket-lock-linux.c
libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS += \
-DENABLE_LINUX_TICKET_LOCK
endif
if VGCONF_HAVE_PLATFORM_SEC
libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
$(COREGRIND_SOURCES_COMMON)
nodist_libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
$(BUILT_SOURCES)
libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CCASFLAGS = \
$(AM_CCASFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
if ENABLE_LINUX_TICKET_LOCK_SECONDARY
libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES += \
m_scheduler/ticket-lock-linux.c
libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS += \
-DENABLE_LINUX_TICKET_LOCK
endif
endif
#----------------------------------------------------------------------------
# libreplacemalloc_toolpreload-<platform>.a
#----------------------------------------------------------------------------
pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
if VGCONF_HAVE_PLATFORM_SEC
pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
endif
libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
m_replacemalloc/vg_replace_malloc.c
libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(AM_CFLAGS_PIC)
if VGCONF_HAVE_PLATFORM_SEC
libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
m_replacemalloc/vg_replace_malloc.c
libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(AM_CFLAGS_PIC)
endif
#----------------------------------------------------------------------------
# vgpreload_core-<platform>.a
#----------------------------------------------------------------------------
noinst_PROGRAMS = vgpreload_core-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
if VGCONF_HAVE_PLATFORM_SEC
noinst_PROGRAMS += vgpreload_core-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
endif
if VGCONF_OS_IS_DARWIN
noinst_DSYMS = $(noinst_PROGRAMS)
endif
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \
$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(AM_CFLAGS_PIC)
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
if VGCONF_HAVE_PLATFORM_SEC
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \
$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(AM_CFLAGS_PIC)
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \
$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
endif
#----------------------------------------------------------------------------
# gdbserver xml target descriptions
#----------------------------------------------------------------------------
GDBSERVER_XML_FILES = \
m_gdbserver/32bit-core-valgrind-s1.xml \
m_gdbserver/32bit-core-valgrind-s2.xml \
m_gdbserver/32bit-core.xml \
m_gdbserver/32bit-linux-valgrind-s1.xml \
m_gdbserver/32bit-linux-valgrind-s2.xml \
m_gdbserver/32bit-linux.xml \
m_gdbserver/32bit-sse-valgrind-s1.xml \
m_gdbserver/32bit-sse-valgrind-s2.xml \
m_gdbserver/32bit-sse.xml \
m_gdbserver/64bit-avx-valgrind-s2.xml \
m_gdbserver/64bit-avx-valgrind-s1.xml \
m_gdbserver/64bit-avx.xml \
m_gdbserver/64bit-core-valgrind-s1.xml \
m_gdbserver/64bit-core-valgrind-s2.xml \
m_gdbserver/64bit-core.xml \
m_gdbserver/64bit-linux-valgrind-s1.xml \
m_gdbserver/64bit-linux-valgrind-s2.xml \
m_gdbserver/64bit-linux.xml \
m_gdbserver/64bit-sse-valgrind-s1.xml \
m_gdbserver/64bit-sse-valgrind-s2.xml \
m_gdbserver/64bit-sse.xml \
m_gdbserver/amd64-avx-coresse-valgrind.xml \
m_gdbserver/amd64-avx-coresse.xml \
m_gdbserver/amd64-avx-linux-valgrind.xml \
m_gdbserver/amd64-avx-linux.xml \
m_gdbserver/amd64-coresse-valgrind.xml \
m_gdbserver/amd64-linux-valgrind.xml \
m_gdbserver/arm-core-valgrind-s1.xml \
m_gdbserver/arm-core-valgrind-s2.xml \
m_gdbserver/arm-core.xml \
m_gdbserver/arm-vfpv3-valgrind-s1.xml \
m_gdbserver/arm-vfpv3-valgrind-s2.xml \
m_gdbserver/arm-vfpv3.xml \
m_gdbserver/arm-with-vfpv3-valgrind.xml \
m_gdbserver/arm-with-vfpv3.xml \
m_gdbserver/i386-coresse-valgrind.xml \
m_gdbserver/i386-linux-valgrind.xml \
m_gdbserver/power64-core-valgrind-s1.xml \
m_gdbserver/power64-core-valgrind-s2.xml \
m_gdbserver/power64-core.xml \
m_gdbserver/power64-linux-valgrind-s1.xml \
m_gdbserver/power64-linux-valgrind-s2.xml \
m_gdbserver/power64-linux.xml \
m_gdbserver/power-altivec-valgrind-s1.xml \
m_gdbserver/power-altivec-valgrind-s2.xml \
m_gdbserver/power-altivec.xml \
m_gdbserver/power-core-valgrind-s1.xml \
m_gdbserver/power-core-valgrind-s2.xml \
m_gdbserver/power-core.xml \
m_gdbserver/power-fpu-valgrind-s1.xml \
m_gdbserver/power-fpu-valgrind-s2.xml \
m_gdbserver/power-fpu.xml \
m_gdbserver/power-linux-valgrind-s1.xml \
m_gdbserver/power-linux-valgrind-s2.xml \
m_gdbserver/power-linux.xml \
m_gdbserver/powerpc-altivec32l-valgrind.xml \
m_gdbserver/powerpc-altivec32l.xml \
m_gdbserver/powerpc-altivec64l-valgrind.xml \
m_gdbserver/powerpc-altivec64l.xml \
m_gdbserver/s390-acr-valgrind-s1.xml \
m_gdbserver/s390-acr-valgrind-s2.xml \
m_gdbserver/s390-acr.xml \
m_gdbserver/s390-fpr-valgrind-s1.xml \
m_gdbserver/s390-fpr-valgrind-s2.xml \
m_gdbserver/s390-fpr.xml \
m_gdbserver/s390x-core64-valgrind-s1.xml \
m_gdbserver/s390x-core64-valgrind-s2.xml \
m_gdbserver/s390x-core64.xml \
m_gdbserver/s390x-generic-valgrind.xml \
m_gdbserver/s390x-generic.xml \
m_gdbserver/s390x-linux64-valgrind-s1.xml \
m_gdbserver/s390x-linux64-valgrind-s2.xml \
m_gdbserver/s390x-linux64.xml \
m_gdbserver/mips-cp0-valgrind-s1.xml \
m_gdbserver/mips-cp0-valgrind-s2.xml \
m_gdbserver/mips-cp0.xml \
m_gdbserver/mips-cpu-valgrind-s1.xml \
m_gdbserver/mips-cpu-valgrind-s2.xml \
m_gdbserver/mips-cpu.xml \
m_gdbserver/mips-linux.xml \
m_gdbserver/mips-linux-valgrind.xml \
m_gdbserver/mips-fpu-valgrind-s1.xml \
m_gdbserver/mips-fpu-valgrind-s2.xml \
m_gdbserver/mips-fpu.xml \
m_gdbserver/mips64-cp0-valgrind-s1.xml \
m_gdbserver/mips64-cp0-valgrind-s2.xml \
m_gdbserver/mips64-cp0.xml \
m_gdbserver/mips64-cpu-valgrind-s1.xml \
m_gdbserver/mips64-cpu-valgrind-s2.xml \
m_gdbserver/mips64-cpu.xml \
m_gdbserver/mips64-linux.xml \
m_gdbserver/mips64-linux-valgrind.xml \
m_gdbserver/mips64-fpu-valgrind-s1.xml \
m_gdbserver/mips64-fpu-valgrind-s2.xml \
m_gdbserver/mips64-fpu.xml
# so as to make sure these get copied into the install tree
vglibdir = $(pkglibdir)
vglib_DATA = $(GDBSERVER_XML_FILES)
# so as to make sure these get copied into the tarball
EXTRA_DIST += $(GDBSERVER_XML_FILES)
#----------------------------------------------------------------------------
# General stuff
#----------------------------------------------------------------------------
all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
mkdir -p $(inplacedir); \
for f in $(vglib_DATA); do \
rm -f $(inplacedir)/$$f; \
ln -f -s ../$(subdir)/$$f $(inplacedir); \
done
clean-local: clean-noinst_DSYMS
install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
uninstall-local: uninstall-noinst_PROGRAMS uninstall-noinst_DSYMS
#----------------------------------------------------------------------------
# Darwin linker kludges
#----------------------------------------------------------------------------
if VGCONF_OS_IS_DARWIN
BUILT_SOURCES += fixup_macho_loadcmds
fixup_macho_loadcmds: fixup_macho_loadcmds.c
$(CC) -g -Wall -o $@ $<
CLEANFILES += fixup_macho_loadcmds
endif
EXTRA_DIST += fixup_macho_loadcmds.c