Permalink
Commits on May 4, 2014
  1. bumped version to 2.2

    Aliaksey Kandratsenka committed May 4, 2014
  2. updated NEWS for 2.2

    Aliaksey Kandratsenka committed May 4, 2014
  3. issue-620: windows dll patching: fixed delete of old stub code

    After code for issue 359 was applied PreamblePatcher started using
    it's own code to manage memory of stub code fragments. It's not using
    new[] anymore. And it automatically frees stub code memory on
    Unpatch.
    
    Clearly, author of that code forgot to remote that no more needed
    delete call. With that delete call we end up trying to free memory
    that was never allocated with any of known allocators and crash.
    Aliaksey Kandratsenka committed May 4, 2014
Commits on Apr 19, 2014
  1. bumped version to 2.1.90

    Aliaksey Kandratsenka committed Apr 19, 2014
  2. updated NEWS for 2.2rc

    Aliaksey Kandratsenka committed Apr 19, 2014
Commits on Apr 13, 2014
  1. issue-610: use TCMallocGetenvSafe from inside malloc

    Instead of plain getenv. So that windows getenv implementation that
    may call malloc does not deadlock.
    Aliaksey Kandratsenka committed Apr 13, 2014
  2. issue-610: made dynamic_annotations.c use TCMallocGetenvSafe

    Aliaksey Kandratsenka committed Apr 13, 2014
  3. issue-610: introduced TCMallocGetenvSafe

    This is version of GetenvBeforeMain that's available to C code.
    Aliaksey Kandratsenka committed Apr 13, 2014
  4. don't enable backtrace() for stacktrace capturing by default

    Because we don't yet have a treatment for deadlocks that are caused by
    (recursive) use of malloc from within that facility.
    Aliaksey Kandratsenka committed Apr 12, 2014
Commits on Apr 12, 2014
  1. @rzinsly

    PowerPC: stacktrace function refactor and fixes

    This patch fixes the stacktrace creating when the function is
    interrupted by a signal. For Linux, the vDSO signal trampoline symbol is
    compared against LR from stack backchain and handled different in that
    case (since the signal trampoline layout a different stack frame).
    
    Because of this extensive change the PowerPC stacktrace code has now
    been refactored to split in Linux and Darwin specific codes.
    rzinsly committed with Aliaksey Kandratsenka Apr 8, 2014
  2. @rzinsly

    VDSOsupport cleanup

    This patch cleans up unused VDSO getcpu racking from VDSOsupport class,
    since the code is not used anywhere in gperftools and symbol name is not
    architecture independent.
    rzinsly committed with Aliaksey Kandratsenka Apr 8, 2014
  3. @rzinsly

    Fixed issues with heap checker on PPC64 LE.

    Fixed the wrapper for the syscall sys_clone and the test for heap
    checker on PPC64 LE. Both use the ODP structure, which is only
    used on BE architectures.
    rzinsly committed with Aliaksey Kandratsenka Apr 8, 2014
  4. @rzinsly

    Fixed the way that pprof packed profile data in BE.

    pprof was writing profile data in a way that only works for little-endian
    files, this patch verifies if the system is big-endian and writes packed
    data correctly.
    rzinsly committed with Aliaksey Kandratsenka Apr 8, 2014
  5. @rzinsly

    Fixed the use of addr2line to discover the separator symbol.

    In systems where addr2line has a version greater than 2.22 pprof fails
    in discover the separator symbol (_fini). This patch identifies if
    addr2line can find the symbol, otherwise pprof uses objdump to recover
    a address that addr2line's newer versions can recognize as the separator
    function.
    rzinsly committed with Aliaksey Kandratsenka Apr 8, 2014
Commits on Apr 7, 2014
  1. issue-614: use tc_memalign in ReallocAfterMemalloc test

    Because some OSes lack plain memalign. And we really need to test our
    implementation which is always available via tc_malloc.
    Aliaksey Kandratsenka committed Apr 2, 2014
Commits on Apr 2, 2014
  1. added tc_malloc_skip_new_handler

    This is port of corresponding chromium change at:
    https://codereview.chromium.org/55333002/
    
    Basic idea is that sometimes apps that use tc_set_new_mode in order to
    have C++ out-of-memory handler catch OOMs in malloc, need to invoke
    usual malloc that returns 0 on OOM.
    
    That new API is exactly for that. It'll always return NULL on OOM even
    if tc_new_mode is set to true.
    Aliaksey Kandratsenka committed Apr 2, 2014
  2. issue deprecation warning on use of google/ headers

    Aliaksey Kandratsenka committed Mar 1, 2014
Commits on Mar 29, 2014
  1. speed up MallocExtension::instance()

    It was reported that pthread_once is expensive, especially on ppc.
    
    In new implementation in hot path instead of doing potentially
    expensive atomic read with barrier, we do just plain read.
    
    It's slightly less robust than older implementation, but it should be
    faster.
    
    New code is making assumption that programs do not spawn threads
    before main() is called. And therefore all variables & modules are
    initialized before threads are created. Which looks like pretty safe
    assumption. With that assumption, doing plain read is safe, because
    current_instance is initialized as part of module init and therefore
    before threads are spawned.
    
    This patch is based on feedback of Adhemerval Zanella.
    Aliaksey Kandratsenka committed Mar 15, 2014
  2. @zatrazz

    Fix getpc_test for PPC64v2 LE

    This patch fix the PPC64 guard to get the function address for PPC64v2.
    It removes the use of an indirection (to get the ODP text address),
    since the PPCv2 does not have function descriptors.
    zatrazz committed with Aliaksey Kandratsenka Feb 2, 2014
  3. issue-613: remove friend declaration from HeapLeakChecker

    This applies patch by davide.italiano@10gen.com:
    
    heap-checker.h contains the following friend declaration of main:
    friend int main(int, char**).
    
    C99 allows another declaration of main, i.e. int main(int, char**,
    char**), and if code uses it and includes the heap-checker header,
    this might result in a conflict, e.g.
    
    error: declaration of C function 'int main(int, char**, char**)' conflicts with
     int main(int argc, char* argv[], char** envp)
    
    Actually the comment above the friend declaration of main() mentions
    that this is required to get the unittest working and for other
    internal usage, but I'm not completely sure if this is true as long as
    I'm able to build and run the unittest removing the declaration.
    Aliaksey Kandratsenka committed Mar 29, 2014
  4. issue-612: added missing include for std::min

    Otherwise Visual Studio 2013 rightfully complains
    Aliaksey Kandratsenka committed Mar 29, 2014
Commits on Mar 1, 2014
  1. unbreak building with libunwind

    Caused by premature merging of previous patch.
    
    When we're searching for backtrace in libexecinfo and don't find it,
    we should not reset UNWIND_LIBS to empty value.
    
    Correct fix is to first search for backtrace in libunwind and then to
    search for it in libexecinfo.
    Aliaksey Kandratsenka committed Mar 1, 2014
  2. @0-wiz-0

    Look for backtrace() in libexecinfo as well.

    Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
    0-wiz-0 committed with Aliaksey Kandratsenka Feb 25, 2014
  3. @0-wiz-0

    Fix unportable test(1) construct.

    Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
    0-wiz-0 committed with Aliaksey Kandratsenka Feb 25, 2014
  4. @0-wiz-0

    Test for memalign in configure.ac. Disable a test that uses memalign …

    …if it is not found.
    
    Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
    0-wiz-0 committed with Aliaksey Kandratsenka Feb 25, 2014
Commits on Feb 22, 2014
  1. issue-489: added tcmalloc test pass with chromium-style decommit

    Aliaksey Kandratsenka committed Feb 22, 2014
  2. issue-489: added unit test for chromium-style decommitting

    Aliaksey Kandratsenka committed Feb 22, 2014
  3. issue-489: made tests pass on enabled chromium-style decommitting

    Aliaksey Kandratsenka committed Feb 22, 2014
  4. issue-489: enable chromium-style decommitting on env variable

    TCMALLOC_AGGRESSIVE_DECOMMIT=t now enables aggressive decommitting by
    default.
    Aliaksey Kandratsenka committed Feb 22, 2014
  5. issue-489: implemented API to set chromium-style de-committing

    Chrome has code to decommit (release back to OS) every span that's
    released. I don't want to make it default, but indeed some
    applications may want to enable this mode.
    
    The code itself is taken from 2-way-merging of code from Chromium
    fork.
    Aliaksey Kandratsenka committed Nov 10, 2013
  6. issue-489: fixed warning

    Computing certain values just for ASSERT raises just warning from
    compiler because if NDEBUG is set those are dead code.
    Aliaksey Kandratsenka committed Nov 10, 2013
  7. issue-489: ported chromium windows decommitting code

    I tried to do it cleanly with merges but chromium code has so many
    relevant commits (with frequent reverts) that makes it near
    impossible.
    
    Simpler 2-way emerge-files worked in the end. I've removed chromium's
    aggressive 'always decommit' behavior which I want to make optional
    later.
    
    Majority of this work is the following commits (but there are more,
    particularly against port.cc):
    
    commit 9c92338c5f8770c440799d24387c3733fd6d826b
    Author: jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
    Date:   Tue Oct 6 18:33:31 2009 +0000
    
        Tracks the amount of committed vs uncommitted memory in tcmalloc's page 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 Malloc
    
        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
    
    commit aef4f1be3eec2059a7c6e2c106050a5f3d6ccf12
    Author: jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
    Date:   Mon Oct 5 17:58:51 2009 +0000
    
        Revert further back to MBelshe's baseline forking TCMalloc
    
        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
    
    commit e94afbb913b95f512cb8745a2729c73f82b15ae7
    Author: jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
    Date:   Thu Oct 1 00:25:41 2009 +0000
    
        Rollback Scavenge implemetation and rely on existing functionality to free
    
        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
    
    commit c585892d2c42a47c95d06a684a6685156c545403
    Author: mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
    Date:   Wed Sep 2 17:33:23 2009 +0000
    
        Landing for Anton Muhin's tcmalloc patch:
        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
    
    commit 14239acc00731e94736ac62e80fc6b17c31ea131
    Author: mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
    Date:   Wed Aug 12 02:17:14 2009 +0000
    
        Major changes to the Chrome allocator.
    
        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
    Aliaksey Kandratsenka committed Nov 10, 2013
  8. issue-525: only warn if --enable-frame-pointers are not given

    This fixes issue when frame pointers warning is given even if frame
    pointers are enabled
    Aliaksey Kandratsenka committed Feb 22, 2014
  9. added debugallocation check for offset_ corruption

    It was previously possible (although unlikely) for damaged offset_ field
    to lead FromRawPointer implementation into different MallocBlock.
    
    As is usual with any damage, it's best to catch errors at earliest
    possible time.
    Aliaksey Kandratsenka committed Feb 17, 2014
  10. avoid crash in DebugMallocImplementation::GetOwnership

    It was possible that if GetOwnership is passed pointer to memory not
    owned by tcmalloc, it would crash. Or incorrectly return
    owned. I.e. due to indirection in FromRawPointer.
    
    New implementation prevents that, but introduces different bug
    instead. New implementation incorrectly returns "not owned" for
    memalign chunks with big alignment. But in can be argued that passing
    pointer returned from different memalign implementation did not work
    previously too.
    Aliaksey Kandratsenka committed Feb 17, 2014