Ben Konyi
3a1b7bdfca
Fixed issue where MallocHooks tests would try and re-initialize the hooks and ended up hitting an assert in debug mode.
...
BUG=
R=johnmccutchan@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2718723003 .
2017-02-24 14:58:42 -08:00
Ben Konyi
68a102cab2
Fixed tests not having MallocHooks initialized for tests in release mode.
...
Revert "Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.""
This reverts commit 1a5b555aa9 .
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2711353003 .
2017-02-24 13:56:06 -08:00
Ben Konyi
1a5b555aa9
Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection."
...
This reverts commit 44a9a4ede3 .
BUG=
Review-Url: https://codereview.chromium.org/2714083002 .
2017-02-23 19:21:00 -08:00
Ben Konyi
44a9a4ede3
Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.
...
Updated MallocHooks to collect stack traces when memory is allocated.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2718523003 .
2017-02-23 18:58:50 -08:00
Ben Konyi
b19e499042
Removed MallocHookScope and replaced it with MallocLocker, which behaves like MutexLocker but also keeps track of which thread current holds the lock using MallocLocker.
...
BUG=
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2715493005 .
2017-02-23 14:45:06 -08:00
Ben Konyi
d4f026c2e0
Revert "Updated MallocHooks to collect stack traces when memory is allocated."
...
This reverts commit a486a8a26b51dce728373183ab02aeda70e6f2d0.
R=johnmccutchan@google.com
TBR=johnmccutchan@google.com
BUG=
Review-Url: https://codereview.chromium.org/2713803003 .
2017-02-23 13:13:44 -08:00
Ben Konyi
47f0da9cd7
Updated MallocHooks to collect stack traces when memory is allocated.
...
BUG=
R=johnmccutchan@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2680213002 .
2017-02-23 12:42:18 -08:00
Ben Konyi
bb72892e33
Disabled MallocHooks code in Release due to performance concerns. Added enable_malloc_hooks flag to allow users to enable the hooks in Release mode if they so desire.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2700033003 .
2017-02-17 16:07:40 -08:00
Ben Konyi
b59cca17e7
Resolution for issue #28746 : changed order in which locks/flags are grabbed in MallocHooks to prevent race where a MallocHookScope tries to set the flag but MallocHookScope::TearDown deletes it before it has the opportunity to.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2701013002 .
2017-02-17 13:49:13 -08:00
Siva Annamalai
84e95a971f
Fix for issue 28638 - flakiness on dartkp-dart-precompiled caused by MallocHooks
...
BUG=#28638
R=bkonyi@google.com
Review-Url: https://codereview.chromium.org/2678313003 .
2017-02-08 13:45:05 -08:00
Ben Konyi
c8e275537d
Surfaced native heap memory allocation information to the Observatory
...
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2667743004 .
2017-01-31 16:09:49 -08:00
Ben Konyi
f679b3c3e5
Reintroducing MallocHooks changes with fix for hooks being called when in execvpe after a fork while the MallocHooks lock is held by a thread that may no longer exist.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2647283004 .
2017-01-30 09:55:20 -08:00
Zach Anderson
7730809f36
Revert "Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit."
...
This reverts commit 7bf5d87017 .
The lock introduced by this change in MallocHooksState is held across
a fork(), which causes deadlock in the child when execvpe() fails and
tries to acquire the lock when freeing memory.
Review-Url: https://codereview.chromium.org/2647793005 .
2017-01-20 23:52:31 -08:00
Ben Konyi
7bf5d87017
Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2643303003 .
2017-01-20 15:26:58 -08:00
Ben Konyi
c9a4374ed9
Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
...
This reverts commit 5290052550 .
Revert "Fixed segfault in Remove method."
This reverts commit 203f1ba222 .
BUG=
TBR=zra@google.com
Review-Url: https://codereview.chromium.org/2647763003 .
2017-01-19 15:17:29 -08:00
Ben Konyi
5290052550
Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
...
Fixed build issues from original submission.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2623613003 .
Review-Url: https://codereview.chromium.org/2644903003 .
2017-01-19 13:15:56 -08:00
Ben Konyi
10686766cd
Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
...
This reverts commit bcd7ba1056 .
TBR=zra@google.com
BUG=
Review-Url: https://codereview.chromium.org/2645973002 .
2017-01-19 12:14:19 -08:00
Ben Konyi
bcd7ba1056
Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2623613003 .
2017-01-19 12:09:07 -08:00
Ben Konyi
9ff7ee6132
Created placeholders for MallocHooks implementation and added define DART_USE_TCMALLOC to specifiy when tcmalloc is available.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2619443002 .
2017-01-06 12:38:11 -08:00