diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-12-17 09:58:43 -0800 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-12-18 13:17:37 -0800 |
commit | ee3b838e13dc2140ac2051c1012d471effd0fd5f (patch) | |
tree | 719546e74db20cf649f4c814bcd8d06f1a3526fc /liblog | |
parent | 5d8742feb66b8dc8aee0c8ce4fc2f5617f3e7f8b (diff) | |
download | system_core-ee3b838e13dc2140ac2051c1012d471effd0fd5f.tar.gz system_core-ee3b838e13dc2140ac2051c1012d471effd0fd5f.tar.bz2 system_core-ee3b838e13dc2140ac2051c1012d471effd0fd5f.zip |
logd: statistics per-pid filter
Primarily gives access to the Chattiest TIDs and TAGs
associated with a pid.
Has a secondary effect of allowing us to pull out the
command line, comm and in some cases the associated
PACKAGE for a specific pid while the logs are still
present even if the executable is gone.
Bug: 26029733
Bug: 21615139
Change-Id: I1ea63165a680a9318360579b70b1512078ed5682
Diffstat (limited to 'liblog')
-rw-r--r-- | liblog/log_read.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/liblog/log_read.c b/liblog/log_read.c index eb44b2942..1aff272f7 100644 --- a/liblog/log_read.c +++ b/liblog/log_read.c @@ -501,6 +501,14 @@ ssize_t android_logger_get_statistics(struct logger_list *logger_list, remaining -= n; cp += n; } + + if (logger_list->pid) { + n = snprintf(cp, remaining, " pid=%u", logger_list->pid); + n = min(n, remaining); + remaining -= n; + cp += n; + } + return send_log_msg(NULL, NULL, buf, len); } |