mirror of
https://github.com/corda/corda.git
synced 2024-12-28 16:58:55 +00:00
6bb9d0015a
commit 2133df2d4ad82119333a003c8f05156998550615 Merge: 0356eb624 f2cf6d18a Author: yuyuany <yuan.yu@intel.com> Date: Wed Sep 13 10:06:33 2017 +0800 Merge pull request #155 from 01org/revert-151-ocall_exit_enclave Revert "Check for crash in sgx_ocall and exit enclave if enclave is crashed" commit f2cf6d18aa73fdaa916f95b1f3c5ac605a90ff06 Author: yuyuany <yuan.yu@intel.com> Date: Thu Sep 7 15:21:45 2017 +0800 Revert "Check for crash in sgx_ocall and exit enclave if enclave is crashed" commit 0356eb6249ed93510ca66f057a5ae74dda7b10a2 Merge: 2fe247145 38023b61a Author: lzha101 <lili.z.zhang@intel.com> Date: Wed Sep 6 15:58:16 2017 +0800 Merge pull request #153 from greglaun/greglaun-typos Correct typos in some of the sample apps. Signed-off-by: Zhang Lili lili.z.zhang@intel.com commit 2fe247145943827f04eea8e065a8ad3b0a3d11bd Merge: df9b03289 2e00f11ed Author: Li Xun <xun.li@intel.com> Date: Wed Sep 6 14:10:42 2017 +0800 Merge pull request #154 from llly/pull Fix build issues with latest OpenSSL and Gcc commit 2e00f11ed5a2e48445aeabd668105161a55a4502 Author: Vytautas Mickus <vmickus@gmx.com> Date: Sat Jul 15 21:00:57 2017 +0300 Make code compatible with OpenSSL 1.0 and 1.1 commit 95ea2c21a921ceb3851b090f092709c5b08b9b37 Author: Vytautas Mickus <vmickus@gmx.com> Date: Sat Jul 15 21:12:03 2017 +0300 Tell gcc about the fallthroughs (needed because of -Werror in makefiles) commit 6e0580d110d4c799e0c8aba0cdadee46efe15055 Author: Vytautas Mickus <vmickus@gmx.com> Date: Sat Jul 15 21:22:55 2017 +0300 Use `uname -m` instead of `arch` in installer. commit 38023b61aaa8f76fbad4391ecafd1342d9a2b4f0 Author: Greg Laun <greg.laun@gmail.com> Date: Tue Sep 5 12:33:37 2017 -0700 Correct typos in some of the sample apps. Signed-off-by: Greg Laun <greg.laun@gmail.com> commit df9b0328986784b603ce0b5af847d15382c795cb Merge: a2f33d828 a20449f5f Author: lzha101 <lili.z.zhang@intel.com> Date: Tue Sep 5 10:41:22 2017 +0800 Merge pull request #151 from yuyuany/ocall_exit_enclave Check for crash in sgx_ocall and exit enclave if enclave is crashed. Signed-off-by: Zhang Lili lili.z.zhang@intel.com commit a20449f5f85acd4e482c35dd6f8f27f36a3caa60 Author: Yu Yuan <yuan.yu@intel.com> Date: Fri Sep 1 22:46:27 2017 +0800 tRTS check the enclave crash state when doing an OCALL. If the enclave is crashed, tRTS unwind the stack to ECALL, and exit the enclave with SGX_ERROR_ENCLAVE_CRASHED. Signed-off-by: Yu Yuan <yuan.yu@intel.com> commit a2f33d828bc76b49256e9a3128254e3322ef5d52 Merge: aa8e9755a 6979d8180 Author: Andy Zhao <yebin.andy.zhao@intel.com> Date: Mon Aug 28 16:30:00 2017 +0800 Merge pull request #149 from lzha101/add_missing_delete Add two missing delete functions commit 6979d818077c310ec4e75a56937b5aa87b718dae Author: Zhang Lili <lili.z.zhang@intel.com> Date: Mon Aug 28 23:17:47 2017 +0800 Add two missing delete functions. Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit aa8e9755aaecc4c04ed3f3993a1596adb4ba6286 Author: Dionna Glaze <dionnaglaze@google.com> Date: Wed Aug 2 10:48:18 2017 -0700 Move pms pointer validation before its dereference in local_vars definitions. Also fix "sgx_status_t" typo in generated comment. commit 6f0e20cfd992c073aefe76926d28893c51f52445 Author: John Mechalas <john.p.mechalas@intel.com> Date: Thu Aug 10 19:00:34 2017 -0700 Implements most of libsgx_capable for Linux (previously only available in the Windows SDK) (#107) * Adds libsgx_capable, which is currently only available in the Windows version of the Intel SGX SDK. The Linux implementation of this library adds the following functions: sgx_status_t sgx_is_capable (int *sgx_capable); sgx_status_t sgx_cap_get_status (sgx_device_status_t *sgx_device_status); sgx_status_t sgx_cap_enable_device (sgx_device_status_t *sgx_device_status); And adds the following error code (also from the Windows version of the Intel SGX SDK): SGX_ERROR_NO_PRIVILEGE Generates both a static and dynamic build of libsgx_capable. This is incorporated into the SDK package, not the PSW package, since software installers need to check for Intel SGX capability on systems where the PSW may not already be installed. This means that installers will either have to statically link, or distribute the .so with their installation package. ---------------------- Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 660 York Street, Suite 102, San Francisco, CA 94110 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: John P Mechalas <john.p.mechalas@intel.com> commit 268b206f15f25671382b95c5650422b335d5c446 Merge: 803250734 136610236 Author: lzha101 <lili.z.zhang@intel.com> Date: Fri Jul 28 12:38:05 2017 +0800 Merge pull request #129 from dingelish/master Fix a mis-understood memory alignment in enclave_create(). Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit 1366102364ce67f8c63eaba9bdae80c08634f07f Author: Yu Ding <dingyu02@baidu.com> Date: Mon Jul 24 20:00:04 2017 -0700 Fix to a mis-understood in enclave_create(). The memory alignment is mistakenly done twice. Once in urts and once in driver. It is unnecessary. This bug has a great impact on the upper limit of enclave memory. commit 803250734883037a4a1f69085fb31daa6bd8448b Author: Li Xun <xun.li@intel.com> Date: Tue Jul 25 10:44:47 2017 +0800 Update server port to 80 (#128) Signed-off-by: Li, Xun <xun.li@intel.com> commit d42cd14bdd01a43c58554a4c73231733426356cd Author: Jaak Randmets <jaak.ra+github@gmail.com> Date: Mon Jul 24 09:04:03 2017 +0300 Merge pull request #124 from Jaak/master Improve const correctness of sgx_fopen and sgx_fimport_auto_key. Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit 8383b8c65f49fca017c62eb7efdd97a212829caf Merge: 0fb9f47e7 768c95174 Author: lzha101 <lili.z.zhang@intel.com> Date: Tue Jul 4 09:39:53 2017 +0800 Merge pull request #120 from aminueza/master Fixes sdk and psw version in download_prebuild.sh script Zhang Lili <lili.z.zhang@intel.com> commit 768c95174150e64207b31f5a733bccba25085775 Author: Amanda Souza <amandasouza@quimera.lsd.ufcg.edu.br> Date: Mon Jul 3 15:22:45 2017 -0300 Fixes sdk and psw version in download_prebuild.sh script Signed-off-by: Amanda Souza <amandasouza@quimera.lsd.ufcg.edu.br> commit 0fb9f47e784261369c52c1b49d1484f34409ecaf Author: Li, Xun <xun.li@intel.com> Date: Fri Jun 30 15:51:16 2017 +0800 Linux 1.9 Open Source Gold release Signed-off-by: Li, Xun <xun.li@intel.com> commit 199911ebaf60d068e4641331a06e71462ba8d324 Merge: 109545891 a2abe4b0d Author: lzha101 <lili.z.zhang@intel.com> Date: Fri Jun 16 12:42:58 2017 +0800 Merge pull request #115 from danzsmith53/master Update README.md Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit a2abe4b0d0490112fff7eb9669adf9d0bc866c54 Author: Daniel Smith <daniel.e.smith@intel.com> Date: Wed May 31 16:21:21 2017 -0700 Update README.md Updated grammar and style many places throughout file Signed-off-by: Daniel Smith <daniel.e.smith@intel.com> commit 1095458916fafd9e5870403e1d50cd7e1ca379bc Merge: a4bfecb96 d6acac1d2 Author: Li Xun <xun.li@intel.com> Date: Mon Jun 12 09:26:58 2017 +0800 Merge pull request #113 from mitar/patch-3 pkg-config is needed for compilation commit a4bfecb965a7588dc073a295dd842c301bbf075c Merge: 02b7d490a 6a7ec7a8c Author: lzha101 <lili.z.zhang@intel.com> Date: Thu Jun 8 13:10:03 2017 +0800 Merge pull request #112 from mitar/patch-2 Removing sudo Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit 6a7ec7a8c14ee2ee8f6977110dae9fe99137064d Author: Mitar <mitar.github@tnode.com> Date: Sun Jun 4 14:18:07 2017 -0700 Removing sudo. The whole script has to be run as root anyway. Signed-off-by: Mi Tar <mitar.github@tnode.com> commit d6acac1d25e67516dc6cb8d1dc7b155416078bb1 Author: Mitar <mitar.github@tnode.com> Date: Sun Jun 4 16:47:43 2017 -0700 pkg-config is needed for compilation. See: https://github.com/01org/dynamic-application-loader-host-interface/issues/2#issuecomment-306074645 Signed-off-by: Mi Tar <mitar.github@tnode.com> commit 02b7d490aca40af134166221c9b4f332f6ca947a Author: Li, Xun <xun.li@intel.com> Date: Tue May 16 08:40:33 2017 +0800 fix a aesm_service IPC bug aesm_service handles closed client socket incorrectly found in #101 Signed-off-by: Li, Xun <xun.li@intel.com> commit f287674fef604f4a6ef8710033f6a091fe644d7a Merge: ce0f128d2 e7f074381 Author: Li Xun <xun.li@intel.com> Date: Fri May 12 16:10:42 2017 +0800 Merge pull request #91 from sean-jc/docker/merge Add support for running the AESM and SGX applications in Docker commit e7f0743812b065750135220a37d890988633cc64 Author: Sean Christopherson <sean.j.christopherson@intel.com> Date: Thu Mar 30 09:26:47 2017 -0700 Add --no-daemon option to AESM Application container runtimes, e.g. Docker and RKT, do not provide a program manager, e.g. systemd, inside the container, and so attempting to run AESM as a daemon will fail. Add --no-daemon to allow running the AESM in a container as a normal process, i.e. do not call daemon(). Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> commit ce0f128d290e116748a78899673709730ac45964 Author: Li, Xun <xun.li@intel.com> Date: Mon May 8 09:01:52 2017 +0800 fix aesm_service compilation with latest openssl Signed-off-by: Li, Xun <xun.li@intel.com> commit fd91609f543ae08991d76d94d28c4ec300bcbc84 Merge: 9e0c32ee5 75336444e Author: lzha101 <lili.z.zhang@intel.com> Date: Wed Apr 19 13:41:12 2017 +0800 Merge pull request #96 from lzha101/master Fix alignment issue for metadata section Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit 75336444e867082159cd7c99bbe0eca57013c806 Author: lzha101 <lili.z.zhang@intel.com> Date: Fri Apr 14 16:03:48 2017 +0800 Update comment Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit d455716f9c00265976870d167ee2fae52f354daf Author: lzha101 <lili.z.zhang@intel.com> Date: Fri Apr 14 15:45:41 2017 +0800 Update ELF parser for metadata alignment Signed-off-by: Lili Zhang <lili.z.zhang@intel.com> commit 2224616cb4675c0225a3e1080059f3360e69f800 Author: lzha101 <lili.z.zhang@intel.com> Date: Fri Apr 14 15:43:05 2017 +0800 Change alignment for metadata section Signed-off-by: Lili Zhang <lili.z.zhang@intel.com> commit 9e0c32ee57f7dbd343cc1d75303e308b58b1fe93 Author: lzha101 <lili.z.zhang@intel.com> Date: Thu Apr 13 10:33:35 2017 +0800 Fix typo flase -> false in urts_internal.cpp Fix typo flase -> false in urts_internal.cpp Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit 765af6169d80beada705086ec9d5226bbdd96218 Merge: 0cbb1f074 38b3d5f46 Author: lzha101 <lili.z.zhang@intel.com> Date: Thu Apr 13 10:30:06 2017 +0800 Merge pull request #94 from neo9ree/master fixed typo flase -> false in psw/urts/linux/urts.cpp:45 Signed-off-by: Zhang Lili <lili.z.zhang@intel.com> commit 0cbb1f074d4b805a0492f6a000c5ddd1fda9efd7 Author: Li, Xun <xun.li@intel.com> Date: Mon Apr 10 14:24:45 2017 +0800 Update Linux_SGXEclipsePlugin Signed-off-by: Li, Xun <xun.li@intel.com> commit 38b3d5f4635c617d8181f3b8c1c6aa109a81dc21 Author: Eunchan Kim <eunchan.kim@kaist.ac.kr> Date: Thu Apr 6 15:31:02 2017 +0900 fixed typo flase -> false in psw/urts/linux/urts.cpp:45 Signed-off-by: Eunchan Kim <eunchan.kim@kaist.ac.kr> commit 56783b38820f82dcb37f1f48c37a5f705ddf7358 Merge: e5c01189d 885287c13 Author: Li Xun <xun.li@intel.com> Date: Wed Apr 5 12:29:14 2017 +0800 Merge pull request #92 from dcmiddle/fix-readme-pse-install fix readme section for PSW install commit 885287c13df2519ca0318bd908b3827d6e247e17 Author: Dan Middleton <dan.middleton@intel.com> Date: Fri Mar 31 22:16:38 2017 -0500 fix readme section for PSW install add missing cmake prerequisite to ubuntu instructions correct typos on systemctl Signed-off-by: Dan Middleton <dan.middleton@intel.com> commit 65965c6ab61d103028b8b6a886b57e98ccf7ea9d Author: Sean Christopherson <sean.j.christopherson@intel.com> Date: Tue Feb 7 12:51:44 2017 -0800 Bind the AESM socket to /var/run/aesmd/aesm.socket Exposing sockets to Docker containers is typically done via bind mounts, which does not work for abstract sockets since they don't exist in the file system. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> commit e5c01189d318e8c59f576377e231c159ffb71abb Author: Li, Xun <xun.li@intel.com> Date: Thu Mar 30 13:45:20 2017 +0900 update white list URL Signed-off-by: Li, Xun <xun.li@intel.com> commit 072f4e40c0a5f6b7b27bf77f00872853933bd33a Author: Li, Xun <xun.li@intel.com> Date: Fri Mar 24 11:20:35 2017 +0900 add missing error code logging in aesm_service Signed-off-by: Li, Xun <xun.li@intel.com> commit c7a3f14de9dbda16fd0fa1edbce1af24b350a678 Author: Li, Xun <xun.li@intel.com> Date: Mon Mar 20 14:14:23 2017 +0900 update instructions in README Signed-off-by: Li, Xun <xun.li@intel.com> commit 525cefa817457d8a412d64677d347ebe64f0f77a Merge: 1115c195c 157108515 Author: lzha101 <lili.z.zhang@intel.com> Date: Fri Mar 17 11:32:05 2017 +0800 Merge pull request #86 from lzha101/master Update README.md Signed-off-by: Lili Zhang <lili.z.zhang@intel.com> commit 157108515551a5b465e7ba5e977df5c3e8df20b9 Author: lzha101 <lili.z.zhang@intel.com> Date: Fri Mar 17 11:23:06 2017 +0800 Update README.md Update README.md: fix format, update hardware requiremet, etc. Signed-off-by: Lili Zhang <lili.z.zhang@intel.com> commit 1115c195cd60d5ab2b80c12d07e21663e5aa8030 Author: Li, Xun <xun.li@intel.com> Date: Thu Mar 16 15:30:38 2017 +0900 Linux 1.8 Open Source Gold release Signed-off-by: Li, Xun <xun.li@intel.com> commit 2e379dc79fb58cdf921e36d617e6e4b9d694301c Merge: 0d8a7d248 |
||
---|---|---|
.. | ||
benchmark | ||
src | ||
autogen-linux.sh | ||
config.guess | ||
config.sub | ||
configure | ||
depcomp | ||
install-sh | ||
ltmain.sh | ||
Makefile.am | ||
Makefile.in | ||
README |
gperftools
----------
(originally Google Performance Tools)
The fastest malloc we’ve seen; works particularly well with threads
and STL. Also: thread-friendly heap-checker, heap-profiler, and
cpu-profiler.
OVERVIEW
---------
gperftools is a collection of a high-performance multi-threaded
malloc() implementation, plus some pretty nifty performance analysis
tools.
gperftools is distributed under the terms of the BSD License. Join our
mailing list at gpeftools@googlegroups.com for updates.
gperftools was original home for pprof program. But do note that
original pprof (which is still included with gerftools) is now
deprecated in favor of golang version at https://github.com/google/pprof
TCMALLOC
--------
Just link in -ltcmalloc or -ltcmalloc_minimal to get the advantages of
tcmalloc -- a replacement for malloc and new. See below for some
environment variables you can use with tcmalloc, as well.
tcmalloc functionality is available on all systems we've tested; see
INSTALL for more details. See README_windows.txt for instructions on
using tcmalloc on Windows.
NOTE: When compiling with programs with gcc, that you plan to link
with libtcmalloc, it's safest to pass in the flags
-fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
when compiling. gcc makes some optimizations assuming it is using its
own, built-in malloc; that assumption obviously isn't true with
tcmalloc. In practice, we haven't seen any problems with this, but
the expected risk is highest for users who register their own malloc
hooks with tcmalloc (using gperftools/malloc_hook.h). The risk is
lowest for folks who use tcmalloc_minimal (or, of course, who pass in
the above flags :-) ).
HEAP PROFILER
-------------
See doc/heap-profiler.html for information about how to use tcmalloc's
heap profiler and analyze its output.
As a quick-start, do the following after installing this package:
1) Link your executable with -ltcmalloc
2) Run your executable with the HEAPPROFILE environment var set:
$ HEAPPROFILE=/tmp/heapprof <path/to/binary> [binary args]
3) Run pprof to analyze the heap usage
$ pprof <path/to/binary> /tmp/heapprof.0045.heap # run 'ls' to see options
$ pprof --gv <path/to/binary> /tmp/heapprof.0045.heap
You can also use LD_PRELOAD to heap-profile an executable that you
didn't compile.
There are other environment variables, besides HEAPPROFILE, you can
set to adjust the heap-profiler behavior; c.f. "ENVIRONMENT VARIABLES"
below.
The heap profiler is available on all unix-based systems we've tested;
see INSTALL for more details. It is not currently available on Windows.
HEAP CHECKER
------------
See doc/heap-checker.html for information about how to use tcmalloc's
heap checker.
In order to catch all heap leaks, tcmalloc must be linked *last* into
your executable. The heap checker may mischaracterize some memory
accesses in libraries listed after it on the link line. For instance,
it may report these libraries as leaking memory when they're not.
(See the source code for more details.)
Here's a quick-start for how to use:
As a quick-start, do the following after installing this package:
1) Link your executable with -ltcmalloc
2) Run your executable with the HEAPCHECK environment var set:
$ HEAPCHECK=1 <path/to/binary> [binary args]
Other values for HEAPCHECK: normal (equivalent to "1"), strict, draconian
You can also use LD_PRELOAD to heap-check an executable that you
didn't compile.
The heap checker is only available on Linux at this time; see INSTALL
for more details.
CPU PROFILER
------------
See doc/cpu-profiler.html for information about how to use the CPU
profiler and analyze its output.
As a quick-start, do the following after installing this package:
1) Link your executable with -lprofiler
2) Run your executable with the CPUPROFILE environment var set:
$ CPUPROFILE=/tmp/prof.out <path/to/binary> [binary args]
3) Run pprof to analyze the CPU usage
$ pprof <path/to/binary> /tmp/prof.out # -pg-like text output
$ pprof --gv <path/to/binary> /tmp/prof.out # really cool graphical output
There are other environment variables, besides CPUPROFILE, you can set
to adjust the cpu-profiler behavior; cf "ENVIRONMENT VARIABLES" below.
The CPU profiler is available on all unix-based systems we've tested;
see INSTALL for more details. It is not currently available on Windows.
NOTE: CPU profiling doesn't work after fork (unless you immediately
do an exec()-like call afterwards). Furthermore, if you do
fork, and the child calls exit(), it may corrupt the profile
data. You can use _exit() to work around this. We hope to have
a fix for both problems in the next release of perftools
(hopefully perftools 1.2).
EVERYTHING IN ONE
-----------------
If you want the CPU profiler, heap profiler, and heap leak-checker to
all be available for your application, you can do:
gcc -o myapp ... -lprofiler -ltcmalloc
However, if you have a reason to use the static versions of the
library, this two-library linking won't work:
gcc -o myapp ... /usr/lib/libprofiler.a /usr/lib/libtcmalloc.a # errors!
Instead, use the special libtcmalloc_and_profiler library, which we
make for just this purpose:
gcc -o myapp ... /usr/lib/libtcmalloc_and_profiler.a
CONFIGURATION OPTIONS
---------------------
For advanced users, there are several flags you can pass to
'./configure' that tweak tcmalloc performace. (These are in addition
to the environment variables you can set at runtime to affect
tcmalloc, described below.) See the INSTALL file for details.
ENVIRONMENT VARIABLES
---------------------
The cpu profiler, heap checker, and heap profiler will lie dormant,
using no memory or CPU, until you turn them on. (Thus, there's no
harm in linking -lprofiler into every application, and also -ltcmalloc
assuming you're ok using the non-libc malloc library.)
The easiest way to turn them on is by setting the appropriate
environment variables. We have several variables that let you
enable/disable features as well as tweak parameters.
Here are some of the most important variables:
HEAPPROFILE=<pre> -- turns on heap profiling and dumps data using this prefix
HEAPCHECK=<type> -- turns on heap checking with strictness 'type'
CPUPROFILE=<file> -- turns on cpu profiling and dumps data to this file.
PROFILESELECTED=1 -- if set, cpu-profiler will only profile regions of code
surrounded with ProfilerEnable()/ProfilerDisable().
CPUPROFILE_FREQUENCY=x-- how many interrupts/second the cpu-profiler samples.
TCMALLOC_DEBUG=<level> -- the higher level, the more messages malloc emits
MALLOCSTATS=<level> -- prints memory-use stats at program-exit
For a full list of variables, see the documentation pages:
doc/cpuprofile.html
doc/heapprofile.html
doc/heap_checker.html
COMPILING ON NON-LINUX SYSTEMS
------------------------------
Perftools was developed and tested on x86 Linux systems, and it works
in its full generality only on those systems. However, we've
successfully ported much of the tcmalloc library to FreeBSD, Solaris
x86, and Darwin (Mac OS X) x86 and ppc; and we've ported the basic
functionality in tcmalloc_minimal to Windows. See INSTALL for details.
See README_windows.txt for details on the Windows port.
PERFORMANCE
-----------
If you're interested in some third-party comparisons of tcmalloc to
other malloc libraries, here are a few web pages that have been
brought to our attention. The first discusses the effect of using
various malloc libraries on OpenLDAP. The second compares tcmalloc to
win32's malloc.
http://www.highlandsun.com/hyc/malloc/
http://gaiacrtn.free.fr/articles/win32perftools.html
It's possible to build tcmalloc in a way that trades off faster
performance (particularly for deletes) at the cost of more memory
fragmentation (that is, more unusable memory on your system). See the
INSTALL file for details.
OLD SYSTEM ISSUES
-----------------
When compiling perftools on some old systems, like RedHat 8, you may
get an error like this:
___tls_get_addr: symbol not found
This means that you have a system where some parts are updated enough
to support Thread Local Storage, but others are not. The perftools
configure script can't always detect this kind of case, leading to
that error. To fix it, just comment out (or delete) the line
#define HAVE_TLS 1
in your config.h file before building.
64-BIT ISSUES
-------------
There are two issues that can cause program hangs or crashes on x86_64
64-bit systems, which use the libunwind library to get stack-traces.
Neither issue should affect the core tcmalloc library; they both
affect the perftools tools such as cpu-profiler, heap-checker, and
heap-profiler.
1) Some libc's -- at least glibc 2.4 on x86_64 -- have a bug where the
libc function dl_iterate_phdr() acquires its locks in the wrong
order. This bug should not affect tcmalloc, but may cause occasional
deadlock with the cpu-profiler, heap-profiler, and heap-checker.
Its likeliness increases the more dlopen() commands an executable has.
Most executables don't have any, though several library routines like
getgrgid() call dlopen() behind the scenes.
2) On x86-64 64-bit systems, while tcmalloc itself works fine, the
cpu-profiler tool is unreliable: it will sometimes work, but sometimes
cause a segfault. I'll explain the problem first, and then some
workarounds.
Note that this only affects the cpu-profiler, which is a
gperftools feature you must turn on manually by setting the
CPUPROFILE environment variable. If you do not turn on cpu-profiling,
you shouldn't see any crashes due to perftools.
The gory details: The underlying problem is in the backtrace()
function, which is a built-in function in libc.
Backtracing is fairly straightforward in the normal case, but can run
into problems when having to backtrace across a signal frame.
Unfortunately, the cpu-profiler uses signals in order to register a
profiling event, so every backtrace that the profiler does crosses a
signal frame.
In our experience, the only time there is trouble is when the signal
fires in the middle of pthread_mutex_lock. pthread_mutex_lock is
called quite a bit from system libraries, particularly at program
startup and when creating a new thread.
The solution: The dwarf debugging format has support for 'cfi
annotations', which make it easy to recognize a signal frame. Some OS
distributions, such as Fedora and gentoo 2007.0, already have added
cfi annotations to their libc. A future version of libunwind should
recognize these annotations; these systems should not see any
crashses.
Workarounds: If you see problems with crashes when running the
cpu-profiler, consider inserting ProfilerStart()/ProfilerStop() into
your code, rather than setting CPUPROFILE. This will profile only
those sections of the codebase. Though we haven't done much testing,
in theory this should reduce the chance of crashes by limiting the
signal generation to only a small part of the codebase. Ideally, you
would not use ProfilerStart()/ProfilerStop() around code that spawns
new threads, or is otherwise likely to cause a call to
pthread_mutex_lock!
---
17 May 2011