Skip to content

Commit 9d6d890

Browse files
committed
Reduce verbosity of service event logging.
Omits service name from destroyed events, since it can be derived by looking back to the created event with the same ServiceRecord. Change-Id: Ib7ab1031c0859437735e1fc985d58f47629b7ac4
1 parent 18f9518 commit 9d6d890

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

services/java/com/android/server/am/ActiveServices.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,11 +1090,8 @@ private final void realStartServiceLocked(ServiceRecord r,
10901090

10911091
boolean created = false;
10921092
try {
1093-
mAm.mStringBuilder.setLength(0);
1094-
r.intent.getIntent().toShortString(mAm.mStringBuilder, true, false, true, false);
1095-
EventLog.writeEvent(EventLogTags.AM_CREATE_SERVICE,
1096-
r.userId, System.identityHashCode(r), r.shortName,
1097-
mAm.mStringBuilder.toString(), r.app.pid);
1093+
EventLogTags.writeAmCreateService(
1094+
r.userId, System.identityHashCode(r), r.shortName, r.app.pid);
10981095
synchronized (r.stats.getBatteryStats()) {
10991096
r.stats.startLaunchedLocked();
11001097
}
@@ -1242,9 +1239,8 @@ private final void bringDownServiceLocked(ServiceRecord r, boolean force) {
12421239
}
12431240

12441241
if (DEBUG_SERVICE) Slog.v(TAG, "Bringing down " + r + " " + r.intent);
1245-
EventLog.writeEvent(EventLogTags.AM_DESTROY_SERVICE,
1246-
r.userId, System.identityHashCode(r), r.shortName,
1247-
(r.app != null) ? r.app.pid : -1);
1242+
EventLogTags.writeAmDestroyService(
1243+
r.userId, System.identityHashCode(r), (r.app != null) ? r.app.pid : -1);
12481244

12491245
mServiceMap.removeServiceByName(r.name, r.userId);
12501246
mServiceMap.removeServiceByIntent(r.intent, r.userId);

services/java/com/android/server/am/EventLogTags.logtags

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ option java_package com.android.server.am
6363
30024 am_broadcast_discard_filter (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(BroadcastFilter|1|5)
6464
30025 am_broadcast_discard_app (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(App|3)
6565
# A service is being created
66-
30030 am_create_service (User|1|5),(Service Record|1|5),(Name|3),(Intent|3),(PID|1|5)
66+
30030 am_create_service (User|1|5),(Service Record|1|5),(Name|3),(PID|1|5)
6767
# A service is being destroyed
68-
30031 am_destroy_service (User|1|5),(Service Record|1|5),(Name|3),(PID|1|5)
68+
30031 am_destroy_service (User|1|5),(Service Record|1|5),(PID|1|5)
6969
# A process has crashed too many times, it is being cleared
7070
30032 am_process_crashed_too_much (User|1|5),(Name|3),(PID|1|5)
7171
# An unknown process is trying to attach to the activity manager

0 commit comments

Comments
 (0)