Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
8028c8cd
Commit
8028c8cd
authored
7 years ago
by
TreeHugger Robot
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Dump per uid Binder Proxy Count before ProxyMap assert"
parents
d11df1d7
58ac218a
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/java/android/os/Binder.java
+17
-0
17 additions, 0 deletions
core/java/android/os/Binder.java
with
17 additions
and
0 deletions
core/java/android/os/Binder.java
+
17
−
0
View file @
8028c8cd
...
...
@@ -21,7 +21,9 @@ import android.annotation.Nullable;
import
android.util.ExceptionUtils
;
import
android.util.Log
;
import
android.util.Slog
;
import
android.util.SparseIntArray
;
import
com.android.internal.os.BinderInternal
;
import
com.android.internal.util.FastPrintWriter
;
import
com.android.internal.util.FunctionalUtils.ThrowingRunnable
;
import
com.android.internal.util.FunctionalUtils.ThrowingSupplier
;
...
...
@@ -934,6 +936,7 @@ final class BinderProxy implements IBinder {
final
int
totalUnclearedSize
=
unclearedSize
();
if
(
totalUnclearedSize
>=
CRASH_AT_SIZE
)
{
dumpProxyInterfaceCounts
();
dumpPerUidProxyCounts
();
Runtime
.
getRuntime
().
gc
();
throw
new
AssertionError
(
"Binder ProxyMap has too many entries: "
+
totalSize
+
" (total), "
+
totalUnclearedSize
+
" (uncleared), "
...
...
@@ -987,6 +990,20 @@ final class BinderProxy implements IBinder {
}
}
/**
* Dump per uid binder proxy counts to the logcat.
*/
private
void
dumpPerUidProxyCounts
()
{
SparseIntArray
counts
=
BinderInternal
.
nGetBinderProxyPerUidCounts
();
if
(
counts
.
size
()
==
0
)
return
;
Log
.
d
(
Binder
.
TAG
,
"Per Uid Binder Proxy Counts:"
);
for
(
int
i
=
0
;
i
<
counts
.
size
();
i
++)
{
final
int
uid
=
counts
.
keyAt
(
i
);
final
int
binderCount
=
counts
.
valueAt
(
i
);
Log
.
d
(
Binder
.
TAG
,
"UID : "
+
uid
+
" count = "
+
binderCount
);
}
}
// Corresponding ArrayLists in the following two arrays always have the same size.
// They contain no empty entries. However WeakReferences in the values ArrayLists
// may have been cleared.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment