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

Unified Diff: content/public/android/java/src/org/chromium/content/app/ChildProcessService.java

Issue 611393002: Rationalize and fix chromium android linker histogram recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
diff --git a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
index cd5e675721c825b4cae382a39b2360d4509b1a43..2df8d5cb56259138c5d83fa35e4bdc0ac06d9008 100644
--- a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
+++ b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
@@ -160,6 +160,7 @@ public class ChildProcessService extends Service {
android.os.Debug.waitForDebugger();
}
+ boolean loadAtFixedAddressFailed = false;
try {
LibraryLoader.loadNow(getApplicationContext(), false);
isLoaded = true;
@@ -167,6 +168,7 @@ public class ChildProcessService extends Service {
if (requestedSharedRelro) {
Log.w(TAG, "Failed to load native library with shared RELRO, " +
"retrying without");
+ loadAtFixedAddressFailed = true;
} else {
Log.e(TAG, "Failed to load native library", e);
}
@@ -201,7 +203,8 @@ public class ChildProcessService extends Service {
ContentMain.initApplicationContext(sContext.get().getApplicationContext());
nativeInitChildProcess(sContext.get().getApplicationContext(),
ChildProcessService.this, fileIds, fileFds,
- mCpuCount, mCpuFeatures);
+ mCpuCount, mCpuFeatures,
+ useLinker, loadAtFixedAddressFailed);
ContentMain.start();
nativeExitChildProcess();
} catch (InterruptedException e) {
@@ -342,10 +345,16 @@ public class ChildProcessService extends Service {
* @param fileIds A list of file IDs that should be registered for access by the renderer.
* @param fileFds A list of file descriptors that should be registered for access by the
* renderer.
+ * @param cpuCount Count of CPUs, from args bundle.
+ * @param cpuFeatures CPU features, from args bundle.
+ * @param useLinker True if the android chromium linker loaded this process.
rmcilroy 2014/10/01 12:14:42 usedChromiumLinker
simonb (inactive) 2014/10/02 15:15:30 Acknowledged. Removed entirely as part of rewrite
+ * @param loadAtFixedAddressFailed True if the android chromium linker was unable to load
+ * this process at a fixed address.
*/
private static native void nativeInitChildProcess(Context applicationContext,
ChildProcessService service, int[] extraFileIds, int[] extraFileFds,
- int cpuCount, long cpuFeatures);
+ int cpuCount, long cpuFeatures,
+ boolean useLinker, boolean loadAtFixedAddressFailed);
/**
* Force the child process to exit.

Powered by Google App Engine
This is Rietveld 408576698