daa0d5c9296515fe05cae65926a66dee609f382a |
|
07-Nov-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #11223338: Not retaining service started state while restarting When I cleaned up how we maintained the lifecycle of the tracker with a service, I broke most tracking of the service restart state. (Since at that point the service is no longer associated with a process, so I must clean up the tracker state). This change introduces a new special case for interacting with a service tracker to explicitly tell it when a service is being restarted. It also fixes how we update the process state when services are attached to it, so it goes in and out of the restarting state correctly. In addition: - Maybe fix issue #11224000 (APR: Dependent processes not getting added to LRU list). We were not clearing ServiceRecord.app when bringing down a service, so if for some reason there were still connections to it at that point (which could happen for example for non-create bindings), then we would so it when updating the LRU state of that client process. - dumpsys procstats's package argument can now be a package or process name, and we will dump all relevent information we can find about that name. - Generally improved the quality of the dumpsys procstats output with its various options. - Fixed a bug in ActivityManager.dumpPackageState() where it would hang if the service was dumping too much, added meminfo to the set of things dumped, and tweaked command line options to include more data. - Added some more cleaning code to ActiveServices.killServices() to make sure we clean out any restarting ServiceRecord entries when a process is being force stopped. - Re-arranged ActiveServices.killServices() to do the main killing of the service first, to avoid some wtf() calls that could happen when removing connections. Bug: 11223338 Bug: 11224000 Change-Id: I5db28561c2c78aa43561e52256ff92c02311c56f
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
237cefbcee8721e3268ba778297a0ad48e67f079 |
|
23-Oct-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #11323037: Android apk incorrectly marked as running in app processes The android package is now a special case, not being added to the package list when creating a multi-process component. There is no need, since this package is actually the framework itself which must be loaded in every process. Also cleaned up some of the procstats dump output to help see what is going on here. Change-Id: If65d35ecd562f3154bdebfded69c454af6ce8c96
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
59da67900d85fd2c246996bce08109a0ba49a282 |
|
11-Oct-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #11175600: Proc stats is aggregating stats in the wrong direction Change-Id: I7f06fbde8f52296cb2932003b4da77b2c68a6011
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
08b36a47cf3ca9f58683aa906b9fdf7778fb6840 |
|
09-Oct-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #11087316: Can't run dumpsys procstats on user builds in some cases! Once we pass the dump perm check, we are safe. Change-Id: I58f483573874ca9f8f914fb94137f8a2afafaf25
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
d94d533b5a9ec44899a4bc0e09796a5ec82a250e |
|
04-Oct-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #11069176: Crash showing process stats Change-Id: Ie568ebcb9863bed95c775b9b28654a5e2dc464cd
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
164371fb759bad6854570af0fca60d9a01e17235 |
|
02-Oct-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #11005453: [SUW] G+ profile creation for new user broken The main problem here was a mistake when turning a single process structure to a multi-package-process structure with a common process. When we cloned the original process state, if there were any services already created for the process for that package, they would be left with their process pointer still referencing the original now common process instead of the package-specific process, allowing the active counts to get bad. Now we switch any of those processes over to the new package-specific process. There was also another smaller issue with how ServiceRecord is associated with a ServiceState -- we could be waiting for an old ServiceRecord to be destroyed while at the same time creating a new ServiceRecord for that same service class. These would share the same ServiceState, so when the old record finally finished destroying itself it would trample over whatever the new service is doing. This is fixed by changing the model to instead of using an "active" reference count, we have an object identifying the current owner of the ServiceState. Then when the old ServiceRecord is cleaning up, we know if it is still the owner at that point. Also some other small things along the way -- new Log.wtfStack() method that is convenient, new suite of Slog.wtf methods, fixed some services to use Slog.wtf when catching exceptions being returned to the caller so that we actually know about them. Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
cb4285537b1bf67b5a248e509d5fe41a6f49282e |
|
26-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #10948509: Crash in procstats when there is no data Not dealing with the case where there is a null list. Also fixed some bugs I found while looking at this: - When resetting the stats, we would use a newly computed time stamp for the total durations rather than the one we used to reset the proc/service entries. This would result in them being able to be slightly > 100%. - There was a bug in how we split a single process state into its per-package representation, where we would but the cloned process state into the new package's entry (instead of properly for its own package entry), to be immediately overwritten by the new process state we make for that package. This could result in bad data for processes that have multiple packages. - There was a bug in resetting service stats, where we wouldn't update the overall run timestamp, allowing that time to sometimes be > 100%. - There was a bug in computing pss data for processes with multiple packages, where the pss data was not distributed across all of the activity per-package process states. - There was a bug in computing the zram information that would cause it to compute the wrong value, and then never be displayed. Finally a little code refactoring so that ProcessState and ServiceState can now share a common implementation for the table of duration values. Change-Id: I5e0f4e9107829b81f395dad9419c33257b4f8902
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
6d9ef38b0603133ee1a9c7bd63f1d971ae1d62ad |
|
23-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Implement issue #10895990: Better durations for proc stats Reduce the batching down to 3 hours, so that we can show shorter durations in the UI. Change-Id: I46af674b0024b828595ed3cdad2b47fe47d71ed8
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
53459a7020dbcd036e2d3418e35ebb96fadc29e3 |
|
18-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Maybe fix issue #10797796: IllegalStateException in ProcessState... ...caused runtime restart There were some situations where the package list could be set with process stats when it shouldn't. Not sure if this is causing the problem, since there is no repro. Also some improvements to debug output -- new commands to clear all stats, print full details of stats, and print a one-day summary (which should match what the UI shows). Change-Id: I9581db4059d7bb094f79f2fe06c1ccff3e1a4e74
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
0d97cd1f6a370b8e371d8b6d88d47e9aaf2bbe32 |
|
17-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #10779747: Calendar Storage crash observed... ...while setting up a new user from settings. The delayed service start stuff was too aggressive -- it would allow a process to be killed between the an onReceive() that calls startService() and that service being started. This means that apps that set up global state that they expect to remain set up during that time could be lost. This is the first part of a fix, which tightens up when we allow services to be delayed. Now we will immediately start the service as long as it currently as a process running that is not in the cached state. (Previously we would delay if the process was in the receiver state.) This unfortunately means that our service start delay is much less effective. To address that, there will be a follow-on change to tie broadcast delivery into this to see if we can delay the finish of a broadcast as long as there are background services starting in that process. Change-Id: I2bba2295d10699ee3479375bbe87114b2cbb0826
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
50ef0b62f076c509d5edaef5588080d685f063e8 |
|
17-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Work on issue #10771346: runtime restart Haven't found the underlying cause, but this will give us more information when we get into the bad state. Change-Id: I9aebd3a025a7c0d931f43098461b64ee3c220746
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
be4c1d74a758f40de25e796a991ccfd1fe356857 |
|
09-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #10671878: Proc stats needs to remove old data structures We now keep track of which process and service states are actively in use, and remove any that are not in use during a commit. The activity manager needed to be tweaked to report this data, and ensure it does not try to operate on one of these structures when not in use. Also some other fixes: - We now keep track of process names associated with services, for display in the UI. - Keep track of total run time for each service, also for UI. - The parceled format is more efficient, not storing duplicates of process/package names, and writing times as ints when possible. - Reduced commit period from 1 day to 12 hours, so that our UI can be a little closer at its attempt to display the stats over 1 day. Change-Id: Ifeda0ffe963a7b49d8eb2a3f6923f3a5e71a4e43
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
d6d54a469476f7756b1ce64d10688ec43857ce5a |
|
06-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix to show correct duration. Change-Id: I1032d90d5b7bf39006b20f3374104421dcc53305
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
ae36b236d2b8d040f142bee169742da2f392efaa |
|
04-Sep-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #10427108: Google+ has long running process There was a bug in counting the number of starting services in a process that would cause it to count too many (it would increment at any state change while the service is started, not just when starting/stopping). Also reduce dumpsys output -- only print summaries for old data. There is probably no utility in printing the long details of all that data. Change-Id: I1c1e901b0214c01eb7d071f23166fc6f3702ca67
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
69cb00b8dda60eff7449b69723f4e73a28e944f8 |
|
10-Aug-2013 |
Dianne Hackborn <hackbod@google.com> |
More stuff I need for the proc stats UI. Change-Id: I5f05b79bc4d5766a80f2db9d20ba8078b60c1b00
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
60444fd594ac92aa48e229c600c2ce7de4caf2d1 |
|
09-Aug-2013 |
Dianne Hackborn <hackbod@google.com> |
Add method for adding two ProcessStats objects together. Also move file reading code over to ProcessStats. Change-Id: Ib42272b90a408a494044965e98beed16c0b3f8a5
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
8a0de58ece89c467c8e7415097d193e5f8db9db8 |
|
08-Aug-2013 |
Dianne Hackborn <hackbod@google.com> |
Get ProcessStats callable from other processes. Also fix a bug where, when parceling the stats, we were computing the final duration values too late. We need to do that before we write the long table. Change-Id: Idb6c1ed95417448c56973fe5866bfb3570e525f4
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
23fb6e84182f325f036b1735b817ecc253e2bd19 |
|
07-Aug-2013 |
Dianne Hackborn <hackbod@google.com> |
Start adding IPC calls to retrieve proc stat data. Also fix a bug where we were not correctly unparcelling service duration data. Change-Id: Ie9113b2e3a747622441b1939ffc45edb5803a10f
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|
d2932243e3313b59e7538641731aa98852bc5ac7 |
|
06-Aug-2013 |
Dianne Hackborn <hackbod@google.com> |
Refactor ProcessStats, ProcessTracker. ProcessStats is now called ProcessCpuTracker. ProcessTracker is now ProcessStatsService, and its inner State class is broken out into a separate top-level ProcessStats class. This ProcessStats is moved to the framework, so we will be able to use it elsewhere. Change-Id: I6a127bcb835b6b474b72647c0b99b82c2137e5c5
/frameworks/base/services/java/com/android/server/am/ProcessStatsService.java
|