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

Commit c59411b1 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

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.
parent ee0511d7
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ int main(int argc, char* const argv[])

    const size_t N = services.size();

    if (N > 1) {
        // first print a list of the current services
        aout << "Currently running services:" << endl;
    
@@ -60,13 +61,16 @@ int main(int argc, char* const argv[])
                aout << "  " << services[i] << endl;
            }
        }
    }

    for (size_t i=0; i<N; i++) {
        sp<IBinder> service = sm->checkService(services[i]);
        if (service != NULL) {
            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)
+432 −369

File changed.

Preview size limit exceeded, changes collapsed.