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

Issue 2903733003: memory-infra: LOG(FATAL) on unsupported heap profiler configs (Closed)

Created:
3 years, 7 months ago by Primiano Tucci (use gerrit)
Modified:
3 years, 7 months ago
Reviewers:
erikchen, Wez
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

memory-infra: LOG(FATAL) on unsupported heap profiler configs Adds a fatal error when trying to use the heap profiler in a configuration where it cannot work (e.g., Win debug or component builds, or anything that doesn't have the shim) BUG=705461 Review-Url: https://codereview.chromium.org/2903733003 Cr-Commit-Position: refs/heads/master@{#474468} Committed: https://chromium.googlesource.com/chromium/src/+/59c3060ac761de2221eea6febe7be5d223f0266a

Patch Set 1 #

Patch Set 2 : unicode space, grr #

Patch Set 3 : unicode space, AGAIN #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -0 lines) Patch
M base/trace_event/memory_dump_manager.cc View 1 2 1 chunk +12 lines, -0 lines 2 comments Download

Messages

Total messages: 25 (18 generated)
Primiano Tucci (use gerrit)
3 years, 7 months ago (2017-05-24 16:36:56 UTC) #13
erikchen
lgtm
3 years, 7 months ago (2017-05-24 17:03:27 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2903733003/40001
3 years, 7 months ago (2017-05-24 21:24:07 UTC) #18
Wez
https://codereview.chromium.org/2903733003/diff/40001/base/trace_event/memory_dump_manager.cc File base/trace_event/memory_dump_manager.cc (right): https://codereview.chromium.org/2903733003/diff/40001/base/trace_event/memory_dump_manager.cc#newcode204 base/trace_event/memory_dump_manager.cc:204: #if !BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM) Do we ever actually set this under ...
3 years, 7 months ago (2017-05-24 21:29:25 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/59c3060ac761de2221eea6febe7be5d223f0266a
3 years, 7 months ago (2017-05-24 23:19:04 UTC) #23
Wez
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2902343002/ by wez@chromium.org. ...
3 years, 7 months ago (2017-05-25 00:49:17 UTC) #24
Primiano Tucci (use gerrit)
3 years, 7 months ago (2017-05-25 10:46:51 UTC) #25
Message was sent while issue was closed.
>  this disables heap-profiling on Windows, even in Static builds..
Can I ask you your gn args?
I just tried and this actually works as I intended on Windows.

Works for me with:
-----
is_component_build=false
is_debug=false
------

and fails with either
----
is_component_build=false
is_debug=true
----
is_component_build=true
is_debug=false
----

https://codereview.chromium.org/2903733003/diff/40001/base/trace_event/memory...
File base/trace_event/memory_dump_manager.cc (right):

https://codereview.chromium.org/2903733003/diff/40001/base/trace_event/memory...
base/trace_event/memory_dump_manager.cc:204: #if
!BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
On 2017/05/24 21:29:25, Wez wrote:
> Do we ever actually set this under Windows?  
I thought so: 

From build/config/allocator.gni:
if ((is_linux || is_android || is_mac ||(is_win && !is_component_build &&
!is_debug)) && !is_asan && !is_lsan && !is_tsan && !is_msan) {
  _default_use_experimental_allocator_shim = true

then  use_experimental_allocator_shim = _default_use_experimental_allocator_shim

then
in allocator_features.h
  "USE_EXPERIMENTAL_ALLOCATOR_SHIM=$use_experimental_allocator_shim",

The Windows shim code actually
> checks for defined(ALLOCATOR_SHIM) (see
>
https://cs.chromium.org/chromium/src/base/allocator/allocator_shim_win.cc?l=10),
> which I think depends on win_allocator_shim in GN.

That should be the old shim (Which I am going to kill soon), from the comment:

# The Windows-only allocator shim is only enabled for Release static builds, and
# is mutually exclusive with the generalized shim.
win_use_allocator_shim = is_win && !is_component_build && !is_debug &&
                         !use_experimental_allocator_shim && !is_asan

note the: "!use_experimental_allocator_shim"

Powered by Google App Engine
This is Rietveld 408576698