Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: runtime/vm/malloc_hooks.cc

Issue 2771293003: Resubmission of native memory allocation info surfacing in Observatory. Fixed crashing tests and st… (Closed)
Patch Set: Resubmission of native memory allocation info surfacing in Observatory. Fixed crashing tests and st… Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/malloc_hooks.h ('k') | runtime/vm/malloc_hooks_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/malloc_hooks.cc
diff --git a/runtime/vm/malloc_hooks.cc b/runtime/vm/malloc_hooks.cc
index 2721000616898ec0915be2bb81cd8c6b45758cd5..d33f2be17ac41db9f721c360d9230c1677693755 100644
--- a/runtime/vm/malloc_hooks.cc
+++ b/runtime/vm/malloc_hooks.cc
@@ -154,14 +154,6 @@ class AllocationInfo {
Sample* sample_;
uword address_;
intptr_t allocation_size_;
-
- // The number of frames that are generated by the malloc hooks and collection
- // of the stack trace. These frames are ignored when collecting the stack
- // trace for a memory allocation. If this number is incorrect, some tests in
- // malloc_hook_tests.cc might fail, particularily
- // StackTraceMallocHookLengthTest. If this value is updated, please make sure
- // that the MallocHooks test cases pass on all platforms.
- static const intptr_t kSkipCount = 6;
};
@@ -443,7 +435,8 @@ void MallocHooksState::RecordFreeHook(const void* ptr) {
if (MallocHooksState::address_map()->Lookup(ptr, &allocation_info)) {
MallocHooksState::DecrementHeapAllocatedMemoryInBytes(
allocation_info->allocation_size());
- ASSERT(MallocHooksState::address_map()->Remove(ptr));
+ bool result = MallocHooksState::address_map()->Remove(ptr);
Cutch 2017/03/27 17:52:29 const bool ...
+ ASSERT(result);
delete allocation_info;
}
}
« no previous file with comments | « runtime/vm/malloc_hooks.h ('k') | runtime/vm/malloc_hooks_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698