forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebLayer] Add RELRO sharing for renderers not forking from webview_z…
…ygote While investigating WebLayer perf, I noticed a significant memory difference in renderer processes from WebLayer vs Chrome on Android Go. It turns out Android Go doesn't use the WebView zygote and WebView runs in single process mode, which means there was no code handling RELRO sharing for renderers in this case. This situation will also apply to low end devices running Trichrome/Standalone WebView in N+ where we use the WebView provider for renderer processes, so this change adds support for those as well. Pinpoint run on Android Go: https://pinpoint-dot-chromeperf.appspot.com/job/17aab8fad20000 renderer private_dirty_size: -31.1% renderer private_footprint_size: -15.3% Bug: 1146438 Change-Id: Ic2ec1b282e84fe2643940b56d41ea6e0f21cadcb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2654726 Reviewed-by: Richard Coles <[email protected]> Reviewed-by: Yaron Friedman <[email protected]> Commit-Queue: Clark DuVall <[email protected]> Cr-Commit-Position: refs/heads/master@{#848715}
- Loading branch information
1 parent
b0d5697
commit d685493
Showing
18 changed files
with
69 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
android_webview/glue/java/src/com/android/webview/chromium/MonochromeLibraryPreloader.java
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
android_webview/glue/java/src/com/android/webview/chromium/WebViewLibraryPreloader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package com.android.webview.chromium; | ||
|
||
import android.webkit.WebViewFactory; | ||
|
||
import org.chromium.base.library_loader.NativeLibraryPreloader; | ||
|
||
/** | ||
* The library preloader for Monochrome and Trichrome for sharing native library's relro | ||
* between Chrome and WebView/WebLayer. | ||
*/ | ||
public class WebViewLibraryPreloader extends NativeLibraryPreloader { | ||
@Override | ||
public int loadLibrary(String packageName) { | ||
return WebViewFactory.loadWebViewNativeLibraryFromPackage( | ||
packageName, getClass().getClassLoader()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters