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
98a3f121
Commit
98a3f121
authored
1 year ago
by
Olivier Gaillard
Committed by
Android (Google) Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Add the timestamp of when the ANR was trigger." into main
parents
c73e2e20
cd7ee3d8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/core/java/com/android/server/am/ProcessErrorStateRecord.java
+13
-0
13 additions, 0 deletions
...e/java/com/android/server/am/ProcessErrorStateRecord.java
with
13 additions
and
0 deletions
services/core/java/com/android/server/am/ProcessErrorStateRecord.java
+
13
−
0
View file @
98a3f121
...
...
@@ -64,6 +64,9 @@ import com.android.server.wm.WindowProcessController;
import
java.io.File
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.time.Instant
;
import
java.time.ZoneId
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.UUID
;
import
java.util.concurrent.ExecutionException
;
...
...
@@ -76,6 +79,9 @@ import java.util.concurrent.atomic.AtomicLong;
* The error state of the process, such as if it's crashing/ANR etc.
*/
class
ProcessErrorStateRecord
{
private
static
final
DateTimeFormatter
DROPBOX_TIME_FORMATTER
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss.SSSZ"
);
final
ProcessRecord
mApp
;
private
final
ActivityManagerService
mService
;
...
...
@@ -444,6 +450,13 @@ class ProcessErrorStateRecord {
info
.
append
(
"ErrorId: "
).
append
(
errorId
.
toString
()).
append
(
"\n"
);
}
info
.
append
(
"Frozen: "
).
append
(
mApp
.
mOptRecord
.
isFrozen
()).
append
(
"\n"
);
if
(
timeoutRecord
!=
null
&&
timeoutRecord
.
mEndUptimeMillis
>
0
)
{
long
millisSinceEndUptimeMs
=
anrTime
-
timeoutRecord
.
mEndUptimeMillis
;
String
formattedTime
=
DROPBOX_TIME_FORMATTER
.
format
(
Instant
.
now
().
minusMillis
(
millisSinceEndUptimeMs
)
.
atZone
(
ZoneId
.
systemDefault
()));
info
.
append
(
"Timestamp: "
).
append
(
formattedTime
).
append
(
"\n"
);
}
// Retrieve controller with max ANR delay from AnrControllers
// Note that we retrieve the controller before dumping stacks because dumping stacks can
...
...
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