Lines Matching refs:out
322 void StatsService::dumpStatsdStats(int out, bool verbose, bool proto) { in dumpStatsdStats() argument
327 dprintf(out, "%c", data[i]); in dumpStatsdStats()
330 StatsdStats::getInstance().dumpStats(out); in dumpStatsdStats()
331 mProcessor->dumpStates(out, verbose); in dumpStatsdStats()
338 void StatsService::dumpIncidentSection(int out) { in dumpIncidentSection() argument
350 proto.flush(out); in dumpIncidentSection()
358 status_t StatsService::handleShellCommand(int in, int out, int err, const char** argv, in handleShellCommand() argument
374 return cmd_config(in, out, err, utf8Args); in handleShellCommand()
378 return cmd_print_uid_map(out, utf8Args); in handleShellCommand()
382 return cmd_dump_report(out, utf8Args); in handleShellCommand()
386 return cmd_print_pulled_metrics(out, utf8Args); in handleShellCommand()
390 return cmd_trigger_broadcast(out, utf8Args); in handleShellCommand()
394 return cmd_print_stats(out, utf8Args); in handleShellCommand()
398 return cmd_dump_memory_info(out); in handleShellCommand()
402 return cmd_write_data_to_disk(out); in handleShellCommand()
406 return cmd_log_app_breadcrumb(out, utf8Args); in handleShellCommand()
410 return cmd_log_binary_push(out, utf8Args); in handleShellCommand()
414 return cmd_clear_puller_cache(out); in handleShellCommand()
418 return cmd_print_logs(out, utf8Args); in handleShellCommand()
422 return cmd_trigger_active_config_broadcast(out, utf8Args); in handleShellCommand()
431 mShellSubscriber->startNewSubscription(in, out, timeoutSec); in handleShellCommand()
436 print_cmd_help(out); in handleShellCommand()
440 void StatsService::print_cmd_help(int out) { in print_cmd_help() argument
441 dprintf(out, in print_cmd_help()
444 dprintf(out, "\n"); in print_cmd_help()
445 dprintf(out, "\n"); in print_cmd_help()
446 dprintf(out, "usage: adb shell cmd stats meminfo\n"); in print_cmd_help()
447 dprintf(out, "\n"); in print_cmd_help()
448 dprintf(out, " Prints the malloc debug information. You need to run the following first: \n"); in print_cmd_help()
449 dprintf(out, " # adb shell stop\n"); in print_cmd_help()
450 dprintf(out, " # adb shell setprop libc.debug.malloc.program statsd \n"); in print_cmd_help()
451 dprintf(out, " # adb shell setprop libc.debug.malloc.options backtrace \n"); in print_cmd_help()
452 dprintf(out, " # adb shell start\n"); in print_cmd_help()
453 dprintf(out, "\n"); in print_cmd_help()
454 dprintf(out, "\n"); in print_cmd_help()
455 dprintf(out, "usage: adb shell cmd stats print-uid-map [PKG]\n"); in print_cmd_help()
456 dprintf(out, "usage: adb shell cmd stats print-uid-map --with_certificate_hash\n"); in print_cmd_help()
457 dprintf(out, "\n"); in print_cmd_help()
458 dprintf(out, " Prints the UID, app name, version mapping.\n"); in print_cmd_help()
459 dprintf(out, in print_cmd_help()
462 dprintf(out, " --with_certificate_hash Print package certificate hash in hex\n"); in print_cmd_help()
463 dprintf(out, "\n"); in print_cmd_help()
464 dprintf(out, "\n"); in print_cmd_help()
465 dprintf(out, "usage: adb shell cmd stats pull-source ATOM_TAG [PACKAGE] \n"); in print_cmd_help()
466 dprintf(out, "\n"); in print_cmd_help()
467 dprintf(out, " Prints the output of a pulled atom\n"); in print_cmd_help()
468 dprintf(out, " UID The atom to pull\n"); in print_cmd_help()
469 dprintf(out, " PACKAGE The package to pull from. Default is AID_SYSTEM\n"); in print_cmd_help()
470 dprintf(out, "\n"); in print_cmd_help()
471 dprintf(out, "\n"); in print_cmd_help()
472 dprintf(out, "usage: adb shell cmd stats write-to-disk \n"); in print_cmd_help()
473 dprintf(out, "\n"); in print_cmd_help()
474 dprintf(out, " Flushes all data on memory to disk.\n"); in print_cmd_help()
475 dprintf(out, "\n"); in print_cmd_help()
476 dprintf(out, "\n"); in print_cmd_help()
477 dprintf(out, "usage: adb shell cmd stats log-app-breadcrumb [UID] LABEL STATE\n"); in print_cmd_help()
478 dprintf(out, " Writes an AppBreadcrumbReported event to the statslog buffer.\n"); in print_cmd_help()
479 dprintf(out, " UID The uid to use. It is only possible to pass a UID\n"); in print_cmd_help()
480 dprintf(out, " parameter on eng builds. If UID is omitted the calling\n"); in print_cmd_help()
481 dprintf(out, " uid is used.\n"); in print_cmd_help()
482 dprintf(out, " LABEL Integer in [0, 15], as per atoms.proto.\n"); in print_cmd_help()
483 dprintf(out, " STATE Integer in [0, 3], as per atoms.proto.\n"); in print_cmd_help()
484 dprintf(out, "\n"); in print_cmd_help()
485 dprintf(out, "\n"); in print_cmd_help()
486 dprintf(out, in print_cmd_help()
489 dprintf(out, " Log a binary push state changed event.\n"); in print_cmd_help()
490 dprintf(out, " NAME The train name.\n"); in print_cmd_help()
491 dprintf(out, " VERSION The train version code.\n"); in print_cmd_help()
492 dprintf(out, " STAGING If this train requires a restart.\n"); in print_cmd_help()
493 dprintf(out, " ROLLBACK_ENABLED If rollback should be enabled for this install.\n"); in print_cmd_help()
494 dprintf(out, " LOW_LATENCY If the train requires low latency monitoring.\n"); in print_cmd_help()
495 dprintf(out, " STATE The status of the train push.\n"); in print_cmd_help()
496 dprintf(out, " Integer value of the enum in atoms.proto.\n"); in print_cmd_help()
497 dprintf(out, " EXPERIMENT_IDS Comma separated list of experiment ids.\n"); in print_cmd_help()
498 dprintf(out, " Leave blank for none.\n"); in print_cmd_help()
499 dprintf(out, "\n"); in print_cmd_help()
500 dprintf(out, "\n"); in print_cmd_help()
501 dprintf(out, "usage: adb shell cmd stats config remove [UID] [NAME]\n"); in print_cmd_help()
502 dprintf(out, "usage: adb shell cmd stats config update [UID] NAME\n"); in print_cmd_help()
503 dprintf(out, "\n"); in print_cmd_help()
504 dprintf(out, " Adds, updates or removes a configuration. The proto should be in\n"); in print_cmd_help()
505 dprintf(out, " wire-encoded protobuf format and passed via stdin. If no UID and name is\n"); in print_cmd_help()
506 dprintf(out, " provided, then all configs will be removed from memory and disk.\n"); in print_cmd_help()
507 dprintf(out, "\n"); in print_cmd_help()
508 dprintf(out, " UID The uid to use. It is only possible to pass the UID\n"); in print_cmd_help()
509 dprintf(out, " parameter on eng builds. If UID is omitted the calling\n"); in print_cmd_help()
510 dprintf(out, " uid is used.\n"); in print_cmd_help()
511 dprintf(out, " NAME The per-uid name to use\n"); in print_cmd_help()
512 dprintf(out, "\n"); in print_cmd_help()
513 dprintf(out, "\n *Note: If both UID and NAME are omitted then all configs will\n"); in print_cmd_help()
514 dprintf(out, "\n be removed from memory and disk!\n"); in print_cmd_help()
515 dprintf(out, "\n"); in print_cmd_help()
516 dprintf(out, in print_cmd_help()
519 dprintf(out, " Dump all metric data for a configuration.\n"); in print_cmd_help()
520 dprintf(out, " UID The uid of the configuration. It is only possible to pass\n"); in print_cmd_help()
521 dprintf(out, " the UID parameter on eng builds. If UID is omitted the\n"); in print_cmd_help()
522 dprintf(out, " calling uid is used.\n"); in print_cmd_help()
523 dprintf(out, " NAME The name of the configuration\n"); in print_cmd_help()
524 dprintf(out, " --keep_data Do NOT erase the data upon dumping it.\n"); in print_cmd_help()
525 dprintf(out, " --proto Print proto binary.\n"); in print_cmd_help()
526 dprintf(out, "\n"); in print_cmd_help()
527 dprintf(out, "\n"); in print_cmd_help()
528 dprintf(out, "usage: adb shell cmd stats send-broadcast [UID] NAME\n"); in print_cmd_help()
529 dprintf(out, " Send a broadcast that triggers the subscriber to fetch metrics.\n"); in print_cmd_help()
530 dprintf(out, " UID The uid of the configuration. It is only possible to pass\n"); in print_cmd_help()
531 dprintf(out, " the UID parameter on eng builds. If UID is omitted the\n"); in print_cmd_help()
532 dprintf(out, " calling uid is used.\n"); in print_cmd_help()
533 dprintf(out, " NAME The name of the configuration\n"); in print_cmd_help()
534 dprintf(out, "\n"); in print_cmd_help()
535 dprintf(out, "\n"); in print_cmd_help()
536 dprintf(out, in print_cmd_help()
539 dprintf(out, " Send a broadcast that informs the subscriber of the current active configs.\n"); in print_cmd_help()
540 dprintf(out, " --uid=UID The uid of the configurations. It is only possible to pass\n"); in print_cmd_help()
541 dprintf(out, " the UID parameter on eng builds. If UID is omitted the\n"); in print_cmd_help()
542 dprintf(out, " calling uid is used.\n"); in print_cmd_help()
543 dprintf(out, " --configs Send the list of configs in the name list instead of\n"); in print_cmd_help()
544 dprintf(out, " the currently active configs\n"); in print_cmd_help()
545 dprintf(out, " NAME LIST List of configuration names to be included in the broadcast.\n"); in print_cmd_help()
546 dprintf(out, "\n"); in print_cmd_help()
547 dprintf(out, "\n"); in print_cmd_help()
548 dprintf(out, "usage: adb shell cmd stats print-stats\n"); in print_cmd_help()
549 dprintf(out, " Prints some basic stats.\n"); in print_cmd_help()
550 dprintf(out, " --proto Print proto binary instead of string format.\n"); in print_cmd_help()
551 dprintf(out, "\n"); in print_cmd_help()
552 dprintf(out, "\n"); in print_cmd_help()
553 dprintf(out, "usage: adb shell cmd stats clear-puller-cache\n"); in print_cmd_help()
554 dprintf(out, " Clear cached puller data.\n"); in print_cmd_help()
555 dprintf(out, "\n"); in print_cmd_help()
556 dprintf(out, "usage: adb shell cmd stats print-logs\n"); in print_cmd_help()
557 dprintf(out, " Requires root privileges.\n"); in print_cmd_help()
558 dprintf(out, " Can be disabled by calling adb shell cmd stats print-logs 0\n"); in print_cmd_help()
561 status_t StatsService::cmd_trigger_broadcast(int out, Vector<String8>& args) { in cmd_trigger_broadcast() argument
574 dprintf(out, "Invalid UID. Note that the metrics can only be dumped for " in cmd_trigger_broadcast()
580 print_cmd_help(out); in cmd_trigger_broadcast()
598 status_t StatsService::cmd_trigger_active_config_broadcast(int out, Vector<String8>& args) { in cmd_trigger_active_config_broadcast() argument
612 dprintf(out, "Invalid UID. Note that the config can only be set for " in cmd_trigger_active_config_broadcast()
630 dprintf(out, "Error parsing config ID.\n"); in cmd_trigger_active_config_broadcast()
651 status_t StatsService::cmd_config(int in, int out, int err, Vector<String8>& args) { in cmd_config() argument
677 print_cmd_help(out); in cmd_config()
707 cmd_remove_all_configs(out); in cmd_config()
717 print_cmd_help(out); in cmd_config()
721 status_t StatsService::cmd_dump_report(int out, const Vector<String8>& args) { in cmd_dump_report() argument
750 dprintf(out, "Invalid UID. Note that the metrics can only be dumped for " in cmd_dump_report()
762 dprintf(out, "%c", data[i]); in cmd_dump_report()
765 dprintf(out, "Non-proto stats data dump not currently supported.\n"); in cmd_dump_report()
770 print_cmd_help(out); in cmd_dump_report()
774 dprintf(out, "Log processor does not exist...\n"); in cmd_dump_report()
779 status_t StatsService::cmd_print_stats(int out, const Vector<String8>& args) { in cmd_print_stats() argument
791 dprintf(out, "%c", data[i]); in cmd_print_stats()
797 dprintf(out, "Config %s uses %zu bytes\n", key.ToString().c_str(), in cmd_print_stats()
800 statsdStats.dumpStats(out); in cmd_print_stats()
805 status_t StatsService::cmd_print_uid_map(int out, const Vector<String8>& args) { in cmd_print_uid_map() argument
808 mUidMap->printUidMap(out, /* includeCertificateHash */ true); in cmd_print_uid_map()
813 dprintf(out, "%s -> [ ", pkg.c_str()); in cmd_print_uid_map()
815 dprintf(out, "%d ", uid); in cmd_print_uid_map()
817 dprintf(out, "]\n"); in cmd_print_uid_map()
820 mUidMap->printUidMap(out, /* includeCertificateHash */ false); in cmd_print_uid_map()
825 status_t StatsService::cmd_write_data_to_disk(int out) { in cmd_write_data_to_disk() argument
826 dprintf(out, "Writing data to disk\n"); in cmd_write_data_to_disk()
832 status_t StatsService::cmd_log_app_breadcrumb(int out, const Vector<String8>& args) { in cmd_log_app_breadcrumb() argument
847 dprintf(out, in cmd_log_app_breadcrumb()
855 dprintf(out, "Logging AppBreadcrumbReported(%d, %d, %d) to statslog.\n", uid, label, state); in cmd_log_app_breadcrumb()
858 print_cmd_help(out); in cmd_log_app_breadcrumb()
864 status_t StatsService::cmd_log_binary_push(int out, const Vector<String8>& args) { in cmd_log_binary_push() argument
868 dprintf(out, "Incorrect number of argument supplied\n"); in cmd_log_binary_push()
882 dprintf(out, "Logging BinaryPushStateChanged\n"); in cmd_log_binary_push()
891 status_t StatsService::cmd_print_pulled_metrics(int out, const Vector<String8>& args) { in cmd_print_pulled_metrics() argument
909 dprintf(out, "Pull from %d: %s\n", s, it->ToString().c_str()); in cmd_print_pulled_metrics()
911 dprintf(out, "Pull from %d: Received %zu elements\n", s, stats.size()); in cmd_print_pulled_metrics()
917 status_t StatsService::cmd_remove_all_configs(int out) { in cmd_remove_all_configs() argument
918 dprintf(out, "Removing all configs...\n"); in cmd_remove_all_configs()
925 status_t StatsService::cmd_dump_memory_info(int out) { in cmd_dump_memory_info() argument
926 dprintf(out, "meminfo not available.\n"); in cmd_dump_memory_info()
930 status_t StatsService::cmd_clear_puller_cache(int out) { in cmd_clear_puller_cache() argument
935 dprintf(out, "Puller removed %d cached data!\n", cleared); in cmd_clear_puller_cache()
942 status_t StatsService::cmd_print_logs(int out, const Vector<String8>& args) { in cmd_print_logs() argument