summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-12-21 20:10:14 -0800
committerDianne Hackborn <hackbod@google.com>2009-12-21 20:20:59 -0800
commitc59411b17670ae9b5a6eb33e0fd62ca0e80d1578 (patch)
tree0c43e3a55cba905d2fe343773590646c470792d7 /cmds
parentee0511d76ce0ceae2f54782ca33e400e62d08137 (diff)
downloadframeworks_base-c59411b17670ae9b5a6eb33e0fd62ca0e80d1578.zip
frameworks_base-c59411b17670ae9b5a6eb33e0fd62ca0e80d1578.tar.gz
frameworks_base-c59411b17670ae9b5a6eb33e0fd62ca0e80d1578.tar.bz2
Rework activity manager debug dumps.
Change how we do debug dumps from the activity manager to make everything go through the activity manager interface (no more secondary interfaces), and use the command line arguments to control what gets dumped. The output from dumpsys without args still dumps everything. When just dumping the activity service, we now dump a subset of all of the am state that is interesting without being overwhelming. You can use "dumpsys activity -h" to get help with other things that can be dumped.
Diffstat (limited to 'cmds')
-rw-r--r--cmds/dumpsys/dumpsys.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/cmds/dumpsys/dumpsys.cpp b/cmds/dumpsys/dumpsys.cpp
index 945a690..fdc5d5d 100644
--- a/cmds/dumpsys/dumpsys.cpp
+++ b/cmds/dumpsys/dumpsys.cpp
@@ -51,22 +51,26 @@ int main(int argc, char* const argv[])
const size_t N = services.size();
- // first print a list of the current services
- aout << "Currently running services:" << endl;
-
- for (size_t i=0; i<N; i++) {
- sp<IBinder> service = sm->checkService(services[i]);
- if (service != NULL) {
- aout << " " << services[i] << endl;
+ if (N > 1) {
+ // first print a list of the current services
+ aout << "Currently running services:" << endl;
+
+ for (size_t i=0; i<N; i++) {
+ sp<IBinder> service = sm->checkService(services[i]);
+ if (service != NULL) {
+ aout << " " << services[i] << endl;
+ }
}
}
for (size_t i=0; i<N; i++) {
sp<IBinder> service = sm->checkService(services[i]);
if (service != NULL) {
- aout << "------------------------------------------------------------"
- "-------------------" << endl;
- aout << "DUMP OF SERVICE " << services[i] << ":" << endl;
+ if (N > 1) {
+ aout << "------------------------------------------------------------"
+ "-------------------" << endl;
+ aout << "DUMP OF SERVICE " << services[i] << ":" << endl;
+ }
int err = service->dump(STDOUT_FILENO, args);
if (err != 0) {
aerr << "Error dumping service info: (" << strerror(err)