Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Issue 1486053003: Android: Add support for TraceEvent before the native library is loaded. (Closed)

Created:
5 years ago by Benoit L
Modified:
4 years, 5 months ago
Reviewers:
pasko, Yaron, jam
CC:
chromium-reviews, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Android: Add support for TraceEvent before the native library is loaded. Currently TraceEvents recorded before the native library load are silently discarded. This CL adds support for such "early" events. The events are buffered in Java, and then sent to the native side once it is available. This support is intentionally simple now. The aim is to ease performance investigation of early startup, and to ease tracking of early startup performance regression, since timings are then accessible to TBM tests. Also use the newly-introduced events in a couple places, and fix a bug in the TraceEvent we use to record the launcher activity lifetime (when an Activity calls finish from onCreate(), onPause() is not called). BUG=564041 Committed: https://crrev.com/fb0784294541c53f12e283124672750ab2e291f1 Cr-Commit-Position: refs/heads/master@{#404635}

Patch Set 1 #

Patch Set 2 : Proper locking. #

Total comments: 18

Patch Set 3 : Address comments. #

Patch Set 4 : Rebase. #

Patch Set 5 : Add a comment. #

Total comments: 14

Patch Set 6 : Address comments. #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : Rebase. #

Total comments: 4

Patch Set 10 : Rebase + comments. #

Total comments: 4

Patch Set 11 : Address comments. #

Patch Set 12 : Rebase + fix test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+438 lines, -8 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -0 lines 0 comments Download
M base/android/base_jni_registrar.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
A base/android/early_trace_event_binding.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -0 lines 0 comments Download
A base/android/early_trace_event_binding.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +46 lines, -0 lines 0 comments Download
A base/android/java/src/org/chromium/base/EarlyTraceEvent.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +179 lines, -0 lines 0 comments Download
M base/android/java/src/org/chromium/base/TraceEvent.java View 1 2 7 chunks +16 lines, -4 lines 0 comments Download
A base/android/javatests/src/org/chromium/base/EarlyTraceEventTest.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +152 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (15 generated)
Benoit L
Hello pasko, Here is a CL introducing trace events in Java before the native library ...
5 years ago (2015-12-02 16:15:14 UTC) #2
pasko
I would like to postpone reviewing this to next week, when we have The Fixit. ...
5 years ago (2015-12-03 10:09:35 UTC) #3
pasko
I am wondering whether we should/can do the change in TraceEvent.setEnabled() differently. See the corresponding ...
5 years ago (2015-12-15 17:52:59 UTC) #4
Benoit L
Thanks for the review. Sorry about the large diff, I should have rebased the patch ...
4 years, 11 months ago (2016-01-06 12:50:06 UTC) #5
pasko
lgtm with a request for slightly more documentation about concurrency that might turn out to ...
4 years, 11 months ago (2016-01-06 13:50:10 UTC) #6
Benoit L
Hello yfriedman Here is a CL introducing trace events in Java before the native library ...
4 years, 11 months ago (2016-01-08 17:22:21 UTC) #8
Yaron
https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java File base/android/java/src/org/chromium/base/EarlyTraceEvent.java (right): https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode73 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:73: /** @see TraceEvent#MaybeEnableEarlytracing(). Tracing https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode77 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:77: || (new File("/data/local/chrome-trace-config.json")).exists())) ...
4 years, 11 months ago (2016-01-08 19:42:18 UTC) #9
pasko
https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java File base/android/java/src/org/chromium/base/EarlyTraceEvent.java (right): https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode77 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:77: || (new File("/data/local/chrome-trace-config.json")).exists())) { On 2016/01/08 19:42:18, Yaron wrote: ...
4 years, 11 months ago (2016-01-08 19:51:11 UTC) #10
Yaron
https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java File base/android/java/src/org/chromium/base/EarlyTraceEvent.java (right): https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode77 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:77: || (new File("/data/local/chrome-trace-config.json")).exists())) { On 2016/01/08 19:51:10, pasko wrote: ...
4 years, 11 months ago (2016-01-08 19:59:29 UTC) #11
Benoit L
Thanks for the review. Please take a look. https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java File base/android/java/src/org/chromium/base/EarlyTraceEvent.java (right): https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode73 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:73: /** ...
4 years, 11 months ago (2016-01-13 09:35:29 UTC) #12
pasko
https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java File base/android/java/src/org/chromium/base/EarlyTraceEvent.java (right): https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode77 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:77: || (new File("/data/local/chrome-trace-config.json")).exists())) { On 2016/01/13 09:35:28, Benoit L ...
4 years, 11 months ago (2016-01-13 16:00:47 UTC) #13
Yaron
https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java File base/android/java/src/org/chromium/base/EarlyTraceEvent.java (right): https://codereview.chromium.org/1486053003/diff/80001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode77 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:77: || (new File("/data/local/chrome-trace-config.json")).exists())) { On 2016/01/13 16:00:47, pasko wrote: ...
4 years, 11 months ago (2016-01-13 16:15:52 UTC) #14
Benoit L
Hi, Reviving this CL because of crbug.com/622213. yfriedman@, PTAL. From the comment you had back ...
4 years, 6 months ago (2016-06-24 12:08:46 UTC) #15
Yaron
ya, I think my only concern was the disk access. in the intervening time, we've ...
4 years, 5 months ago (2016-06-29 21:27:34 UTC) #16
Benoit L
Thanks! All done. https://codereview.chromium.org/1486053003/diff/160001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java File base/android/java/src/org/chromium/base/EarlyTraceEvent.java (right): https://codereview.chromium.org/1486053003/diff/160001/base/android/java/src/org/chromium/base/EarlyTraceEvent.java#newcode81 base/android/java/src/org/chromium/base/EarlyTraceEvent.java:81: if (!(CommandLine.getInstance().hasSwitch("trace-startup") On 2016/06/29 21:27:34, Yaron ...
4 years, 5 months ago (2016-07-04 16:10:43 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1486053003/180001
4 years, 5 months ago (2016-07-04 16:11:01 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/98207)
4 years, 5 months ago (2016-07-04 17:12:48 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1486053003/180001
4 years, 5 months ago (2016-07-04 20:29:03 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/98263)
4 years, 5 months ago (2016-07-04 21:36:13 UTC) #25
Yaron
lgtm https://codereview.chromium.org/1486053003/diff/180001/base/android/early_trace_event_binding.h File base/android/early_trace_event_binding.h (right): https://codereview.chromium.org/1486053003/diff/180001/base/android/early_trace_event_binding.h#newcode1 base/android/early_trace_event_binding.h:1: // Copyright 2015 The Chromium Authors. All rights ...
4 years, 5 months ago (2016-07-05 16:43:56 UTC) #26
Benoit L
Thanks! All done. Adding jam@ for base/BUILD.gn. PTAL, thanks. https://codereview.chromium.org/1486053003/diff/180001/base/android/early_trace_event_binding.h File base/android/early_trace_event_binding.h (right): https://codereview.chromium.org/1486053003/diff/180001/base/android/early_trace_event_binding.h#newcode1 base/android/early_trace_event_binding.h:1: ...
4 years, 5 months ago (2016-07-06 14:00:33 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1486053003/200001
4 years, 5 months ago (2016-07-06 14:05:23 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/240479)
4 years, 5 months ago (2016-07-06 15:00:01 UTC) #32
jam
On 2016/07/06 14:00:33, Benoit L wrote: > Thanks! > All done. > > > Adding ...
4 years, 5 months ago (2016-07-09 02:27:05 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1486053003/200001
4 years, 5 months ago (2016-07-11 08:45:27 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/101264)
4 years, 5 months ago (2016-07-11 09:48:19 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1486053003/220001
4 years, 5 months ago (2016-07-11 11:04:18 UTC) #41
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 5 months ago (2016-07-11 11:59:42 UTC) #42
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/fb0784294541c53f12e283124672750ab2e291f1 Cr-Commit-Position: refs/heads/master@{#404635}
4 years, 5 months ago (2016-07-11 12:01:08 UTC) #44
wychen
4 years, 5 months ago (2016-07-12 00:30:56 UTC) #45
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:220001) has been created in
https://codereview.chromium.org/2145443002/ by wychen@chromium.org.

The reason for reverting is: https://crbug.com/627142.

Powered by Google App Engine
This is Rietveld 408576698