Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ae20d3d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Pass -XX:PerfettoHprof=true to ART." into rvc-dev am: 082c8b68

Change-Id: I0e3d7d2664353de08a30d993c8c28e143eff5f33
parents 0c2eac1e 082c8b68
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -652,6 +652,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
    char dex2oatImageFlagsBuf[PROPERTY_VALUE_MAX];
    char extraOptsBuf[PROPERTY_VALUE_MAX];
    char voldDecryptBuf[PROPERTY_VALUE_MAX];
    char perfettoHprofOptBuf[sizeof("-XX:PerfettoHprof=") + PROPERTY_VALUE_MAX];
    enum {
      kEMDefault,
      kEMIntPortable,
@@ -766,6 +767,16 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
    addOption("-verbose:gc");
    //addOption("-verbose:class");

    // On Android, we always want to allow loading the PerfettoHprof plugin.
    // Even with this option set, we will still only actually load the plugin
    // if we are on a userdebug build or the app is debuggable or profileable.
    // This is enforced in art/runtime/runtime.cc.
    //
    // We want to be able to disable this, because this does not work on host,
    // and we do not want to enable it in tests.
    parseRuntimeOption("dalvik.vm.perfetto_hprof", perfettoHprofOptBuf, "-XX:PerfettoHprof=",
                       "true");

    if (primary_zygote) {
        addOption("-Xprimaryzygote");
    }