• erikchen's avatar
    Hook up Heap Profiling Service to Android WebView. · 1da5042a
    erikchen authored
    This CL adds support for Heap Profiling via an out-of-process service to
    Android WebView. The architecture matches that of Chrome for Android and Desktop
    platforms.
    
    This is intended to help developers working on Android WebView trace down issues
    in the implementation of Android WebView.
    
    * This feature can only be enabled via command-line flags, set via adb.
    
    adb shell 'echo "_ --memlog=browser" > /data/local/tmp/webview-command-line'
    
    Other flags are also available, see
    src/docs/memory/debugging_memory_issues.md#taking-a-heap-dump
    
    * This CL only adds support for heap profiling the browser process.
    
    * When the feature is enabled:
      * The browser process starts the Heap Profiling Service in a sandboxed utility
        process.
      * The browser process begins profiling itself via the HeapProfilingClient
        interface.
      * Heap dumps are availabe via memory-infra traces from chrome://tracing.
    
    * Note: This feature requires the profiling service to be hosted in a separate
    process than the one being profiled. This means that it only works on Android
    O+, and N when multi-process WebView is enabled.
    
    Bug: 827545
    Change-Id: I96d4b42945ea81bae5b32bdea802fd788d963b8d
    Reviewed-on: https://chromium-review.googlesource.com/999993Reviewed-by: default avatarRichard Coles <torne@chromium.org>
    Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#549224}
    1da5042a
BUILD.gn 17.3 KB