summaryrefslogtreecommitdiff
path: root/packages/PrintSpooler/src
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2018-01-10 13:15:40 -0800
committerDianne Hackborn <hackbod@google.com>2018-01-26 15:15:04 -0800
commite17b445b6c813f6f9bc93a5e3811128a197ef50b (patch)
tree38b022068c50b29069bfa51626697e36d69ba6f8 /packages/PrintSpooler/src
parent6521393583be1d361e7fbf7d69184cfa30cb037c (diff)
Reduce pss collection amount, improve logging.
Tuned rates that we collect PSS, to reduce how much we do that heavy operation. Added a new way to determine whether a process has changed to a state for the "first" time -- now this is when it has gone to that state for the first time since it was in a lower state. This will reduce the amount of time we consider a process to be first to only when it has previously gone into a higher state than it had before. Keep track of more fine-grained information about why we collect a PSS sample (not just internal, but for a single process, all processes because of a mem state change, all processes because of a poll). Started collecting RSS in various places, so we can start looking at that w.r.t. PSS and see about transitioning to it is a new primary metric. Added logging for many of the places where the system writes its configuration files, so we can more easily see any bad behavior going on in those areas. Added some currently disabled code to read smaps directly instead of using fgets(). Probably won't help, but want tot test. Bug: 70859548 Test: atest CtsAppTestCases Change-Id: I400dba0f3ae9c024df51c946cfa592561028b598
Diffstat (limited to 'packages/PrintSpooler/src')
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java2
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java
index 6c7441802d63..f6a259dbf982 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java
@@ -889,7 +889,7 @@ public final class PrintSpoolerService extends Service {
private PersistenceManager() {
mStatePersistFile = new AtomicFile(new File(getFilesDir(),
- PERSIST_FILE_NAME));
+ PERSIST_FILE_NAME), "print-spooler");
}
public void writeStateLocked() {
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
index 793544082af9..5be0176cf4cc 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
@@ -547,7 +547,7 @@ public final class FusedPrintersProvider extends Loader<List<PrinterInfo>>
private PersistenceManager(final Activity activity, final int internalLoaderId) {
mStatePersistFile = new AtomicFile(new File(activity.getFilesDir(),
- PERSIST_FILE_NAME));
+ PERSIST_FILE_NAME), "printer-history");
// Initialize enabled services to make sure they are set are the read task might be done
// before the loader updated the services the first time.