summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc
Commit message (Collapse)AuthorAgeFilesLines
* Implement the memory leak annotations for heap leak checker.willchan@chromium.org2009-11-111-0/+416
| | | | | | | | | | | | | leak_annotations.h provides the ANNOTATE_SCOPED_MEMORY_LEAK macro that can be used for annotating known memory leaks in the tests. Those will be ignored by the heap leak checker. Patch contributed by ramosian.glider@gmail.com. Original review at http://codereview.chromium.org/346038/show Review URL: http://codereview.chromium.org/385049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31721 0039d316-1c4b-4281-b951-d872f2087c98
* Upgrade google-perftools to revision 77timurrrr@chromium.org2009-11-025-513/+18
| | | | | | | | | | | | This brings several bugfixes needed for turning on the heap leak checker inside tcmalloc. Unforked malloc_hook.cc for Linux This patch was prepared by Alexander Potapenko (cc'ed) and originally reviewed as http://codereview.chromium.org/339065 Review URL: http://codereview.chromium.org/340065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30735 0039d316-1c4b-4281-b951-d872f2087c98
* Taking advantage of new configuration inheritance option.bradnelson@chromium.org2009-10-291-15/+1
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/342041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30515 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the -fvisibility=hidden flag for tcmalloctimurrrr@chromium.org2009-10-291-0/+3
| | | | | | | | | | This is necessary to fix the crashes of binaries linked with tcmalloc. The patch was prepared by Alexander Potapenko (cc'ed) Originally reviewed as http://codereview.chromium.org/343037 Review URL: http://codereview.chromium.org/342039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30479 0039d316-1c4b-4281-b951-d872f2087c98
* Added the symbols needed to enable heapchecker using a 64-bit compiler (the ↵timurrrr@chromium.org2009-10-221-0/+1
| | | | | | | | | | buildbots seemed to ignore the heapchecker symbols defined previously in ldflags) This patch was prepared by Alexander Potapenko (cc'ed) TBR=evan,mbelshe,bradn already LGTM'd at http://codereview.chromium.org/300039 Review URL: http://codereview.chromium.org/315015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29770 0039d316-1c4b-4281-b951-d872f2087c98
* Add the support for tcmalloc's heap leak checker.timurrrr@chromium.org2009-10-211-0/+2
| | | | | | | | | | | The heap checker will be linked with libtcmalloc by default. This patch was prepared by Alexander Potapenko (cc'ed) and originally reviewed as http://codereview.chromium.org/307005 TBR=evan,bradn (already LGTMed at http://codereview.chromium.org/307005) Review URL: http://codereview.chromium.org/292043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29625 0039d316-1c4b-4281-b951-d872f2087c98
* Modify allocator to use malloc for the realloc(0, size) case.mbelshe@google.com2009-10-191-0/+6
| | | | | | | | | | | | This works around webkit sensitivity to allocators that return zero in this case. BUG=20200 TEST=none Review URL: http://codereview.chromium.org/302005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29425 0039d316-1c4b-4281-b951-d872f2087c98
* Tracks the amount of committed vs uncommitted memory in tcmalloc's page ↵jamesr@chromium.org2009-10-063-11/+53
| | | | | | | | | | | | | heap's freelists Keeps track of the number of reserved but not committed pages in the freelist and uses that to calculate a waste metric, which is the ratio of committed pages vs pages used by the application. This is exposed in the GetStats() call (which is used for about:tcmalloc) and through GetNumericalProperty() in MallocExtension. BUG=none TEST=open about:tcmalloc and monitor 'WASTE' columns while using the browser Review URL: http://codereview.chromium.org/251065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28133 0039d316-1c4b-4281-b951-d872f2087c98
* Add comments setting emacs and vim tab width and expansion variables.sgk@google.com2009-10-061-0/+6
| | | | | | | | BUG=none TEST=successful builds Review URL: http://codereview.chromium.org/256059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28089 0039d316-1c4b-4281-b951-d872f2087c98
* Enable TCMallocjar@chromium.org2009-10-051-1/+1
| | | | | | | | | | With TCMalloc now being more conservative about commitment, this change will reenable it as the default allocator. r=mbelshe,jamesr Review URL: http://codereview.chromium.org/246089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28020 0039d316-1c4b-4281-b951-d872f2087c98
* Revert further back to MBelshe's baseline forking TCMallocjar@chromium.org2009-10-052-19/+32
| | | | | | | | | | This changes to decommitting in all paths through the page_heap delete method (which adds spans to the free lists). r=mbelshe,jamesr Review URL: http://codereview.chromium.org/255067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28006 0039d316-1c4b-4281-b951-d872f2087c98
* Set JEMalloc as the default allocator (instead of TCMalloc)jar@chromium.org2009-10-011-1/+1
| | | | | | | | | | | | | | | | | I got this change approved to try out earlier, and landed it. I rolled it back (to be conservative) after I got a chromebot run started. Since that bot run didn't show any giant problems, this will re-land the change, so we can see how users (such as on a dev channel release) do with this allocator. This is really experimental... but it will give us some info to make a better decision between ongoing tuning of TCMalloc and at least temporarilly using JEMalloc. tbr=mbelshe Review URL: http://codereview.chromium.org/256024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27708 0039d316-1c4b-4281-b951-d872f2087c98
* Revert to using TCMallocjar@chromium.org2009-10-011-1/+1
| | | | | | | | | | | I wanted to see how the chromebot would do with JEMalloc. I just checked it in, and after a chrome-bot run kicks off, I'll land this effectively reverting rev 27702 back to using TCMalloc. tbr=mbelshe Review URL: http://codereview.chromium.org/242092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27703 0039d316-1c4b-4281-b951-d872f2087c98
* Try to use JEMALLOC as the default allocatorjar@chromium.org2009-10-011-2/+2
| | | | | | | r=jamesr,mbelshe Review URL: http://codereview.chromium.org/244055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27702 0039d316-1c4b-4281-b951-d872f2087c98
* Rollback Scavenge implemetation and rely on existing functionality to freejar@chromium.org2009-10-018-723/+6
| | | | | | | | | | | | | | This is a landing of a patch provided by antonm. See: http://codereview.chromium.org/235022 Also included change to browser_about_handler.cc to fix build, and I set TCMALLOC_RELEASE_RATE to 1.0 on line 40 of page_heap.cc (I think this was an inadvertent rollback element). r=antonm Review URL: http://codereview.chromium.org/257009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27692 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a few \r\ns I accidentally added to a comment.jamesr@chromium.org2009-09-251-2/+2
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/245006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27257 0039d316-1c4b-4281-b951-d872f2087c98
* Rounds up VirtualAlloc calls on windows to dwAllocationGranularity to ↵jamesr@chromium.org2009-09-251-19/+20
| | | | | | | | | | | | | | | | | | | | | | prevent fragmentation Actually on Windows VirtualAlloc'ated address might have bigger alignment than reported by SYSTEM_INFO.dwPageSize, see SYSTEM_INFO.dwAllocationGranularity. As coalescing of spans in tcmalloc requires that those spans are physically adjacent, using smaller alignment inhibited coalescing. Additional benefit is we now require ways less memory at least in some case. Also adds assert()s for alignment values that would lead to pathological virtual address space waste. No current callers pass in alignment values other than kPageSize and it's unlikely anyone will. Original patch and discussion was at http://codereview.chromium.org/235003 Patch by: antonm@chromium.org BUG=22701 TEST=Manually checked test page that did 10m XHR. Memory use goes from >2GB and a crash to 102MB. Membuster shows the change is roughly within noise and possibly a very slight regression ( <<5% ). Review URL: http://codereview.chromium.org/222028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27162 0039d316-1c4b-4281-b951-d872f2087c98
* Preliminary fixes to enable link dependent objects.maruel@chromium.org2009-09-241-2/+0
| | | | | | | | BUG=22926 TEST=still builds Review URL: http://codereview.chromium.org/231020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27112 0039d316-1c4b-4281-b951-d872f2087c98
* tcmalloc tests & bug fixes:mbelshe@google.com2009-09-195-5/+539
| | | | | | | | | | | | | | | | | | | | | | | | | | | bugfixes: 1) calling the new handler would return true when exceptions were disabled. In Chrome's case, this didn't matter, because we use a handler which forces a crash. However, if you use a different handler that doesn't crash, this causes a loop - forever calling the new handler. Return false instead as there is no other way to break the loop. 2) recalloc() was broken. It was zeroing the buffer on recalloc calls, which is incorrect. testing: I took a set of tests from tcmalloc and applied them into a new unittest. The new unittest can test all allocators used by the allocator-shim. I included the atomic tests in here, simply because it was easy to do, and it seemed it could prove useful for cross platform testing. Overall, I'd say these are a sanity test, and not a comprehensive test. BUG=none TEST=tcmalloc_unittests.cc Review URL: http://codereview.chromium.org/213030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26651 0039d316-1c4b-4281-b951-d872f2087c98
* Force inclusion of build/common.gypi for all chromium gyp files.yaar@chromium.org2009-09-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Why: Simpler build code. If everybody includes it, it should be included automatically. Why now: The webkit chromium builds need it be specified, since can't default to build/common.gypi. What was done: 1. build/common.gypi's contents were moved to a new file build/gyp_chromium.gypi 2. tools/gyp/gyp_chromium was moved to build/gyp_chromium and made to automatically include build/gyp_chromium.gypi. 3. lots of gyp files were fixed to not refer to build/common.gypi any more. 4. o3d which also builds independently of chrome, was fixed to have a gyp_o3d that includes gyp_chromium.gypi too. 5. build/common.gypi was left empty, because there are some external projects that still refer to it. Things that are left to do after this patch is in: 1. The following external files (in other repositories) need to stop include common.gypi ./third_party/hunspell/hunspell.gyp ./third_party/icu/icu.gyp ./v8/tools/gyp/v8.gyp 2. Once nobody refers to common.gypi anymore, delete common.gypi -or- Delete gyp_chromium.gypi and move its content back to common.gypi Tested on mac, win and linux. On win, got a few unit tests errors on chrome bookmarks, which should not be related. I'm running again with clobber to verify. Review URL: http://codereview.chromium.org/206006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26302 0039d316-1c4b-4281-b951-d872f2087c98
* Issue 172109: Enable scavenging in RenderThread::IdleHandler.agl@chromium.org2009-09-156-3/+586
| | | | | | | | | | | | Landing of Anton Muhin's patch (antonm@google.com) (Reland. First landed in r26264, reverted in r26276. This reland hopefully doesn't build tcmalloc on Linux.) Review URL: http://codereview.chromium.org/206017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26298 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Issue 172109: Enable scavenging in RenderThread::IdleHandler."agl@chromium.org2009-09-156-586/+3
| | | | | | | This reverts commit r26264. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26276 0039d316-1c4b-4281-b951-d872f2087c98
* Issue 172109: Enable scavenging in RenderThread::IdleHandler.mbelshe@google.com2009-09-156-3/+586
| | | | | | | | | | | | Landing of Anton Muhin's patch (antonm@google.com) BUG=none TEST=none Review URL: http://codereview.chromium.org/206017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26264 0039d316-1c4b-4281-b951-d872f2087c98
* Fix realloc to not call the new_handler (which is for failures)mbelshe@google.com2009-09-091-1/+5
| | | | | | | | | | | | when the request was for realloc(ptr, 0). Calling realloc(ptr, 0) is valid, and we should delete ptr and return NULL. BUG=none TEST=none Review URL: http://codereview.chromium.org/194040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25700 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the windows allocator to behave properly on realloc.mbelshe@google.com2009-09-081-10/+14
| | | | | | | | | | | | | The spec says that calling realloc(ptr, 0) should free ptr and return NULL. BUG=none TEST=none Review URL: http://codereview.chromium.org/196041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25612 0039d316-1c4b-4281-b951-d872f2087c98
* The prep_libc script was not removing the new operator for the std::throw case.mbelshe@google.com2009-09-071-1/+1
| | | | | | | | | | This funciton is defined as part of tcmalloc; it shouldn't be in libcmt anymore. BUG=none TEST=none; we're removing code from libc. If this is a problem, it will fail to link. Review URL: http://codereview.chromium.org/200036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25601 0039d316-1c4b-4281-b951-d872f2087c98
* Landing for Anton Muhin's tcmalloc patch:mbelshe@google.com2009-09-025-14/+400
| | | | | | | | | | | | | | | http://codereview.chromium.org/180021/show Restore decommitting in IncrementalScavenge and draft Scavenge method to be invoked periodically to reduce amount of committed pages. BUG=none TEST=none Review URL: http://codereview.chromium.org/187008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25188 0039d316-1c4b-4281-b951-d872f2087c98
* Silence the libcmt project to only print the processed files.maruel@chromium.org2009-08-291-3/+4
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/175021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24858 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add gyp flag for enabling tcmalloc. Also fix the linux build which ↵willchan@chromium.org2009-08-262-16/+102
| | | | | | | | didn't work in a clean client since tcmalloc.h wasn't generated. Review URL: http://codereview.chromium.org/173387 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24538 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: make cpu profiler buildable with tcmalloc (does not enable tcmalloc).willchan@chromium.org2009-08-201-8/+18
| | | | | | | | | I forgot to add the cpu profiler files last time and got surprised when CPUPROFILE didn't do anything. I've added the files in now. I also made the libcmt dependency specific to windows, since the make build doesn't like it. Review URL: http://codereview.chromium.org/173110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23823 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Make tcmalloc buildable on linux (does not enable it though).willchan@chromium.org2009-08-195-263/+1103
| | | | | | | | | | | | | | Mostly changes to tcmalloc.gyp to get tcmalloc building for linux. Supports the full google-perftools tool suite (heapchecker, heapprofiler, cpuprofiler). Adds in a fix for malloc_hook.cc that is not upstream yet. Forked malloc_hook.cc. Forces linking in a symbol that is not used except by a static initializer which was getting stripped out, thereby getting heap profiler to work even when statically linked. TODO: integrate with allocator_shim TODO: support jemalloc TODO: support debugallocation Review URL: http://codereview.chromium.org/173017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23761 0039d316-1c4b-4281-b951-d872f2087c98
* Major changes to the Chrome allocator.mbelshe@google.com2009-08-1215-3/+11939
| | | | | | | | | | | | | | | | | | | | Changes include: * Fix tcmalloc to release memory. Implements the TCMalloc_SystemCommit() mechanism so that tcmalloc can implement SystemRelease() and later reuse that memory. * Enable dynamic switching of allocators based on an environment variable. Users can now switch between tcmalloc, jemalloc, the default windows heap, and the windows low-fragmentation heap. * Implements set_new_mode() across all allocators so that we can be sure that out-of-memory conditions are handled safely. BUG=18345 TEST=none; plan to get all unit tests running through these allocators. Review URL: http://codereview.chromium.org/165275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23140 0039d316-1c4b-4281-b951-d872f2087c98
* Adding two new windows configuration types:bradnelson@chromium.org2009-08-041-6/+24
| | | | | | | | | | | | | | | | | Purify Release - no tcmalloc This is done more pedantically than I'd like, so I've left in some TODOs. Eventually either gyp needs to support some notion of inheritance in configurations, or maybe we can make clever use of includes. BUG=None TEST=None Review URL: http://codereview.chromium.org/159362 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22433 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 21938 (done with experiment).willchan@chromium.org2009-07-294-542/+263
| | | | | | Review URL: http://codereview.chromium.org/160314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21939 0039d316-1c4b-4281-b951-d872f2087c98
* Experiment: Enable tcmalloc for linux (Take 2). Will revert after a ↵willchan@chromium.org2009-07-294-263/+542
| | | | | | | | buildbot cycle. Review URL: http://codereview.chromium.org/160313 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21938 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Experiment: Enable tcmalloc for linux. Will revert after a buildbot ↵willchan@chromium.org2009-07-284-542/+263
| | | | | | | | | | cycle." This reverts r21826. Review URL: http://codereview.chromium.org/160261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21827 0039d316-1c4b-4281-b951-d872f2087c98
* Experiment: Enable tcmalloc for linux. Will revert after a buildbot cycle.willchan@chromium.org2009-07-284-263/+542
| | | | | | | | TBR=willchan Review URL: http://codereview.chromium.org/159491 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21826 0039d316-1c4b-4281-b951-d872f2087c98
* Switching in new gyp version (which changes 'none' back to how it was before).bradnelson@chromium.org2009-07-101-7/+1
| | | | | | | | | | | Updating installer_util_strings to use dummy_executable. BUG=None TEST=None Review URL: http://codereview.chromium.org/155371 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20408 0039d316-1c4b-4281-b951-d872f2087c98
* Pulling in new gyp version with 'none' type workaround.bradnelson@chromium.org2009-07-101-1/+7
| | | | | | Review URL: http://codereview.chromium.org/149447 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20368 0039d316-1c4b-4281-b951-d872f2087c98
* Added stub native web worker support, including build support in preparationsehr@google.com2009-06-291-1/+1
| | | | | | | for integrating the native client build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19479 0039d316-1c4b-4281-b951-d872f2087c98
* Roll to the new version of tcmalloc.mbelshe@google.com2009-06-101-1/+1
| | | | | | | | | | | This is so that we can pick up set_new_mode(). BUG=11475 TEST=none Review URL: http://codereview.chromium.org/118523 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18105 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the checked-in tcmalloc.vcproj file.sgk@chromium.org2009-06-061-58/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119280 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17831 0039d316-1c4b-4281-b951-d872f2087c98
* Convert tcmalloc (and its modified libcmt) to building with gyp.sgk@google.com2009-06-063-242/+157
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119265 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17828 0039d316-1c4b-4281-b951-d872f2087c98
* Update to new version of tcmalloc (new spinlock implementation)mbelshe@google.com2009-05-191-0/+4
| | | | | | Review URL: http://codereview.chromium.org/113563 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16362 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linker errors on Visual Studio 2008 after the tcmalloc introduction.sverrir@chromium.org2009-04-221-16/+13
| | | | | | | | Minor change to Mike's suggested fix. Review URL: http://codereview.chromium.org/92037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14257 0039d316-1c4b-4281-b951-d872f2087c98
* Start pulling tcmalloc into the build. Not using it yetmbelshe@google.com2009-04-213-0/+540
with this checkin. Review URL: http://codereview.chromium.org/79085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14128 0039d316-1c4b-4281-b951-d872f2087c98