summaryrefslogtreecommitdiffstats
path: root/base/trace_event/heap_profiler_allocation_register_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* [Tracing] Add lookup support to AllocationRegisterruuda2016-01-111-8/+58
| | | | | | | | | | | | | | | | | | | | | This adds a |Get| method to |AllocationRegister| which can be used to change the context and size of an allocation after it has been inserted. One possible use case of this is to post-annotate allocations with type information, when this information is not available to the allocator, but it is later in the program. Because |AllocationRegister::Allocation| is now exposed mutably, its |address| member has been made const. The hash of the address has to match the bucket in which the |Allocation| is stored, so after insertion the address must not be changed. This is enforced by making the member const, at the cost of a few const violations in the implementation of |AllocationRegister|. BUG=574756 Review URL: https://codereview.chromium.org/1574493002 Cr-Commit-Position: refs/heads/master@{#368583}
* Switch to standard integer types in base/trace_event/.avi2015-12-241-0/+3
| | | | | | | | | BUG=138542 TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1546033002 Cr-Commit-Position: refs/heads/master@{#366798}
* Reland of [Tracing] Adjust allocation register size for low-end devicesruuda2015-12-181-6/+10
| | | | | | | | | | | | | | | | | | | | Original CL: https://crrev.com/1530583003 by seantopping@chromium.org. > This patch limits the size of the allocation register and prevents OOM > errors when running AllocationRegisterTest.OverflowDeathTest on > low-end devices. > > BUG=570242 > > Committed: https://crrev.com/684e479f9a46580b5d5bdcf58944b832f6317dc1 > Cr-Commit-Position: refs/heads/master@{#365905} BUG=570242 TBR=primiano@chromium.org,seantopping@chromium.org Review URL: https://codereview.chromium.org/1531263004 Cr-Commit-Position: refs/heads/master@{#366081}
* Revert of [Tracing] Adjust allocation register size for low-end devices ↵phoglund2015-12-181-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #4 id:60001 of https://codereview.chromium.org/1530583003/ ) Reason for revert: Breaks Win GN compile (warning C4267: 'argument' : conversion from 'size_t' to 'uint32_t', possible loss of data): https://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN/builds/9247/steps/compile/logs/stdio Original issue's description: > [Tracing] Adjust allocation register size for low-end devices > > This patch limits the size of the allocation register and prevents OOM > errors when running AllocationRegisterTest.OverflowDeathTest on low-end > devices. > > BUG=570242 > > Committed: https://crrev.com/684e479f9a46580b5d5bdcf58944b832f6317dc1 > Cr-Commit-Position: refs/heads/master@{#365905} TBR=primiano@chromium.org,ruuda@google.com,seantopping@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=570242 Review URL: https://codereview.chromium.org/1535063003 Cr-Commit-Position: refs/heads/master@{#366061}
* [Tracing] Adjust allocation register size for low-end devicesseantopping2015-12-171-6/+10
| | | | | | | | | | | | This patch limits the size of the allocation register and prevents OOM errors when running AllocationRegisterTest.OverflowDeathTest on low-end devices. BUG=570242 Review URL: https://codereview.chromium.org/1530583003 Cr-Commit-Position: refs/heads/master@{#365905}
* [Tracing] Make AllocationContext constructor privateruuda2015-11-161-6/+6
| | | | | | | | | | | | | This is to prevent unintentionally constructing an uninitialized instance. It is still possible to construct an |AllocationContext| (apart from copy constructing) by using an initializer list. This is fine, because the instance will not be filled with garbage; it will be zeroed out. By design, a zeroed instance represents a context with unknown type ID and empty backtrace. Review URL: https://codereview.chromium.org/1416833008 Cr-Commit-Position: refs/heads/master@{#359817}
* [Tracing] Clean up heap profiler filesruuda2015-11-161-0/+229
Over time, base/trace_event/memory_profiler_allocation_context.h had become a god header that contained nearly all heap profiler classes. This CL splits the file (along with its tests) into multiple smaller files. Furthermore, there are small comment and readability fixes. No behavior is changed by this CL. * Change prefix of heap profiler files from |memory_profiler_*| to |heap_profiler_*|. * Move |AllocationContextTracker| and its tests into its own file. * Move |StackFrameDeduplicator| and its tests into its own file. * Remove |AllocationStack|, which was just a very thin wrapper around |std::vector|. Inline its logic into |AllocationContextTracker| instead. * Rename the |SortDescending| function in the heap dump writer source file to |SortBySizeDescending|. * Fix variable names in comments in |AllocationRegister|. * Fix and clarify comments in |AllocationContextTracker| and |StackFrameDeduplicator|. * Include what you use fixes. BUG=524631 Review URL: https://codereview.chromium.org/1431103004 Cr-Commit-Position: refs/heads/master@{#359813}