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

Commit fcc3ccb9 authored by Bob Lee's avatar Bob Lee
Browse files

Added tool to generate application-specific reports from class load profiling...

Added tool to generate application-specific reports from class load profiling data. Generated new profiling data. Deleted old data. Generated new preloaded-classes file.
parent b06c9a8c
Loading
Loading
Loading
Loading
+1186 −427

File changed.

Preview size limit exceeded, changes collapsed.

tools/preload/20080522.compiled

deleted100644 → 0
−10.9 MiB

File deleted.

+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ LOCAL_SRC_FILES := \
	MemoryUsage.java \
	Operation.java \
	Policy.java \
	PrintBugReports.java \
	PrintCsv.java \
	PrintHtmlDiff.java \
	PrintPsTree.java \
+29 −1
Original line number Diff line number Diff line
@@ -15,7 +15,11 @@
 */

import java.io.Serializable;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * A loaded class.
@@ -50,6 +54,30 @@ class LoadedClass implements Serializable, Comparable<LoadedClass> {
        this.systemClass = systemClass;
    }

    /**
     * Returns true if this class was loaded by more than one proc.
     */
    boolean isSharable() {
        Set<String> procNames = new HashSet<String>();
        for (Operation load : loads) {
            if (load.process.fromZygote()) {
                procNames.add(load.process.name);
                if (procNames.size() > 1) {
                    return true;
                }
            }
        }
        for (Operation init : initializations) {
            if (init.process.fromZygote()) {
                procNames.add(init.process.name);
                if (procNames.size() > 1) {
                    return true;
                }
            }
        }
        return false;
    }

    void measureMemoryUsage() {
        this.memoryUsage = MemoryUsage.forClass(name);
    }
Loading