From 26d8858eccf280ac5763db15e8b3eeed75489cf1 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 29 Jan 2018 16:28:44 -0800 Subject: Changes imported from Abseil "staging" branch: - 53419b5e123c4c9c47ecfe52ba747a271b03ae9c Add the sampling weight to MallocHook_SampledAlloc, so th... by Abseil Team - 8689c9a0dc685f50ba843a8d0d7d4274a1ec656a Factor out inline variable detection to separate macro. by Matt Calabrese - 0eac39ee9d81c03b8335c1cd3871d0dc4ec7bca7 Log the actual and expected durations for failed timing t... by Abseil Team GitOrigin-RevId: 53419b5e123c4c9c47ecfe52ba747a271b03ae9c Change-Id: I4ae8f5c0e924cdeee253fdf37d483d47893fc64c --- absl/base/internal/malloc_hook.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'absl/base/internal/malloc_hook.h') diff --git a/absl/base/internal/malloc_hook.h b/absl/base/internal/malloc_hook.h index 7c1eaddb..6b006eda 100644 --- a/absl/base/internal/malloc_hook.h +++ b/absl/base/internal/malloc_hook.h @@ -91,8 +91,11 @@ class MallocHook { // SampledAlloc has the following fields: // * AllocHandle handle: to be set to an effectively unique value (in this // process) by allocator. - // * size_t allocated_size: space actually used by allocator to host - // the object. + // * size_t allocated_size: space actually used by allocator to host the + // object. Not necessarily equal to the requested size due to alignment + // and other reasons. + // * double weight: the expected number of allocations matching this profile + // that this sample represents. // * int stack_depth and const void* stack: invocation stack for // the allocation. // The allocator invoking the hook should record the handle value and later -- cgit v1.2.3