Accounting error in OOP HP. |
||
Issue descriptionfrees that occur on a thread after Chrome-TLS teardown will not be recorded by OOP HP. In order to fix this accounting error, we probably need to move to a custom implementation of cross-platform TLS that doesn't use malloc/free.
,
May 7 2018
,
May 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/26b06001aaac6a87a6d34576367c9531e404765d commit 26b06001aaac6a87a6d34576367c9531e404765d Author: erikchen <erikchen@chromium.org> Date: Wed May 30 22:34:14 2018 OOP HP accounting fix for thread destruction frees. Previously, OOP HP relied on base TLS to implement its re-entrancy bit. Base TLS cannot be used after thread destruction has started. This means that frees that occurred during thread destruction were not being logged. This CL implements a very simple cross-platform TLS re-entrancy bit. Since it's only a single bit, the data can be stored in the TLS value without needing any additional allocations. This means that it can be safely used during thread destruction. With this CL, frees that occur in thread destruction will be correctly recorded. Allocations still depend on base TLS, so they will be missed. Bug: 839416 Change-Id: I2e1aab9de73122f234a4b11b826e491c347dcfd5 TBR: gab@chromium.org Reviewed-on: https://chromium-review.googlesource.com/1076448 Reviewed-by: Richard Coles <torne@chromium.org> Reviewed-by: Robert Liao <robliao@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#563033} [modify] https://crrev.com/26b06001aaac6a87a6d34576367c9531e404765d/android_webview/lib/aw_main_delegate.cc [modify] https://crrev.com/26b06001aaac6a87a6d34576367c9531e404765d/base/threading/thread_local_storage.h [modify] https://crrev.com/26b06001aaac6a87a6d34576367c9531e404765d/components/services/heap_profiling/public/cpp/allocator_shim.cc [modify] https://crrev.com/26b06001aaac6a87a6d34576367c9531e404765d/components/services/heap_profiling/public/cpp/allocator_shim.h |
||
►
Sign in to add a comment |
||
Comment 1 by erikc...@chromium.org
, May 7 2018