1
1
Граф коммитов

21 Коммитов

Автор SHA1 Сообщение Дата
Brian Barrett
b42bb3d8e8 More memory hooks tweaks... Set a flag on callbacks if the allocation /
deallocation came from the allocator (malloc, fee, etc) or somewhere
else (the user calling mmap/munmap, etc).  Going to be used by Galen
to determine if it is worth searching the allocations tree

Set flag if it is possible to intercept mmap (not always possible
due to a circular dependency between mmap, dlsym, and calloc)

This commit was SVN r8521.
2005-12-16 01:12:45 +00:00
Brian Barrett
2a94f693f6 * make sure to actually add the ptmalloc2-specific library dependencies to
LIBADD, so that libtool does it's magic propogation thing...

This commit was SVN r8508.
2005-12-15 18:11:51 +00:00
Brian Barrett
01e7191c3e * use our memory barriers instead of ptmalloc2's, since it only does the
right thing with gcc on x86.

This commit was SVN r8490.
2005-12-13 16:04:48 +00:00
Brian Barrett
d8d67b618f don't intercept mmap if we have to use dlsym to get at the real mmap. dlsym
may call calloc(large number), which causes ptmalloc2 to call mmap, which
causes us to try to dlsym for mmap, which leads to looping badness.

This commit was SVN r8461.
2005-12-12 19:38:42 +00:00
Brian Barrett
6c4ac2299c fix typo in release hooks if calling for every malloc/free
This commit was SVN r8431.
2005-12-10 05:06:52 +00:00
George Bosilca
699653f733 Typo correction.
This commit was SVN r8427.
2005-12-09 05:17:27 +00:00
Brian Barrett
0348d02875 * need to expose posix_memalign so that the one in our ptmalloc2 is used
instead of the one in libc.  Thanks to Gleb Natapov for tracking this
  down.

This commit was SVN r8418.
2005-12-08 18:06:52 +00:00
Brian Barrett
364ca3f075 - Add configure-time switch (--enable-ptmalloc2-opt-sbrk) to control when
the ptmalloc2 memory hooks component triggers callbacks for memory
  allocation / deallocation.  If enabled (the default) it is only when
  memory is actually obtained from or released to the OS (so little
  malloc calls only trigger callbacks if sbrk is called).  If disabled,
  callbacks are triggered every time malloc/free/etc. is called
* It turns out that syscall and mmap aren't good friends due to the return
  type of mmap and some old legacy issues with syscall functions that
  take more than 5 parameters.  For now, default to either loading
  the symbol from glibc using dlsym or using the __m{un,}map functions.
  Thanks to George for finding this.
* Fix some dumb typos in the mmap / munmap catching code

This commit was SVN r8410.
2005-12-08 04:47:03 +00:00
George Bosilca
9efd0e0813 Include the memoryhooks.h after the standard include files to insure that all expected types are
correctly defined (like size_t).

This commit was SVN r8383.
2005-12-06 05:55:36 +00:00
George Bosilca
23c618ab51 Allow a VPATH build to find the include files.
This commit was SVN r8382.
2005-12-06 05:26:36 +00:00
Brian Barrett
f44bd9e067 * Intercept both allocations and deallocations from ptmalloc2 (including
both mmap and munmap), adjusting the configure script so that the
  component will only be activated on systems that use ptmalloc2 in the
  first place -- ie, Linux
* Remove the malloc_hooks component - it became an unworkable solution
  once threads and such were considered.
* Remove malloc_interpose component - it never worked quite right and
  was not going to be able to intercept malloc, so it wasn't going to
  be useful for OMPI's purposes.
* Update tests a little bit to match recent memory hooks api
  issues - still needs a bit of work.

This commit was SVN r8381.
2005-12-06 00:44:50 +00:00
Brian Barrett
79bf8843d2 * update memory hooks interface to allow for callbacks on both allocations
and dealllocations, per request from Galen and Tim

This commit was SVN r8303.
2005-11-29 04:46:14 +00:00
Brian Barrett
878676218e Rename opal/memory to opal/memoryhooks because XLC++ on Mac OS X is broken.
When compiling C++ code that includes something that looks for the C++
header file "memory" (stupid C++ headers not having .h extensions), it
goes through the header file search path, which includes $(topsrcdir)/opal,
so it finds the directory $(topsrcdir)/opal/memory/ and tries to load
that as the memory header file and all goes downhill.

This commit was SVN r8111.
2005-11-11 00:26:27 +00:00
Jeff Squyres
42ec26e640 Update the copyright notices for IU and UTK.
This commit was SVN r7999.
2005-11-05 19:57:48 +00:00
Andrew Friedley
555ae37255 Add lib{opal,orte,mpi}.la to appropriate LIBADD's, some whitespace cleanup as well.
This commit was SVN r7477.
2005-09-22 12:28:54 +00:00
Brian Barrett
ed56e743b7 * update configure.ac to use the modern version of AC_INIT and
AM_INIT_AUTOMAKE, instead of the deprecated version.
* Work around dumbness in modern AC_INIT that requires the version
  number to be set at autoconf time (instead of at configure time, as
  it was before).  Set the version number, minus the subversion r number,
  at autoconf time.  Override the internal variables to include the r
  number (if needed) at configure time.  Basically, the right thing
  should always happen.  The only place it might not is the version
  reported as part of configure --help will not have an r number.
* Since AM_INIT_AUTOMAKE taks a list of options, no need to specify
  them in all the Makefile.am files.
* Addes support for subdir-objects, meaning that object files are put
  in the directory containing source files, even if the Makefile.am is
  in another directory.  This should start making it feasible to
  reduce the number of Makefile.am files we have in the tree, which
  will greatly reduce the time to run autogen and configure.

This commit was SVN r7211.
2005-09-07 05:54:53 +00:00
Brian Barrett
f2769f14e8 * Add malloc_interpose memory manager intercept functions that should work
on all glibc systems (tested with x86 and x86_64 with a couple of C++
  compilers).  While not as ideal as the malloc_hooks method, it does
  have the advantage of working with threads.
* Modified malloc_hooks component to properly follow prefix rule.  No
  functionality changes
* Make the memory framework only chose one component, and modify all
  components to set priority to 20, except malloc-interpose, which is
  at 10.  This means that on Linux, malloc_hooks will be used unless
  threads are enabled, since I think malloc_hooks is a better design
  choice when we can use it

This commit was SVN r6949.
2005-08-21 19:01:39 +00:00
Brian Barrett
da89e06238 * update ptmalloc2 to build properly and intercept user-level calls to
munmap

This commit was SVN r6867.
2005-08-14 03:11:54 +00:00
Brian Barrett
8aca9ef966 * remove need to edit project/Makefile.am and project/{dynamic-,}mca/Makefile.am when adding a new component. Configure / autogen now do it for you.
* Add base to memory framework so that we can do something sane with
  ompi_info
* Updated ompi_info to print components for memory framework and
  show whether we have memory hooks active or not.

This commit was SVN r6861.
2005-08-13 20:19:24 +00:00
Jeff Squyres
0cbc8ea503 Add an missing header files instead of the top-level subdir for the
dist case.

This commit was SVN r6858.
2005-08-13 16:10:46 +00:00
Brian Barrett
1b830beddb * move over changes from the /tmp/bwb-memory-hooks/copy-1 into the trunk.
This includes updates to the malloc_hook method and making everything
  components.

This commit was SVN r6852.
2005-08-13 01:08:34 +00:00