-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stabilize JavaScript Profiler in Cobalt (#2454)
b/323983545 A major refactor was needed in order to prevent the JavaScript Profiler from SEGFAULTING due to a garbage-collected nullptr. This refactor includes the use of a `ProfilerGroup` class. The life of a cobalt::js_profiler::Profiler is extended by adding scoped_refptrs to the ProfilerGroup; thus preventing GC. Profilers live as long as their ProfilerGroup, which lives as long as the Isolate and Web Agent. One `ProfilerGroup` is bound to one `web::Agent`, and contains one `v8::Isolate`, one `v8::CpuProfiler`, and many `cobalt::js_profiler::Profiler`s. The major advantage of this refactor is that it does not crash, and is more faithful to the [original Chromium Implementation](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/timing/profiler_group.cc;bpv=0;bpt=0). Test-On-Device: true --------- Co-authored-by: Ahmed Elzeiny <[email protected]>
- Loading branch information
Showing
13 changed files
with
413 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
/venv/* | ||
_certs/ | ||
.coverage | ||
compile_commands.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.