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

Commit f6c89350 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6461449 from a2fad15a to rvc-release

Change-Id: Ib5be0d81c524a6def1915da6e07befda8eac56e9
parents 3d34748b a2fad15a
Loading
Loading
Loading
Loading
+27 −10
Original line number Diff line number Diff line
@@ -318,6 +318,16 @@ static const char* kJitZygoteImage =
// Phenotype property name for enabling profiling the boot class path.
static const char* PROFILE_BOOT_CLASS_PATH = "profilebootclasspath";

static bool IsBootClassPathProfilingEnable() {
    std::string profile_boot_class_path = GetProperty("dalvik.vm.profilebootclasspath", "");
    profile_boot_class_path =
        server_configurable_flags::GetServerConfigurableFlag(
            RUNTIME_NATIVE_BOOT_NAMESPACE,
            PROFILE_BOOT_CLASS_PATH,
            /*default_value=*/ profile_boot_class_path);
    return profile_boot_class_path == "true";
}

class RunDex2Oat : public ExecVHelper {
  public:
    RunDex2Oat(int zip_fd,
@@ -450,14 +460,7 @@ class RunDex2Oat : public ExecVHelper {
                                                                 ENABLE_JITZYGOTE_IMAGE,
                                                                 /*default_value=*/ "");

        std::string profile_boot_class_path = GetProperty("dalvik.vm.profilebootclasspath", "");
        profile_boot_class_path =
            server_configurable_flags::GetServerConfigurableFlag(
                RUNTIME_NATIVE_BOOT_NAMESPACE,
                PROFILE_BOOT_CLASS_PATH,
                /*default_value=*/ profile_boot_class_path);

        if (use_jitzygote_image == "true" || profile_boot_class_path == "true") {
        if (use_jitzygote_image == "true" || IsBootClassPathProfilingEnable()) {
          boot_image = StringPrintf("--boot-image=%s", kJitZygoteImage);
        } else {
          boot_image = MapPropertyToArg("dalvik.vm.boot-image", "--boot-image=%s");
@@ -896,7 +899,15 @@ static bool analyze_profiles(uid_t uid, const std::string& package_name,
    }

    RunProfman profman_merge;
    profman_merge.SetupMerge(profiles_fd, reference_profile_fd);
    const std::vector<unique_fd>& apk_fds = std::vector<unique_fd>();
    const std::vector<std::string>& dex_locations = std::vector<std::string>();
    profman_merge.SetupMerge(
            profiles_fd,
            reference_profile_fd,
            apk_fds,
            dex_locations,
            /* for_snapshot= */ false,
            IsBootClassPathProfilingEnable());
    pid_t pid = fork();
    if (pid == 0) {
        /* child -- drop privileges before continuing */
@@ -2810,7 +2821,13 @@ static bool create_app_profile_snapshot(int32_t app_id,
    }

    RunProfman args;
    args.SetupMerge(profiles_fd, snapshot_fd, apk_fds, dex_locations, /*for_snapshot=*/true);
    // This is specifically a snapshot for an app, so don't use boot image profiles.
    args.SetupMerge(profiles_fd,
            snapshot_fd,
            apk_fds,
            dex_locations,
            /* for_snapshot= */ true,
            /* for_boot_image= */ false);
    pid_t pid = fork();
    if (pid == 0) {
        /* child -- drop privileges before continuing */
+32 −7
Original line number Diff line number Diff line
@@ -1532,17 +1532,33 @@ LayerDebugInfo Layer::getLayerDebugInfo() const {
void Layer::miniDumpHeader(std::string& result) {
    result.append("-------------------------------");
    result.append("-------------------------------");
    result.append("-----------------------------\n");
    result.append("-------------------------------");
    result.append("-------------------------------");
    result.append("---------\n");
    result.append(" Layer name\n");
    result.append("           Z | ");
    result.append(" Window Type | ");
    result.append(" Comp Type | ");
    result.append(" Transform | ");
    result.append("  Disp Frame (LTRB) | ");
    result.append("         Source Crop (LTRB)\n");
    result.append("         Source Crop (LTRB) | ");
    result.append("    Frame Rate (Explicit)\n");
    result.append("-------------------------------");
    result.append("-------------------------------");
    result.append("-------------------------------");
    result.append("-----------------------------\n");
    result.append("-------------------------------");
    result.append("---------\n");
}

std::string Layer::frameRateCompatibilityString(Layer::FrameRateCompatibility compatibility) {
    switch (compatibility) {
        case FrameRateCompatibility::Default:
            return "Default";
        case FrameRateCompatibility::ExactOrMultiple:
            return "ExactOrMultiple";
        case FrameRateCompatibility::NoVote:
            return "NoVote";
    }
}

void Layer::miniDump(std::string& result, const sp<DisplayDevice>& displayDevice) const {
@@ -1578,12 +1594,21 @@ void Layer::miniDump(std::string& result, const sp<DisplayDevice>& displayDevice
    const Rect& frame = outputLayerState.displayFrame;
    StringAppendF(&result, "%4d %4d %4d %4d | ", frame.left, frame.top, frame.right, frame.bottom);
    const FloatRect& crop = outputLayerState.sourceCrop;
    StringAppendF(&result, "%6.1f %6.1f %6.1f %6.1f\n", crop.left, crop.top, crop.right,
    StringAppendF(&result, "%6.1f %6.1f %6.1f %6.1f | ", crop.left, crop.top, crop.right,
                  crop.bottom);
    if (layerState.frameRate.rate != 0 ||
        layerState.frameRate.type != FrameRateCompatibility::Default) {
        StringAppendF(&result, "% 6.2ffps %15s\n", layerState.frameRate.rate,
                      frameRateCompatibilityString(layerState.frameRate.type).c_str());
    } else {
        StringAppendF(&result, "\n");
    }

    result.append("- - - - - - - - - - - - - - - - ");
    result.append("- - - - - - - - - - - - - - - - ");
    result.append("- - - - - - - - - - - - - - -\n");
    result.append("- - - - - - - - - - - - - - - - ");
    result.append("- - - - - - - - - - - - - - - - ");
    result.append("- - -\n");
}

void Layer::dumpFrameStats(std::string& result) const {
+1 −0
Original line number Diff line number Diff line
@@ -819,6 +819,7 @@ public:

    bool setFrameRate(FrameRate frameRate);
    virtual FrameRate getFrameRateForLayerTree() const;
    static std::string frameRateCompatibilityString(FrameRateCompatibility compatibility);

protected:
    // constant