Compare commits

...
36 Commits
Author SHA1 Message Date
Jamie Wong b17f7eeee8 1.22.1 2025-02-15 12:55:08 -08:00
Philipp A. 0e153f0a2c Update to working open, switch to ESM (#499) 2025-02-15 12:49:27 -08:00
Jamie Wong e3d57d5bb5 Revert "Fix broken CLI dependency open (#498)"
This reverts commit 60daa0e321.
2025-02-12 22:09:00 -08:00
Philipp A. 60daa0e321 Fix broken CLI dependency open (#498) 2025-02-12 13:13:25 -08:00
Daniel Kukula c5b01beec3 Update README.md (#496) 2025-01-23 12:27:16 -08:00
Jamie Wong bd7b44a0a7 1.22.0 2025-01-16 16:47:42 -08:00
Jamie Wong f181283861 Add an example trace with rust mangling 2025-01-16 16:47:11 -08:00
Corentin Kerisit dd989ea51c Add support for Rust v0 symbol mangling scheme (#491) 2025-01-16 11:46:58 -08:00
Jamie Wong c04a148518 1.21.2 2025-01-15 14:56:25 -08:00
Jamie Wong 103e441e27 Switch from parcel to esbuild (#432) 2025-01-15 14:47:40 -08:00
Jamie Wong 911feb609b Revert "Upgrade to parcel 2.13.3 (#492)"
This reverts commit c7be11d4e0.
2025-01-14 16:15:16 -08:00
Jamie Wong c7be11d4e0 Upgrade to parcel 2.13.3 (#492) 2025-01-13 23:32:29 -08:00
Jamie Wong 146477a850 Add link to async-profiler wiki page to README 2024-11-21 11:07:46 -08:00
Jamie Wong d36c3a5442 1.21.0 2024-11-16 22:13:13 -08:00
Robert Kruszewski e468c60229 Add support for Instruments 16 Time Profile Deep Copy (#484)
* Add support for Instruments 16 time profiles

* rename

* prettier
2024-11-16 22:06:50 -08:00
Tom Levy d69f3d0eec Fix bug where import after error continues failing (#463)
Steps to reproduce:
1. Open https://www.speedscope.app/
2. Try to import an invalid file such as [invalid.json](https://github.com/jlfwong/speedscope/files/14167326/invalid.json). The page says "Something went wrong. Check the JS console for more details."
3. Now try to import a valid file such as [simple.json](https://github.com/jlfwong/speedscope/files/14167335/simple.json). The page says "Something went wrong. Check the JS console for more details." even though this second file is valid.

Explanation of the fix (copied from the commit message):
> We need to clear the error flag, otherwise once there is an error and we display "Something went wrong" we will keep displaying that forever even when the user imports a valid file.
2024-04-15 11:50:13 -07:00
Timo Tijhof 25f671e9d8 Bundle the font (#472)
For performance, offline support and privacy.

Continues from https://github.com/jlfwong/speedscope/pull/412
2024-04-15 11:45:12 -07:00
Tom Levy 0121cf9342 Clarify specification of startValue in speedscope file format (#464)
The previous description ("event values will be relative to this
startValue") was ambiguous.

Suppose the profile starts at wall time 1000ms and the first event is
at wall time 1003ms.

The intention is that startValue should be set to 1000 and the "at"
value of the event should be set to 1003. The viewer's time axis will
start at 0ms and the first event will be displayed at 3ms.

But the previous description could be incorrectly interpreted as
saying that the "at" value of the first event should be set to 3 (the
time relative to startValue, as opposed to the absolute wall time).

Clarify that "relative" is referring to how the viewer displays the
data, not about which values to store in the file.
2024-02-05 10:58:18 -08:00
Jamie Wong 68fd88ceaf 1.20.0 2024-01-12 09:57:30 -08:00
Zachary Marion a6d700194f Partition based on samples instead of traceEvents when importing a sample-based chrome trace (#460)
In the existing code, if `traceEvents` did not have any importable events, the profile would be marked as empty. This was a bug, as the dev Hermes profiles I was testing with had one X event which made the code work. However we do not need to guarantee (and the spec doesn't seem to) any traceEvents being present as long as we have samples and stack frames. 

When I tested a production profile taken from Hermes it did not have any importable events, just a metadata event with a thread name. This PR updates the implementation to iterate over partitioned samples instead of traceEvents so we construct profiles for all thread + process pairs referenced in the samples array.

| Before | After |
| --- | ----- |
| <img width="1454" alt="Screenshot 2024-01-03 at 9 58 56 AM" src="https://github.com/jlfwong/speedscope/assets/9957046/78c098a7-b374-4492-ad13-9ca79afdb40c"> | <img width="1450" alt="Screenshot 2024-01-03 at 9 58 17 AM" src="https://github.com/jlfwong/speedscope/assets/9957046/d2d5e82b-fa3e-43db-bf8a-e8c3b84cd13a"> |
2024-01-03 16:04:22 -05:00
Jamie Wong a3c0b15935 1.19.0 2023-12-27 23:57:14 -05:00
Zachary Marion e9a17d5d14 Improve hermes profile frame keys to better group frames (#459)
Because all args are serialized in the key for hermes profiles, frames were not properly getting grouped since the "parent" property was different. This PR ensures that the frame key is properly constructed from the function name, file name, line + column number.

| Before | After |
| ----- | ----- |
| <img width="1727" alt="Screenshot 2023-12-27 at 2 25 32 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/4ec04653-5a80-4f34-9506-48e0eb415983"> | <img width="1728" alt="Screenshot 2023-12-27 at 2 26 02 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/c3edc447-e8ad-4757-8576-cbb8c27eafe3"> |
| <img width="1720" alt="Screenshot 2023-12-27 at 2 13 37 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/10194aba-8f26-48ca-bf15-06917b44ea99"> | <img width="1728" alt="Screenshot 2023-12-27 at 2 14 20 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/75c32401-1705-4b23-b71a-5f0a720160dd"> |
2023-12-27 23:56:27 -05:00
Jamie Wong 3f3da22853 Update README.md
- Add link to Hermes import instructions
- Re-order import sources higher in the list
- Update first line
2023-12-27 10:48:07 -05:00
Jamie Wong bea0ef6913 1.18.0 2023-12-26 17:12:59 -05:00
Zachary Marion 4feb1e564d Add hermes-specific support for the trace event format (#458)
Profiles that are transformed into the hermes trace event format are guaranteed to have specific arguments that supply metadata that is useful for debugging - namely the filename, line + col number that the function call originated from, with sourcemaps applied. This PR adds specific support for this information to the trace event importer. This means that we can have the Frame name be just the name of the function, since we know all the information we want to be displayed in the UI is captured in the frame info, which makes the traces cleaner to look at.

| Before | After |
|-----|-----|
| <img width="1728" alt="Screenshot 2023-12-26 at 2 40 01 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/f9dff608-5df3-4098-b1f8-91a69185d906"> | <img width="1726" alt="Screenshot 2023-12-26 at 2 39 13 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/b8ff360e-a316-4bef-8ebc-620c9ff1a998"> |
| <img width="1728" alt="Screenshot 2023-12-26 at 2 41 03 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/127a49b5-458e-4ac8-934a-202e565cb20f"> | <img width="1728" alt="Screenshot 2023-12-26 at 2 41 29 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/ebb285ce-6b33-4535-8e45-b9ada4e4d97f"> |
2023-12-26 17:00:18 -05:00
Jamie Wong 88f4fe6105 Update README-ADMINS.md with npm login instructions (#457) 2023-12-25 22:52:46 -05:00
Jamie Wong 60f1812e51 1.17.0 2023-12-25 22:40:40 -05:00
Jamie Wong 1717fecafb Upgrade prettier, update prettier & react-hooks eslint plugins (#456)
Re-ran prettier with latest version
2023-12-25 22:37:45 -05:00
Jamie Wong c296f530c7 Upgrade typescript & eslint to latest, fix resulting errors (#455)
Also updated the ci.yml node test versions to 18.x and 20.x, given current support: https://endoflife.date/nodejs
2023-12-25 22:23:33 -05:00
Jamie Wong 8e0fa58d65 Re-enable eslint prettier rule after being accidentally disabled for 3 years (#454)
It looks like in #267 (which was 3 years ago!), I accidentally disabled prettier linting altogether 😱

https://github.com/jlfwong/speedscope/pull/267/files#diff-e2954b558f2aa82baff0e30964490d12942e0e251c1aa56c3294de6ec67b7cf5

There's no comment in that PR about this being an intentional thing, so I have to assume this was a dumb mistake.
2023-12-25 21:22:56 -05:00
Zachary Marion b21480494e Support the chrome JSON trace format (allows viewing of hermes traces) (#453) 2023-12-25 21:11:45 -05:00
Zachary Marion dfd3a0dfb3 Fix bug in selectQueueToTakeFromNext for trace profiles (#450)
I have been taking a lot of profiles using the Hermes profiler, but I noticed that they sometimes to not show up properly. After debugging what exactly was going on, I realized it was because the logic in `selectQueueToTakeFromNext` only checks for name, instead of the key for the event. I had a bunch of events with the name `anonymous` that were getting improperly exited before they should have been due to this logic. 

This fix makes the code more robust if there are added "args" which differentiate an event from another (as is the case in Hermes profiles), however it would still be an issue if they key just defaults to the name.

Example profile before:

<img width="1728" alt="Screenshot 2023-12-15 at 12 54 04 AM" src="https://github.com/jlfwong/speedscope/assets/9957046/345f556e-f944-40f1-b59c-748133acb950">

What it should look like (in Perfetto):
<img width="1051" alt="Screenshot 2023-12-15 at 8 51 38 AM" src="https://github.com/jlfwong/speedscope/assets/9957046/7473cdf8-95f1-49de-a0c7-ef4ac081ff85">

After the fix:

<img width="1728" alt="Screenshot 2023-12-15 at 12 54 29 AM" src="https://github.com/jlfwong/speedscope/assets/9957046/56b0870a-538b-4916-acc8-de2b7dfd78eb">
2023-12-16 00:27:03 -08:00
Jamie Wong ac4a015559 Add bounds checking for sampleTypeIndex (#449)
Wow this was surprising. As reported in #448, the `simple.speedscope.json` file failed import. This was surprising to me because there's a test that covers that file to ensure it imports correctly.

The file provided in #448, however, is from a version of speedscope from 5 years ago before the file had been pretty printed. It turns out that when this *particular* file is not pretty-printed, it's a schematically valid pprof profile.

The fix is to do some bounds checks and return null. After the change, the file imports as you'd expect after realizing its not actually a valid pprof profile.

Fixes #448
2023-12-07 18:43:47 -08:00
byronhe de17f128d0 Update README-zh_CN.md (#442)
fix url
2023-09-04 09:54:35 -07:00
Jamie Wong 304ccf33ab Update publish-and-deploy to remove automated release creation (#440)
Turns out the `--attach` command was hallucinated by GPT!
2023-07-16 15:31:31 -07:00
Jamie Wong 650e505b55 1.16.0 2023-07-16 03:04:29 -07:00
79 changed files with 8100 additions and 13691 deletions
+1
View File
@@ -9,6 +9,7 @@ module.exports = {
plugins: ['prettier', '@typescript-eslint', 'react-hooks'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'prettier/prettier': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': [
'error',
+7 -6
View File
@@ -12,21 +12,22 @@ jobs:
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
env:
CI: true
- name: Try CLI
run: node bin/cli.mjs -v
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
@@ -37,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
+1 -1
View File
@@ -3,4 +3,4 @@ node_modules
dist
.idea
coverage
.vscode
.vscode
+60
View File
@@ -1,3 +1,63 @@
## [1.22.1] - 2025-02-15
- Update to working `open`, switch to ESM [[#499](https://github.com/jlfwong/speedscope/pull/499)] (by @flying-sheep)
- Revert "Fix broken CLI dependency `open`" [[#498](https://github.com/jlfwong/speedscope/pull/498)] (by @flying-sheep)
- Fix broken CLI dependency `open` [[#498](https://github.com/jlfwong/speedscope/pull/498)] (by @flying-sheep)
- Update README.md [[#496](https://github.com/jlfwong/speedscope/pull/496)] (by @dkuku)
## [1.22.0] - 2025-01-16
- Add an example trace with rust mangling
- Add support for Rust v0 symbol mangling scheme [[#491](https://github.com/jlfwong/speedscope/pull/491)] (by @cerisier)
## [1.21.2] - 2025-01-15
- Switch from parcel to esbuild [[#432](https://github.com/jlfwong/speedscope/pull/432)] (by @jlfwong)
- Revert "Upgrade to parcel 2.13.3" [[#492](https://github.com/jlfwong/speedscope/pull/492)] (by @jlfwong)
- Upgrade to parcel 2.13.3 [[#492](https://github.com/jlfwong/speedscope/pull/492)] (by @jlfwong)
- Add link to async-profiler wiki page to README
## [1.21.0] - 2024-11-16
- Add support for Instruments 16 Time Profile Deep Copy [[#484](https://github.com/jlfwong/speedscope/pull/484)] (by @robert3005)
- Fix bug where import after error continues failing [[#463](https://github.com/jlfwong/speedscope/pull/463)] (by @tom93)
- Bundle the font [[#472](https://github.com/jlfwong/speedscope/pull/472)] (by @Krinkle)
- Clarify specification of startValue in speedscope file format [[#464](https://github.com/jlfwong/speedscope/pull/464)] (by @tom93)
## [1.20.0] - 2024-01-12
- Partition based on samples instead of traceEvents when importing a sample-based chrome trace [[#460](https://github.com/jlfwong/speedscope/pull/460)] (by @zacharyfmarion)
## [1.19.0] - 2023-12-27
- Improve hermes profile frame keys to better group frames [[#459](https://github.com/jlfwong/speedscope/pull/459)] (by @zacharyfmarion)
- Update README.md
## [1.18.0] - 2023-12-26
- Add hermes-specific support for the trace event format [[#458](https://github.com/jlfwong/speedscope/pull/458)] (by @zacharyfmarion)
- Update README-ADMINS.md with npm login instructions [[#457](https://github.com/jlfwong/speedscope/pull/457)] (by @jlfwong)
## [1.17.0] - 2023-12-25
- Upgrade prettier, update prettier & react-hooks eslint plugins [[#456](https://github.com/jlfwong/speedscope/pull/456)] (by @jlfwong)
- Upgrade typescript & eslint to latest, fix resulting errors [[#455](https://github.com/jlfwong/speedscope/pull/455)] (by @jlfwong)
- Re-enable eslint prettier rule after being accidentally disabled for 3 years [[#454](https://github.com/jlfwong/speedscope/pull/454)] (by @jlfwong)
- Support the chrome JSON trace format (allows viewing of hermes traces) [[#453](https://github.com/jlfwong/speedscope/pull/453)] (by @zacharyfmarion)
- Fix bug in selectQueueToTakeFromNext for trace profiles [[#450](https://github.com/jlfwong/speedscope/pull/450)] (by @zacharyfmarion)
- Add bounds checking for sampleTypeIndex [[#449](https://github.com/jlfwong/speedscope/pull/449)] (by @jlfwong)
- Update README-zh_CN.md [[#442](https://github.com/jlfwong/speedscope/pull/442)] (by @byronhe)
- Update publish-and-deploy to remove automated release creation [[#440](https://github.com/jlfwong/speedscope/pull/440)] (by @jlfwong)
## [1.16.0] - 2023-07-16
- Automate more of the release process [[#439](https://github.com/jlfwong/speedscope/pull/439)] (by @jlfwong)
- Improve profile builder performance [[#437](https://github.com/jlfwong/speedscope/pull/437)] (by @Goose97)
- Fix crash when importing big linux perf tool files [[#435](https://github.com/jlfwong/speedscope/pull/435)] (by @Goose97)
- Improve splitLines: return iterator instead [[#434](https://github.com/jlfwong/speedscope/pull/434)] (by @Goose97)
- Fix trimTextMid [[#431](https://github.com/jlfwong/speedscope/pull/431)] (by @jlfwong)
- Added support for Papyrus profiles [[#428](https://github.com/jlfwong/speedscope/pull/428)] (by @xieve)
## [1.15.2] - 2023-06-21
### Fixed
+4 -2
View File
@@ -21,10 +21,10 @@ cd /var/folders/l0/qtd9z14973s2tw81vmzwkyp00000gp/T/speedscope-test-installation
Run this command, to switch to the test directory.
Inside of here, run `bin/cli.js`. This should open a copy of speedscope in browser.
Inside of here, run `bin/cli.mjs`. This should open a copy of speedscope in browser.
Try importing a profile from disk via the browse button and make sure it works.
Next, try running `bin/cli.js dist/release/perf-vertx*`. This should immediately open
Next, try running `bin/cli.mjs dist/release/perf-vertx*`. This should immediately open
speedscope in browser, and the perf-vertx file should load immediately.
## Create & publish the new release
@@ -34,6 +34,8 @@ Ensure you have the Github CLI tools installed and you're authenticated. Try run
gh auth status
npm whoami
In your default browser, ensure that you're logged into your npm account, otherwise you'll see a 404 page when you open the authenticate link during the npm publish.
Once ready to publish, run:
scripts/publish-and-deploy.sh
+2 -2
View File
@@ -12,7 +12,7 @@
# 使用
访问https://www.speedscope.app,上传文件或者拖拽到页面上。配置文件不会上传到任何地方——应用程序完全在浏览器中。
访问 <https://www.speedscope.app> ,上传文件或者拖拽到页面上。配置文件不会上传到任何地方——应用程序完全在浏览器中。
## 命令行中使用
@@ -24,7 +24,7 @@
## 独立使用
如果你不想使用npm或者node下载,你也可以在这里下载独立的版本https://github.com/jlfwong/speedscope/releases.
如果你不想使用npm或者node下载,你也可以在这里下载独立的版本 <https://github.com/jlfwong/speedscope/releases>.
下载完一个版本的压缩文件之后,解压并在谷歌或者火狐浏览器中打开`index.html`文件即可。
## 支持的文件格式
+39 -35
View File
@@ -1,7 +1,6 @@
English | [简体中文](./README-zh_CN.md)
# 🔬speedscope
A fast, interactive web-based viewer for performance profiles. An alternative viewer for [FlameGraphs][1]. Will happily display multi-megabyte profiles without crashing your browser.
A fast, interactive web-based viewer for performance profiles. Supports import from a variety of profiles in a variety of languages (JS, Ruby, Python, Go & more). Try it here: https://www.speedscope.app
Given raw profiling data, speedscope allows you to interactively explore the data to get insight into what's slow in your application, or allocating all the memory, or whatever data is represented in the profiling data.
@@ -10,6 +9,44 @@ Given raw profiling data, speedscope allows you to interactively explore the dat
[0]: https://en.wikipedia.org/wiki/Profiling_(computer_programming)#Statistical_profilers
[1]: https://github.com/brendangregg/FlameGraph
# Supported file formats
speedscope is designed to ingest profiles from a variety of different profilers for different programming languages & environments. Click the links below for documentation on how to import from a specific source.
- JavaScript
- [Importing from Chrome](https://github.com/jlfwong/speedscope/wiki/Importing-from-Chrome)
- [Importing from Firefox](https://github.com/jlfwong/speedscope/wiki/Importing-from-Firefox)
- [Importing from Safari](https://github.com/jlfwong/speedscope/wiki/Importing-from-Safari)
- [Importing from Node.js](https://github.com/jlfwong/speedscope/wiki/Importing-from-Node.js)
- [Importing from Hermes (for React Native)](https://github.com/jlfwong/speedscope/wiki/Importing-from-Hermes)
- Ruby
- [Importing from stackprof](https://github.com/jlfwong/speedscope/wiki/Importing-from-stackprof-(ruby))
- [Importing from rbspy](https://github.com/jlfwong/speedscope/wiki/Importing-from-rbspy-(ruby))
- [Importing from ruby-prof](https://github.com/jlfwong/speedscope/wiki/Importing-from-ruby-prof)
- Python
- [Importing from py-spy](https://github.com/jlfwong/speedscope/wiki/Importing-from-py-spy-(python))
- [pyspeedscope](https://github.com/windelbouwman/pyspeedscope)
- [Importing from Austin](https://github.com/P403n1x87/austin-python#format-conversion)
- [Importing from pyinstrument](https://github.com/jlfwong/speedscope/wiki/Importing-from-pyinstrument-(python))
- PHP
- [Importing from phpspy or sj-i/php-profiler](https://github.com/sj-i/php-profiler/pull/101)
- Go
- [Importing from pprof](https://github.com/jlfwong/speedscope/wiki/Importing-from-pprof-(go))
- Rust
- [flamescope](https://github.com/coolreader18/flamescope)
- Java
- [Importing from asyncprofiler (Java)
](https://github.com/jlfwong/speedscope/wiki/Importing-from-async%E2%80%90profiler-(Java))
- Erlang/Elixir
- [eflambe](https://github.com/Stratus3D/eflambe)
- Native code
- [Importing from Instruments.app](https://github.com/jlfwong/speedscope/wiki/Importing-from-Instruments.app) (macOS)
- [Importing from `perf`](https://github.com/jlfwong/speedscope/wiki/Importing-from-perf-(linux)) (linux)
- [Importing from .NET Core](https://github.com/jlfwong/speedscope/wiki/Importing-from-.NET-Core)
- [Importing from GHC (Haskell)](https://github.com/jlfwong/speedscope/wiki/Importing-from-Haskell)
- [Importing from custom sources](https://github.com/jlfwong/speedscope/wiki/Importing-from-custom-sources)
Contributions to add support for additional formats are welcome! See issues with the ["import source" tag](https://github.com/jlfwong/speedscope/issues?q=is%3Aissue+is%3Aopen+label%3A%22import+source%22).
# Usage
Visit https://www.speedscope.app, then either browse to find a profile file or drag-and-drop one onto the page. The profiles are not uploaded anywhere -- the application is totally in-browser.
@@ -30,39 +67,6 @@ self-contained version from https://github.com/jlfwong/speedscope/releases.
After you download the zip file from a release, simply unzip it and open the
contained `index.html` in Chrome or Firefox.
## Supported file formats
speedscope is designed to ingest profiles from a variety of different profilers for different programming languages & environments. Click the links below for documentation on how to import from a specific source.
- JavaScript
- [Importing from Chrome](https://github.com/jlfwong/speedscope/wiki/Importing-from-Chrome)
- [Importing from Firefox](https://github.com/jlfwong/speedscope/wiki/Importing-from-Firefox)
- [Importing from Safari](https://github.com/jlfwong/speedscope/wiki/Importing-from-Safari)
- [Importing from Node.js](https://github.com/jlfwong/speedscope/wiki/Importing-from-Node.js)
- Ruby
- [Importing from stackprof](https://github.com/jlfwong/speedscope/wiki/Importing-from-stackprof-(ruby))
- [Importing from rbspy](https://github.com/jlfwong/speedscope/wiki/Importing-from-rbspy-(ruby))
- [Importing from ruby-prof](https://github.com/jlfwong/speedscope/wiki/Importing-from-ruby-prof)
- Python
- [Importing from py-spy](https://github.com/jlfwong/speedscope/wiki/Importing-from-py-spy-(python))
- [pyspeedscope](https://github.com/windelbouwman/pyspeedscope)
- [Importing from Austin](https://github.com/P403n1x87/austin-python#format-conversion)
- [Importing from pyinstrument](https://github.com/jlfwong/speedscope/wiki/Importing-from-pyinstrument-(python))
- PHP
- [Importing from phpspy or sj-i/php-profiler](https://github.com/sj-i/php-profiler/pull/101)
- Go
- [Importing from pprof](https://github.com/jlfwong/speedscope/wiki/Importing-from-pprof-(go))
- Rust
- [flamescope](https://github.com/coolreader18/flamescope)
- Native code
- [Importing from Instruments.app](https://github.com/jlfwong/speedscope/wiki/Importing-from-Instruments.app) (macOS)
- [Importing from `perf`](https://github.com/jlfwong/speedscope/wiki/Importing-from-perf-(linux)) (linux)
- [Importing from .NET Core](https://github.com/jlfwong/speedscope/wiki/Importing-from-.NET-Core)
- [Importing from GHC (Haskell)](https://github.com/jlfwong/speedscope/wiki/Importing-from-Haskell)
- [Importing from custom sources](https://github.com/jlfwong/speedscope/wiki/Importing-from-custom-sources)
Contributions to add support for additional formats are welcome! See issues with the ["import source" tag](https://github.com/jlfwong/speedscope/issues?q=is%3Aissue+is%3Aopen+label%3A%22import+source%22).
## Importing via URL
To load a specific profile by URL, you can append a hash fragment like `#profileURL=[URL-encoded profile URL]&title=[URL-encoded custom title]`. Note that the server hosting the profile must have CORS configured to allow AJAX requests from speedscope.
-172
View File
@@ -1,172 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>speedscope</title>
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
<script>
// https://github.com/evanw/webgl-recorder
false && (function () {
var getContext = HTMLCanvasElement.prototype.getContext;
var requestAnimationFrame = window.requestAnimationFrame;
var frameSincePageLoad = 0;
function countFrames() {
frameSincePageLoad++;
requestAnimationFrame(countFrames);
}
window.requestAnimationFrame = function () {
return requestAnimationFrame.apply(window, arguments);
};
HTMLCanvasElement.prototype.getContext = function (type) {
var canvas = this;
var context = getContext.apply(canvas, arguments);
if (type === 'webgl' || type === 'experimental-webgl') {
var oldWidth = canvas.width;
var oldHeight = canvas.height;
var oldFrameCount = frameSincePageLoad;
var trace = [];
var variables = {};
var fakeContext = {
trace: trace,
compileTrace: compileTrace,
downloadTrace: downloadTrace,
};
trace.push(' gl.canvas.width = ' + oldWidth + ';');
trace.push(' gl.canvas.height = ' + oldHeight + ';');
function compileTrace() {
var text = 'function* render(gl) {\n';
text += ' // Recorded using https://github.com/evanw/webgl-recorder\n';
for (var key in variables) {
text += ' var ' + key + 's = [];\n';
}
text += trace.join('\n');
text += '\n}\n';
return text;
}
function downloadTrace() {
var text = compileTrace();
var link = document.createElement('a');
link.href = URL.createObjectURL(new Blob([text], { type: 'application/javascript' }));
link.download = 'trace.js';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
function getVariable(value) {
if (value instanceof WebGLActiveInfo ||
value instanceof WebGLBuffer ||
value instanceof WebGLFramebuffer ||
value instanceof WebGLProgram ||
value instanceof WebGLRenderbuffer ||
value instanceof WebGLShader ||
value instanceof WebGLShaderPrecisionFormat ||
value instanceof WebGLTexture ||
value instanceof WebGLUniformLocation) {
var name = value.constructor.name;
var list = variables[name] || (variables[name] = []);
var index = list.indexOf(value);
if (index === -1) {
index = list.length;
list.push(value);
}
return name + 's[' + index + ']';
}
return null;
}
console.timeStamp('start')
var start = performance.now()
for (var key in context) {
var value = context[key];
if (typeof value === 'function') {
fakeContext[key] = function (key, value) {
return function () {
trace.push(`// ${performance.now() - start}`)
var result = value.apply(context, arguments);
var args = [];
if (frameSincePageLoad !== oldFrameCount) {
oldFrameCount = frameSincePageLoad;
trace.push(' yield;');
}
if (canvas.width !== oldWidth || canvas.height !== oldHeight) {
oldWidth = canvas.width;
oldHeight = canvas.height;
trace.push(' gl.canvas.width = ' + oldWidth + ';');
trace.push(' gl.canvas.height = ' + oldHeight + ';');
}
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (typeof arg === 'number' || typeof arg === 'boolean' || typeof arg === 'string' || arg === null) {
args.push(JSON.stringify(arg));
}
else if (ArrayBuffer.isView(arg)) {
args.push('new ' + arg.constructor.name + '([' + Array.prototype.slice.call(arg) + '])');
}
else {
var variable = getVariable(arg);
if (variable !== null) {
args.push(variable);
}
else {
console.log('unsupported value:', arg);
args.push('null');
}
}
}
var text = 'gl.' + key + '(' + args.join(', ') + ');';
var variable = getVariable(result);
if (variable !== null) text = variable + ' = ' + text;
trace.push(' ' + text);
return result;
};
}(key, value);
}
else {
fakeContext[key] = value;
}
}
return fakeContext;
}
return context;
};
countFrames();
})();
</script>
<link rel="stylesheet" href="reset.css">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
</head>
<body>
<script src="../src/speedscope.tsx"></script>
</body>
</html>
+7
View File
@@ -0,0 +1,7 @@
@font-face{
font-family: 'Source Code Pro';
font-weight: 400;
font-style: normal;
font-stretch: normal;
src: url('./source-code-pro/SourceCodePro-Regular.ttf.woff2') format('woff2');
}
+93
View File
@@ -0,0 +1,93 @@
Copyright 2010-2019 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
+19 -11
View File
@@ -1,10 +1,14 @@
#!/usr/bin/env node
const path = require('path')
const fs = require('fs')
const os = require('os')
const stream = require('stream')
import path from 'node:path'
import fs from 'node:fs'
import os from 'node:os'
import stream from 'node:stream'
import { fileURLToPath } from 'node:url'
const open = require('open')
import open from 'open'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const helpString = `Usage: speedscope [filepath]
@@ -52,7 +56,9 @@ async function main() {
}
if (process.argv.includes('--version') || process.argv.includes('-v')) {
console.log('v' + require('../package.json').version)
const json = fs.readFileSync(path.resolve(__dirname, '../package.json'), { encoding: 'utf-8' })
const { version } = JSON.parse(json)
console.log(`v${version}`)
return
}
@@ -87,14 +93,16 @@ async function main() {
fs.writeFileSync(jsPath, jsSource)
urlToOpen += `#localProfilePath=${jsPath}`
// For some silly reason, the OS X open command ignores any query parameters or hash parameters
// For some silly reason, the macOS `open` and Windows `start` commands ignore hash parameters
// passed as part of the URL. To get around this weird issue, we'll create a local HTML file
// that just redirects.
const htmlPath = path.join(os.tmpdir(), `${filePrefix}.html`)
console.log(`Creating temp file ${htmlPath}`)
fs.writeFileSync(htmlPath, `<script>window.location=${JSON.stringify(urlToOpen)}</script>`)
if (process.platform === 'darwin' || process.platform === 'win32') {
const htmlPath = path.join(os.tmpdir(), `${filePrefix}.html`)
console.log(`Creating temp file ${htmlPath}`)
fs.writeFileSync(htmlPath, `<script>window.location=${JSON.stringify(urlToOpen)}</script>`)
urlToOpen = `file://${htmlPath}`
urlToOpen = `file://${htmlPath}`
}
}
console.log('Opening', urlToOpen, 'in your default browser')
+4611 -13052
View File
File diff suppressed because it is too large Load Diff
+15 -14
View File
@@ -1,25 +1,25 @@
{
"name": "speedscope",
"version": "1.15.2",
"version": "1.22.1",
"description": "",
"repository": "jlfwong/speedscope",
"main": "index.js",
"bin": {
"speedscope": "./bin/cli.js"
"speedscope": "./bin/cli.mjs"
},
"scripts": {
"deploy": "./scripts/deploy.sh",
"prepack": "./scripts/build-release.sh",
"prepack": "./scripts/prepack.sh --outdir \"$(pwd)/dist/release\" --protocol file",
"prettier": "prettier --write 'src/**/*.ts' 'src/**/*.tsx'",
"lint": "eslint 'src/**/*.ts' 'src/**/*.tsx'",
"jest": "./scripts/test-setup.sh && jest --runInBand",
"coverage": "npm run jest -- --coverage",
"typecheck": "tsc --noEmit",
"test": "./scripts/ci.sh",
"serve": "parcel assets/index.html --open --no-autoinstall"
"serve": "tsx scripts/dev-server.ts"
},
"files": [
"bin/cli.js",
"bin/cli.mjs",
"dist/release/**",
"!*.map"
],
@@ -34,24 +34,25 @@
"@types/jszip": "3.1.4",
"@types/node": "14.0.1",
"@types/pako": "1.0.0",
"@typescript-eslint/eslint-plugin": "4.19.0",
"@typescript-eslint/parser": "4.19.0",
"@typescript-eslint/eslint-plugin": "6.16.0",
"@typescript-eslint/parser": "6.16.0",
"acorn": "7.2.0",
"aphrodite": "2.1.0",
"eslint": "6.0.0",
"eslint-plugin-prettier": "2.6.0",
"eslint-plugin-react-hooks": "4.0.2",
"esbuild": "0.24.2",
"eslint": "8.0.0",
"eslint-plugin-prettier": "5.1.2",
"eslint-plugin-react-hooks": "4.6.0",
"jest": "24.3.0",
"jsverify": "0.8.3",
"jszip": "3.1.5",
"pako": "1.0.6",
"parcel-bundler": "1.12.4",
"preact": "10.4.1",
"prettier": "2.0.4",
"prettier": "3.1.1",
"protobufjs": "6.8.8",
"source-map": "0.6.1",
"ts-jest": "24.3.0",
"typescript": "4.2.3",
"tsx": "4.19.2",
"typescript": "5.3.3",
"typescript-json-schema": "0.42.0",
"uglify-es": "3.2.2",
"uint8array-json-parser": "0.0.2"
@@ -77,6 +78,6 @@
]
},
"dependencies": {
"open": "7.2.0"
"open": "10.1.0"
}
}
@@ -0,0 +1,95 @@
Weight Self Weight Symbol Names
4.93 s 100.0% 0 s start
4.93 s 99.9% 0 s main
2.45 s 0.0% 846.00 ms delta()
797.00 ms 0.0% 786.00 ms alpha()
9.00 ms 0.0% 0 s leakMemory()
8.00 ms 0.0% 1.00 ms szone_malloc_should_clear
6.00 ms 0.0% 4.00 ms small_malloc_should_clear
2.00 ms 0.0% 2.00 ms small_malloc_from_free_list
1.00 ms 0.0% 1.00 ms small_malloc_from_free_list
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
2.00 ms 0.0% 2.00 ms _malloc_zone_malloc
795.00 ms 0.0% 778.00 ms beta()
14.00 ms 0.0% 1.00 ms leakMemory()
11.00 ms 0.0% 2.00 ms szone_malloc_should_clear
9.00 ms 0.0% 3.00 ms small_malloc_should_clear
5.00 ms 0.0% 5.00 ms small_malloc_from_free_list
1.00 ms 0.0% 1.00 ms rack_get_thread_index
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
1.00 ms 0.0% 1.00 ms DYLD-STUB$$malloc
2.00 ms 0.0% 2.00 ms nanov2_malloc_type
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
10.00 ms 0.0% 0 s leakMemory()
7.00 ms 0.0% 3.00 ms szone_malloc_should_clear
4.00 ms 0.0% 3.00 ms small_malloc_should_clear
1.00 ms 0.0% 0 s mvm_allocate_pages_plat
1.00 ms 0.0% 1.00 ms _kernelrpc_mach_vm_map_trap
2.00 ms 0.0% 2.00 ms small_malloc_should_clear
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
3.00 ms 0.0% 3.00 ms _malloc_zone_malloc
838.00 ms 0.0% 827.00 ms gamma()
9.00 ms 0.0% 1.00 ms leakMemory()
5.00 ms 0.0% 0 s szone_malloc_should_clear
4.00 ms 0.0% 1.00 ms small_malloc_should_clear
3.00 ms 0.0% 3.00 ms small_malloc_from_free_list
1.00 ms 0.0% 1.00 ms rack_get_thread_index
1.00 ms 0.0% 1.00 ms small_malloc_should_clear
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
2.00 ms 0.0% 2.00 ms _malloc_zone_malloc
834.00 ms 0.0% 824.00 ms beta()
9.00 ms 0.0% 0 s leakMemory()
7.00 ms 0.0% 0 s szone_malloc_should_clear
6.00 ms 0.0% 1.00 ms small_malloc_should_clear
4.00 ms 0.0% 4.00 ms small_malloc_from_free_list
1.00 ms 0.0% 1.00 ms rack_get_thread_index
1.00 ms 0.0% 1.00 ms rack_get_thread_index
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
1.00 ms 0.0% 1.00 ms small_malloc_should_clear
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
803.00 ms 0.0% 788.00 ms alpha()
14.00 ms 0.0% 0 s leakMemory()
11.00 ms 0.0% 1.00 ms szone_malloc_should_clear
10.00 ms 0.0% 3.00 ms small_malloc_should_clear
5.00 ms 0.0% 5.00 ms small_malloc_from_free_list
2.00 ms 0.0% 2.00 ms rack_get_thread_index
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
1.00 ms 0.0% 1.00 ms small_malloc_should_clear
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
4.00 ms 0.1% 0 s dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const
4.00 ms 0.1% 0 s dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)
3.00 ms 0.0% 0 s dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)
3.00 ms 0.0% 0 s mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const
3.00 ms 0.0% 0 s mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const
3.00 ms 0.0% 0 s invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const
3.00 ms 0.0% 0 s invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)
3.00 ms 0.0% 0 s dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)
3.00 ms 0.0% 0 s dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)
3.00 ms 0.0% 0 s dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const
3.00 ms 0.0% 0 s dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)
3.00 ms 0.0% 0 s invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)
3.00 ms 0.0% 0 s dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*)
3.00 ms 0.0% 0 s dyld4::RuntimeState::findPrebuiltLoader(char const*) const
3.00 ms 0.0% 0 s dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const
3.00 ms 0.0% 0 s dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const
3.00 ms 0.0% 0 s dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const
3.00 ms 0.0% 0 s invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const
3.00 ms 0.0% 0 s dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const
3.00 ms 0.0% 0 s dyld3::stat(char const*, stat*)
3.00 ms 0.0% 3.00 ms stat
1.00 ms 0.0% 0 s dyld4::APIs::runAllInitializersForMain()
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const
1.00 ms 0.0% 0 s dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const
1.00 ms 0.0% 0 s dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const
1.00 ms 0.0% 0 s dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const
1.00 ms 0.0% 0 s dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const
1.00 ms 0.0% 0 s dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const
1.00 ms 0.0% 0 s invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const
1.00 ms 0.0% 0 s invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const
1.00 ms 0.0% 1.00 ms _GLOBAL__sub_I_stdlib_typed_new.cpp
@@ -0,0 +1,580 @@
trace 6061 150520.991529: 16949152 task-clock:ppp:
aaaac1479980 _RINvNtCslw2YnFSxGUT_10ppv_lite867generic5dmap2NtB2_13u32x4_genericNCNvXsy_B2_BI_NtNtNtCsTACXlTRjQ_4core3ops5arith3Add3add0ECs2zQ9tAH61OF_11rand_chacha+0x144 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.008480: 16949152 task-clock:ppp:
aaaac147a5b4 _RNvXs1_NtCsTACXlTRjQ_4core7convertNtNtCslw2YnFSxGUT_10ppv_lite867generic13u32x4_genericINtB5_4IntoNtBy_14vec128_storageE4intoCs2zQ9tAH61OF_11rand_chacha+0x4 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac14737e7 _RNvXsl_NtCs2zQ9tAH61OF_11rand_chacha6chachaNtB5_12ChaCha12CoreNtNtCseBIf0Yfsj9G_9rand_core5block12BlockRngCore8generateCsiznFMVuT3yX_4rand+0x6463 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.025430: 16949152 task-clock:ppp:
aaaac147a5b4 _RNvXs1_NtCsTACXlTRjQ_4core7convertNtNtCslw2YnFSxGUT_10ppv_lite867generic13u32x4_genericINtB5_4IntoNtBy_14vec128_storageE4intoCs2zQ9tAH61OF_11rand_chacha+0x4 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1475c23 _RNvXsl_NtCs2zQ9tAH61OF_11rand_chacha6chachaNtB5_12ChaCha12CoreNtNtCseBIf0Yfsj9G_9rand_core5block12BlockRngCore8generateCsiznFMVuT3yX_4rand+0x889f (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.042380: 16949152 task-clock:ppp:
aaaac146a13c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0xf8 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.059329: 16949152 task-clock:ppp:
aaaac1469fa8 _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0xcc (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.076276: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.093223: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.110172: 16949152 task-clock:ppp:
aaaac1469f2c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.127121: 16949152 task-clock:ppp:
aaaac146b25c _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x80 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.144070: 16949152 task-clock:ppp:
aaaac146b25c _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x80 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.161018: 16949152 task-clock:ppp:
aaaac1469494 _RNvCs8K9WJNlS7Dz_5trace17multiply_matrices+0x2d4 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.177971: 16949152 task-clock:ppp:
aaaac1468014 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSINtNtCsfiKabdrepoq_5alloc3vec3VecdEE5indexCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.194918: 16949152 task-clock:ppp:
aaaac1469f2c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.211872: 16949152 task-clock:ppp:
aaaac14680d4 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSdE5indexCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.228819: 16949152 task-clock:ppp:
aaaac146a14c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x108 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.245765: 16949152 task-clock:ppp:
aaaac146a1c8 _RNvNvMs9_NtCsTACXlTRjQ_4core3numj13unchecked_add18precondition_checkCs8K9WJNlS7Dz_5trace+0x1c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.262716: 16949152 task-clock:ppp:
aaaac1469494 _RNvCs8K9WJNlS7Dz_5trace17multiply_matrices+0x2d4 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.279663: 16949152 task-clock:ppp:
aaaac146b2c4 _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.296613: 16949152 task-clock:ppp:
aaaac146b35c _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.313561: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.330511: 16949152 task-clock:ppp:
aaaac146b170 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x2c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.347462: 16949152 task-clock:ppp:
aaaac146b35c _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.364409: 16949152 task-clock:ppp:
aaaac146a14c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x108 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.381358: 16949152 task-clock:ppp:
aaaac146b264 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x88 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.398307: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.415256: 16949152 task-clock:ppp:
aaaac146b2c8 _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x58 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.432207: 16949152 task-clock:ppp:
aaaac1469468 _RNvCs8K9WJNlS7Dz_5trace17multiply_matrices+0x2a8 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.449154: 16949152 task-clock:ppp:
aaaac146b388 _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x80 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.466104: 16949152 task-clock:ppp:
aaaac1468b54 _RNvXsF_NtNtCsTACXlTRjQ_4core4iter5rangejNtB5_4Step17forward_uncheckedCs8K9WJNlS7Dz_5trace+0x38 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.483053: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.500005: 16949152 task-clock:ppp:
aaaac14798b4 _RINvNtCslw2YnFSxGUT_10ppv_lite867generic5dmap2NtB2_13u32x4_genericNCNvXsy_B2_BI_NtNtNtCsTACXlTRjQ_4core3ops5arith3Add3add0ECs2zQ9tAH61OF_11rand_chacha+0x78 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.516952: 16949152 task-clock:ppp:
aaaac147823c _RNCNkNvNtNtCsiznFMVuT3yX_4rand4rngs6thread14THREAD_RNG_KEY00B9_+0x24 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.533903: 16949152 task-clock:ppp:
aaaac146f758 _RNvXsl_NtCs2zQ9tAH61OF_11rand_chacha6chachaNtB5_12ChaCha12CoreNtNtCseBIf0Yfsj9G_9rand_core5block12BlockRngCore8generateCsiznFMVuT3yX_4rand+0x23d4 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.550852: 16949152 task-clock:ppp:
aaaac146a18c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x148 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.567799: 16949152 task-clock:ppp:
aaaac14683b4 _RNvXs3_NtNtCsTACXlTRjQ_4core4iter5rangeINtNtNtB9_3ops5range5RangejENtB5_17RangeIteratorImpl9spec_nextCs8K9WJNlS7Dz_5trace+0x28 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.584753: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.601700: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.618648: 16949152 task-clock:ppp:
aaaac1468430 _RNvXs4_NtNtCsTACXlTRjQ_4core4iter5rangeINtNtNtB9_3ops5range5RangejENtNtNtB7_6traits8iterator8Iterator4nextCs8K9WJNlS7Dz_5trace+0x14 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.635610: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.652560: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.669508: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.686460: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.703442: 16949152 task-clock:ppp:
aaaac1468014 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSINtNtCsfiKabdrepoq_5alloc3vec3VecdEE5indexCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.720393: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.737340: 16949152 task-clock:ppp:
aaaac146b208 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x2c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.754289: 16949152 task-clock:ppp:
aaaac1469f2c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.771239: 16949152 task-clock:ppp:
aaaac146a14c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x108 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.788187: 16949152 task-clock:ppp:
aaaac14683ac _RNvXs3_NtNtCsTACXlTRjQ_4core4iter5rangeINtNtNtB9_3ops5range5RangejENtB5_17RangeIteratorImpl9spec_nextCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.805136: 16949152 task-clock:ppp:
aaaac1468148 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSdE9index_mutCs8K9WJNlS7Dz_5trace+0x3c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.822085: 16949152 task-clock:ppp:
aaaac1468b3c _RNvXsF_NtNtCsTACXlTRjQ_4core4iter5rangejNtB5_4Step17forward_uncheckedCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.839034: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.855986: 16949152 task-clock:ppp:
aaaac1468074 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSINtNtCsfiKabdrepoq_5alloc3vec3VecdEE9index_mutCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.872936: 16949152 task-clock:ppp:
aaaac146b1c8 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x84 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.889885: 16949152 task-clock:ppp:
aaaac1469468 _RNvCs8K9WJNlS7Dz_5trace17multiply_matrices+0x2a8 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.906831: 16949152 task-clock:ppp:
aaaac146a1c8 _RNvNvMs9_NtCsTACXlTRjQ_4core3numj13unchecked_add18precondition_checkCs8K9WJNlS7Dz_5trace+0x1c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.923780: 16949152 task-clock:ppp:
aaaac146b35c _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.940732: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.957678: 16949152 task-clock:ppp:
aaaac146b35c _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.974631: 16949152 task-clock:ppp:
aaaac1469f2c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150521.991577: 16949152 task-clock:ppp:
aaaac146a064 _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.008526: 16949152 task-clock:ppp:
aaaac146b208 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x2c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.025476: 16949152 task-clock:ppp:
aaaac1479cb4 _RNCNvXs1o_NtCslw2YnFSxGUT_10ppv_lite867genericNtB8_13u32x4_genericNtNtNtCsTACXlTRjQ_4core3ops3bit6BitXor6bitxor0Cs2zQ9tAH61OF_11rand_chacha+0x1c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1474db7 _RNvXsl_NtCs2zQ9tAH61OF_11rand_chacha6chachaNtB5_12ChaCha12CoreNtNtCseBIf0Yfsj9G_9rand_core5block12BlockRngCore8generateCsiznFMVuT3yX_4rand+0x7a33 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.042426: 16949152 task-clock:ppp:
aaaac147b12c _RNvXsB_NtNtCsTACXlTRjQ_4core4iter5rangemNtB5_4Step17forward_uncheckedCs2zQ9tAH61OF_11rand_chacha+0x28 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.059376: 16949152 task-clock:ppp:
aaaac146eb1c _RNvXsl_NtCs2zQ9tAH61OF_11rand_chacha6chachaNtB5_12ChaCha12CoreNtNtCseBIf0Yfsj9G_9rand_core5block12BlockRngCore8generateCsiznFMVuT3yX_4rand+0x1798 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.076324: 16949152 task-clock:ppp:
aaaac146a1c8 _RNvNvMs9_NtCsTACXlTRjQ_4core3numj13unchecked_add18precondition_checkCs8K9WJNlS7Dz_5trace+0x1c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.093274: 16949152 task-clock:ppp:
aaaac1469f44 _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0x68 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.110224: 16949152 task-clock:ppp:
aaaac1468b3c _RNvXsF_NtNtCsTACXlTRjQ_4core4iter5rangejNtB5_4Step17forward_uncheckedCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.127170: 16949152 task-clock:ppp:
aaaac146a064 _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.144122: 16949152 task-clock:ppp:
aaaac1469fbc _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0xe0 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.161068: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.178016: 16949152 task-clock:ppp:
aaaac146944c _RNvCs8K9WJNlS7Dz_5trace17multiply_matrices+0x28c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.194967: 16949152 task-clock:ppp:
aaaac1468b3c _RNvXsF_NtNtCsTACXlTRjQ_4core4iter5rangejNtB5_4Step17forward_uncheckedCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.211916: 16949152 task-clock:ppp:
aaaac1469f1c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0x40 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.228865: 16949152 task-clock:ppp:
aaaac146a13c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0xf8 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.245814: 16949152 task-clock:ppp:
aaaac1468098 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSINtNtCsfiKabdrepoq_5alloc3vec3VecdEE9index_mutCs8K9WJNlS7Dz_5trace+0x44 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.262763: 16949152 task-clock:ppp:
aaaac1469f40 _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw14from_raw_parts18precondition_checkCs8K9WJNlS7Dz_5trace+0x64 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.279716: 16949152 task-clock:ppp:
aaaac146a13c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0xf8 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.296663: 16949152 task-clock:ppp:
aaaac146b264 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x88 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.313611: 16949152 task-clock:ppp:
aaaac146a0a8 _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x64 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.330560: 16949152 task-clock:ppp:
aaaac146b230 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.347509: 16949152 task-clock:ppp:
aaaac146a18c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x148 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.364458: 16949152 task-clock:ppp:
aaaac14693c8 _RNvCs8K9WJNlS7Dz_5trace17multiply_matrices+0x208 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.381407: 16949152 task-clock:ppp:
aaaac146b388 _RNvXsc_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecdEINtNtNtCsTACXlTRjQ_4core3ops5index8IndexMutjE9index_mutCs8K9WJNlS7Dz_5trace+0x80 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.398356: 16949152 task-clock:ppp:
aaaac1468b3c _RNvXsF_NtNtCsTACXlTRjQ_4core4iter5rangejNtB5_4Step17forward_uncheckedCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.415306: 16949152 task-clock:ppp:
aaaac1468128 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSdE9index_mutCs8K9WJNlS7Dz_5trace+0x1c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.432255: 16949152 task-clock:ppp:
aaaac146b180 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x3c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.449204: 16949152 task-clock:ppp:
aaaac146b198 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x54 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.466153: 16949152 task-clock:ppp:
aaaac146b1d0 _RNvXsb_NtCsfiKabdrepoq_5alloc3vecINtB5_3VecIBw_dEEINtNtNtCsTACXlTRjQ_4core3ops5index5IndexjE5indexCs8K9WJNlS7Dz_5trace+0x8c (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.483102: 16949152 task-clock:ppp:
aaaac146a094 _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.500051: 16949152 task-clock:ppp:
aaaac14680d4 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSdE5indexCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.517003: 16949152 task-clock:ppp:
aaaac14680d4 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSdE5indexCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.533950: 16949152 task-clock:ppp:
aaaac14799b4 _RINvNtCslw2YnFSxGUT_10ppv_lite867generic5dmap2NtB2_13u32x4_genericNCNvXsy_B2_BI_NtNtNtCsTACXlTRjQ_4core3ops5arith3Add3add0ECs2zQ9tAH61OF_11rand_chacha+0x178 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.550901: 16949152 task-clock:ppp:
aaaac1479d54 _RNCNvXsj_NtCslw2YnFSxGUT_10ppv_lite867genericNtB7_13u32x4_genericNtNtB9_5types16RotateEachWord3224rotate_each_word_right160Cs2zQ9tAH61OF_11rand_chacha+0x24 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac146e9d3 _RNvXsl_NtCs2zQ9tAH61OF_11rand_chacha6chachaNtB5_12ChaCha12CoreNtNtCseBIf0Yfsj9G_9rand_core5block12BlockRngCore8generateCsiznFMVuT3yX_4rand+0x164f (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.567849: 16949152 task-clock:ppp:
aaaac1470a1c _RNvXsl_NtCs2zQ9tAH61OF_11rand_chacha6chachaNtB5_12ChaCha12CoreNtNtCseBIf0Yfsj9G_9rand_core5block12BlockRngCore8generateCsiznFMVuT3yX_4rand+0x3698 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.584797: 16949152 task-clock:ppp:
aaaac1468014 _RNvXs0_NtNtCsTACXlTRjQ_4core5slice5indexjINtB5_10SliceIndexSINtNtCsfiKabdrepoq_5alloc3vec3VecdEE5indexCs8K9WJNlS7Dz_5trace+0x20 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
trace 6061 150522.601749: 16949152 task-clock:ppp:
aaaac146a14c _RNvNvNtNtCsTACXlTRjQ_4core5slice3raw18from_raw_parts_mut18precondition_checkCs8K9WJNlS7Dz_5trace+0x108 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
aaaac1469a1c _RINvNtCse0yjq9ZQveU_3std2rt10lang_startuECs8K9WJNlS7Dz_5trace+0x50 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
ffff804d8598 __libc_start_main+0x98 (/usr/lib/aarch64-linux-gnu/libc.so.6)
aaaac1467b30 _start+0x30 (/trace/target/debug/deps/trace-0f0e4af093fa4f97)
@@ -0,0 +1 @@
{"version":"0.0.1","$schema":"https://www.speedscope.app/file-format-schema.json","shared":{"frames":[{"name":"a"},{"name":"b"},{"name":"c"},{"name":"d"}]},"profiles":[{"type":"evented","name":"simple.txt","unit":"none","startValue":0,"endValue":14,"events":[{"type":"O","frame":0,"at":0},{"type":"O","frame":1,"at":0},{"type":"O","frame":2,"at":0},{"type":"C","frame":2,"at":2},{"type":"O","frame":3,"at":2},{"type":"C","frame":3,"at":6},{"type":"O","frame":2,"at":6},{"type":"C","frame":2,"at":9},{"type":"C","frame":1,"at":14},{"type":"C","frame":0,"at":14}]}]}
@@ -0,0 +1,156 @@
[
{
"pid":0,
"tid":0,
"ph":"B",
"name":"[root]",
"ts":0,
"args":{
"name":"[root]",
"category":"root",
"url":null,
"line":null,
"column":null,
"params":null,
"allocatedCategory":"root",
"allocatedName":"[root]"
}
},
{
"pid":0,
"tid":0,
"ph":"B",
"name":"beta",
"ts":1,
"args":{
"line":54,
"column":12,
"funcLine":"1",
"funcColumn":"1",
"name":"beta",
"category":"JavaScript",
"parent":1,
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params":null,
"allocatedCategory":"JavaScript",
"allocatedName":"beta"
}
},
{
"pid":0,
"tid":0,
"ph":"E",
"name":"beta",
"ts":2,
"args":{
"line":54,
"column":12,
"funcLine":"1",
"funcColumn":"1",
"name":"beta",
"category":"JavaScript",
"parent":1,
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params":null,
"allocatedCategory":"JavaScript",
"allocatedName":"beta"
}
},
{
"pid":0,
"tid":0,
"ph":"B",
"name":"gamma",
"ts":4,
"args":{
"line":54,
"column":12,
"funcLine":"1",
"funcColumn":"1",
"name":"beta",
"category":"blah",
"parent":1,
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params":null,
"allocatedCategory":"JavaScript",
"allocatedName":"beta"
}
},
{
"pid":0,
"tid":0,
"ph":"E",
"name":"gamma",
"ts":13,
"args":{
"line":54,
"column":12,
"funcLine":"1",
"funcColumn":"1",
"name":"beta",
"category":"blah",
"parent":1,
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params":null,
"allocatedCategory":"JavaScript",
"allocatedName":"beta"
}
},
{
"pid":0,
"tid":0,
"ph":"B",
"name":"beta",
"ts":4,
"args":{
"line":54,
"column":12,
"funcLine":"1",
"funcColumn":"1",
"name":"beta",
"category":"blah",
"parent":1,
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params":null,
"allocatedCategory":"JavaScript",
"allocatedName":"beta"
}
},
{
"pid":0,
"tid":0,
"ph":"E",
"name":"beta",
"ts":10,
"args":{
"line":54,
"column":12,
"funcLine":"1",
"funcColumn":"1",
"name":"beta",
"category":"blah",
"parent":1,
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params":null,
"allocatedCategory":"JavaScript",
"allocatedName":"beta"
}
},
{
"pid":0,
"tid":0,
"ph":"E",
"name":"[root]",
"ts":14,
"args":{
"name":"[root]",
"category":"root",
"url":null,
"line":null,
"column":null,
"params":null,
"allocatedCategory":"root",
"allocatedName":"[root]"
}
}
]
@@ -0,0 +1,150 @@
{
"traceEvents": [
{
"name": "process_name",
"ph": "M",
"cat": "__metadata",
"pid": 7512,
"ts": "11550183666",
"tid": "-1",
"args": {
"name": "hermes"
}
},
{
"name": "thread_name",
"ph": "M",
"cat": "__metadata",
"pid": 7512,
"ts": "11550183666",
"tid": "1",
"args": {
"name": "mqt_js"
}
},
{
"name": "mqt_js",
"cat": "mqt_js",
"ph": "X",
"dur": 0,
"pid": 7512,
"ts": "11550183666",
"tid": "1",
"args": {}
},
{
"name": "mqt_js",
"cat": "mqt_js",
"ph": "X",
"dur": 0,
"pid": 7512,
"ts": "11550183666",
"tid": "2",
"args": {}
}
],
"samples": [
{
"cpu": "-1",
"name": "",
"ts": "11552125241",
"pid": 7512,
"tid": "1",
"weight": "1",
"sf": 1
},
{
"cpu": "-1",
"name": "",
"ts": "11552125241",
"pid": 7512,
"tid": "2",
"weight": "1",
"sf": 4
},
{
"cpu": "-1",
"name": "",
"ts": "11552146011",
"pid": 7512,
"tid": "1",
"weight": "1",
"sf": 2
},
{
"cpu": "-1",
"name": "",
"ts": "11552146011",
"pid": 7512,
"tid": "2",
"weight": "1",
"sf": 5
},
{
"cpu": "-1",
"name": "",
"ts": "11552159337",
"pid": 7512,
"tid": "1",
"weight": "1",
"sf": 3
},
{
"cpu": "-1",
"name": "",
"ts": "11552159337",
"pid": 7512,
"tid": "2",
"weight": "1",
"sf": 6
},
{
"cpu": "-1",
"name": "",
"ts": "11552169337",
"pid": 7512,
"tid": "2",
"weight": "1",
"sf": 4
},
{
"cpu": "-1",
"name": "",
"ts": "11552179337",
"pid": 7512,
"tid": "2",
"weight": "1",
"sf": 4
}
],
"stackFrames": {
"1": {
"name": "[root]",
"category": "root"
},
"2": {
"name": "function1",
"category": "JavaScript",
"parent": 1
},
"3": {
"name": "[GC Young Gen]",
"category": "Metadata",
"parent": 1
},
"4": {
"name": "[root thread 2]",
"category": "root"
},
"5": {
"name": "function3",
"category": "JavaScript",
"parent": 4
},
"6": {
"name": "function4",
"category": "Metadata",
"parent": 4
}
}
}
@@ -0,0 +1,76 @@
[
{
"pid": 0,
"tid": 0,
"ph": "B",
"name": "[root]",
"ts": 0,
"args": {
"name": "[root]",
"category": "root",
"url": null,
"line": null,
"column": null,
"params": null,
"allocatedCategory": "root",
"allocatedName": "[root]"
}
},
{
"pid": 0,
"tid": 0,
"ph": "B",
"name": "beta",
"ts": 1,
"args": {
"line": 54,
"column": 12,
"funcLine": "1",
"funcColumn": "1",
"name": "beta",
"category": "JavaScript",
"parent": 1,
"url": "/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params": null,
"allocatedCategory": "JavaScript",
"allocatedName": "beta"
}
},
{
"pid": 0,
"tid": 0,
"ph": "E",
"name": "beta",
"ts": 13,
"args": {
"line": 54,
"column": 12,
"funcLine": "1",
"funcColumn": "1",
"name": "beta",
"category": "JavaScript",
"parent": 1,
"url": "/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"params": null,
"allocatedCategory": "JavaScript",
"allocatedName": "beta"
}
},
{
"pid": 0,
"tid": 0,
"ph": "E",
"name": "[root]",
"ts": 14,
"args": {
"name": "[root]",
"category": "root",
"url": null,
"line": null,
"column": null,
"params": null,
"allocatedCategory": "root",
"allocatedName": "[root]"
}
}
]
@@ -0,0 +1,117 @@
{
"traceEvents": [
{
"name": "process_name",
"ph": "M",
"cat": "__metadata",
"pid": 7512,
"ts": "11550183666",
"tid": "-1",
"args": {
"name": "hermes"
}
},
{
"name": "thread_name",
"ph": "M",
"cat": "__metadata",
"pid": 7512,
"ts": "11550183666",
"tid": "7695",
"args": {
"name": "mqt_js"
}
}
],
"samples": [
{
"cpu": "-1",
"name": "",
"ts": "11552125241",
"pid": 7512,
"tid": "7695",
"weight": "1",
"sf": 1
},
{
"cpu": "-1",
"name": "",
"ts": "11552129681",
"pid": 7512,
"tid": "7695",
"weight": "1",
"sf": 1
},
{
"cpu": "-1",
"name": "",
"ts": "11552146011",
"pid": 7512,
"tid": "7695",
"weight": "1",
"sf": 2
},
{
"cpu": "-1",
"name": "",
"ts": "11552159337",
"pid": 7512,
"tid": "7695",
"weight": "1",
"sf": 4
},
{
"cpu": "-1",
"name": "",
"ts": "11552169942",
"pid": 7512,
"tid": "7695",
"weight": "1",
"sf": 1
},
{
"cpu": "-1",
"name": "",
"ts": "11552179951",
"pid": 7512,
"tid": "7695",
"weight": "1",
"sf": 5
},
{
"cpu": "-1",
"name": "",
"ts": "11552189951",
"pid": 7512,
"tid": "7695",
"weight": "1",
"sf": 5
}
],
"stackFrames": {
"1": {
"name": "[root]",
"category": "root"
},
"2": {
"name": "function1(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:1:1)",
"category": "JavaScript",
"parent": 1
},
"3": {
"name": "function2(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:418874:4)",
"category": "JavaScript",
"parent": 1
},
"4": {
"name": "function3(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:17:3)",
"category": "JavaScript",
"parent": 3
},
"5": {
"name": "[GC Young Gen]",
"category": "Metadata",
"parent": 1
}
}
}
@@ -0,0 +1,14 @@
[
{"pid": 0, "tid": 0, "ph": "B", "name": "anonymous", "ts": 0},
{"pid": 0, "tid": 0, "ph": "B", "name": "anonymous", "ts": 1, "args": { "parent": 1 }},
{"pid": 0, "tid": 0, "ph": "B", "name": "function1", "ts": 1, "args": { "parent": 2 }},
{"pid": 0, "tid": 0, "ph": "B", "name": "anonymous", "ts": 1, "args": { "parent": 3 }},
{"pid": 0, "tid": 0, "ph": "E", "name": "anonymous", "ts": 3, "args": { "parent": 3 }},
{"pid": 0, "tid": 0, "ph": "E", "name": "function1", "ts": 3, "args": { "parent": 2 }},
{"pid": 0, "tid": 0, "ph": "E", "name": "anonymous", "ts": 3, "args": { "parent": 1 }},
{"pid": 0, "tid": 0, "ph": "B", "name": "anonymous", "ts": 3, "args": { "parent": 1 }},
{"pid": 0, "tid": 0, "ph": "B", "name": "anonymous", "ts": 3, "args": { "parent": 8 }},
{"pid": 0, "tid": 0, "ph": "E", "name": "anonymous", "ts": 5, "args": { "parent": 8 }},
{"pid": 0, "tid": 0, "ph": "E", "name": "anonymous", "ts": 5, "args": { "parent": 1 }},
{"pid": 0, "tid": 0, "ph": "E", "name": "anonymous", "ts": 5}
]
-26
View File
@@ -1,26 +0,0 @@
#!/bin/bash
set -euxo pipefail
OUTDIR=`pwd`/dist/release
# Typecheck
node_modules/.bin/tsc --noEmit
# Run unit tests
npm run jest
# Clean out the release directory
rm -rf "$OUTDIR"
mkdir -p "$OUTDIR"
# Place info about the current commit into the build dir to easily identify releases
npm ls -depth -1 | head -n 1 | cut -d' ' -f 1 > "$OUTDIR"/release.txt
date >> "$OUTDIR"/release.txt
git rev-parse HEAD >> "$OUTDIR"/release.txt
# Place a json schema for the file format into the build directory too
node scripts/generate-file-format-schema-json.js > "$OUTDIR"/file-format-schema.json
# Build the compiled assets
node_modules/.bin/parcel build assets/index.html --no-cache --out-dir "$OUTDIR" --public-url "./" --detailed-report
+56
View File
@@ -0,0 +1,56 @@
import * as esbuild from 'esbuild'
import {buildOptions, generateIndexHtml} from './esbuild-shared'
function parseArgs() {
const args = process.argv.slice(2)
const result: {outdir?: string; protocol?: 'http' | 'file'} = {}
for (let i = 0; i < args.length; i += 2) {
switch (args[i]) {
case '--outdir':
result.outdir = args[i + 1]
break
case '--protocol':
result.protocol = args[i + 1] as 'http' | 'file'
break
}
}
return result
}
async function main() {
const {outdir, protocol: servingProtocol} = parseArgs()
if (!outdir || !servingProtocol) {
console.error('Usage: build-release.ts --outdir <outdir> --protocol <serving_protocol>')
process.exit(1)
}
if (servingProtocol !== 'http' && servingProtocol !== 'file') {
console.error('serving_protocol must be either "http" or "file"')
process.exit(1)
}
let buildResult = await esbuild.build({
...buildOptions,
minify: true,
metafile: true,
...(servingProtocol === 'file'
? {
format: 'iife',
splitting: false,
}
: {}),
outdir,
})
generateIndexHtml({
buildResult,
outdir,
servingProtocol,
})
console.log(`Successfully built to ${outdir}`)
}
main()
+5 -7
View File
@@ -7,12 +7,10 @@
set -euxo pipefail
SRCDIR=`pwd`
OUTDIR=`mktemp -d -t speedscope-unpacked`
OUTDIR=`pwd`/dist/http-release
# Untar the package
pushd "$OUTDIR"
PACKEDNAME=`npm pack speedscope | tail -n1`
tar -xvvf "$PACKEDNAME"
# Build the release with http protocol
./scripts/prepack.sh --outdir "$OUTDIR" --protocol http
# Create a shallow clone of the repository
TMPDIR=`mktemp -d -t speedscope-deploy`
@@ -22,7 +20,7 @@ git clone --depth 1 git@github.com:jlfwong/speedscope.git -b gh-pages
# Copy the build artifacts into the shallow clone
pushd speedscope
rm -rf *
cp -R "$OUTDIR"/package/dist/release/** .
cp -R "$OUTDIR"/* .
# Set the CNAME record
echo www.speedscope.app > CNAME
@@ -37,7 +35,7 @@ function ctrl_c() {
if [[ $REPLY =~ ^yes$ ]]
then
git add --all
git commit -m "Deploy $PACKEDNAME"
git commit -m "Deploy $(date +%Y-%m-%d)"
git push origin HEAD:gh-pages
rm -rf "$TMPDIR"
exit 0
+36
View File
@@ -0,0 +1,36 @@
import * as esbuild from 'esbuild'
import {buildOptions, generateIndexHtml} from './esbuild-shared'
async function main() {
const outdir = 'dist'
let ctx = await esbuild.context({
...buildOptions,
outdir,
write: false,
metafile: true,
plugins: [
{
name: 'speedscope-dev-server',
setup(build) {
build.onEnd(buildResult => {
generateIndexHtml({
buildResult,
outdir,
servingProtocol: 'http',
})
})
},
},
],
})
await ctx.rebuild()
let {host, port} = await ctx.serve({
servedir: outdir,
})
console.log(`Server is running at http://${host}:${port}`)
}
main()
+112
View File
@@ -0,0 +1,112 @@
import * as fs from 'fs'
import * as path from 'path'
import * as esbuild from 'esbuild'
const entryPoint = 'src/speedscope.tsx'
export const buildOptions: esbuild.BuildOptions = {
entryPoints: [
entryPoint,
// This is a kind of silly way to ensure that all of these files end up being
// discovered by esbuild and copied into the output directory
'assets/favicon-16x16.png',
'assets/favicon-32x32.png',
'assets/favicon.ico',
],
entryNames: '[name]-[hash]',
chunkNames: '[name]-[hash]',
assetNames: '[name]-[hash]',
sourcemap: true,
bundle: true,
format: 'esm',
splitting: true,
loader: {
'.txt': 'file',
'.woff2': 'file',
'.png': 'file',
'.ico': 'file',
},
}
interface GenerateIndexHtmlOptions {
buildResult: esbuild.BuildResult
outdir: string
servingProtocol: 'file' | 'http'
}
export const generateIndexHtml = ({
buildResult,
outdir,
servingProtocol,
}: GenerateIndexHtmlOptions) => {
const outputs = buildResult.metafile!.outputs
function getOutput(entryPoint: string): [string, esbuild.Metafile['outputs'][string]] {
const key = Object.keys(outputs).find(key => outputs[key].entryPoint === entryPoint)!
return [key, outputs[key]]
}
function getHashedFilePath(name: string) {
return path.basename(getOutput(name)[1].imports.find(i => i.kind === 'file-loader')!.path)
}
const [mainChunkPath, mainChunk] = getOutput(entryPoint)
const mainChunkName = path.basename(mainChunkPath)
const mainChunkCssPath = mainChunk.cssBundle!
const cssChunk = outputs[mainChunkCssPath]
const fontPath = cssChunk.imports.find(i => i.path.endsWith('.woff2'))!.path
const fontName = path.basename(fontPath)
const syncDependencyNames = mainChunk.imports
.filter(i => i.kind === 'import-statement')
.map(i => path.basename(i.path))
const asyncDependencyNames = mainChunk.imports
.filter(i => i.kind === 'dynamic-import')
.map(i => path.basename(i.path))
// If we're serving from a file protocol, we can't use module
// scripts
const scriptType = servingProtocol === 'file' ? '' : ' type="module"'
const favicon16x16Path = getHashedFilePath('assets/favicon-16x16.png')
const favicon32x32Path = getHashedFilePath('assets/favicon-32x32.png')
const faviconIcoPath = getHashedFilePath('assets/favicon.ico')
const html = `<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>speedscope</title>
<link rel="stylesheet" href="${path.basename(mainChunk.cssBundle!)}">
<link rel="icon" type="image/png" sizes="32x32" href="${favicon32x32Path}">
<link rel="icon" type="image/png" sizes="16x16" href="${favicon16x16Path}">
<link rel="icon" type="image/x-icon" href="${faviconIcoPath}">
</head>
<body>
<script src="${mainChunkName}"${scriptType}></script>
${syncDependencyNames.map(dep => `<script src="${dep}"${scriptType}></script>`).join('\n ')}
${asyncDependencyNames
.map(
dep =>
`<script src="${dep}"${scriptType}${
servingProtocol === 'file' ? '' : ' async'
}></script>`,
)
.join('\n ')}
${
/* Preload is blocked by CORS, so we can't use it with file:/// URLs */
servingProtocol === 'file'
? ''
: `<link rel="preload" href="${fontName}" as="font" type="font/woff2" crossorigin>`
}
</body>
</html>
`
fs.writeFileSync(`${outdir}/index.html`, html)
}
+53
View File
@@ -0,0 +1,53 @@
#!/bin/bash
set -euxo pipefail
# Parse command line arguments
while [[ $# -gt 0 ]]; do
case $1 in
--outdir)
OUTDIR="$2"
shift 2
;;
--protocol)
PROTOCOL="$2"
shift 2
;;
*)
echo "Unknown argument: $1"
echo "Usage: $0 --outdir <output_directory> --protocol <serving_protocol>"
echo "serving_protocol must be either 'http' or 'file'"
exit 1
;;
esac
done
# Validate required arguments
if [ -z "${OUTDIR:-}" ] || [ -z "${PROTOCOL:-}" ]; then
echo "Usage: $0 --outdir <output_directory> --protocol <serving_protocol>"
echo "serving_protocol must be either 'http' or 'file'"
exit 1
fi
if [ "$PROTOCOL" != "http" ] && [ "$PROTOCOL" != "file" ]; then
echo "Error: serving_protocol must be either 'http' or 'file'"
exit 1
fi
# Clean out the release directory
rm -rf "$OUTDIR"
mkdir -p "$OUTDIR"
# Place info about the current commit into the build dir to easily identify releases
npm ls -depth -1 | head -n 1 | cut -d' ' -f 1 > "$OUTDIR"/release.txt
date >> "$OUTDIR"/release.txt
git rev-parse HEAD >> "$OUTDIR"/release.txt
# Place a json schema for the file format into the build directory too
node scripts/generate-file-format-schema-json.js > "$OUTDIR"/file-format-schema.json
# Include licenses
# https://github.com/jlfwong/speedscope/pull/412
cp assets/source-code-pro/LICENSE.md "$OUTDIR"/source-code-pro.LICENSE.md
node_modules/.bin/tsx scripts/build-release.ts --outdir "$OUTDIR" --protocol "$PROTOCOL"
+4 -4
View File
@@ -5,11 +5,11 @@
set -euxo pipefail
TMPDIR=`mktemp -d -t speedscope-test-installation`
TESTDIR=`mktemp -d -t speedscope-test-installation`
PACKEDNAME=`npm pack | tail -n1`
mv "$PACKEDNAME" "$TMPDIR"
cd "$TMPDIR"
mv "$PACKEDNAME" "$TESTDIR"
cd "$TESTDIR"
tar -xvvf "$PACKEDNAME"
cd package
npm install
@@ -17,4 +17,4 @@ npm install
set +x
echo
echo "Run the following command to switch into the test directory"
echo cd "$TMPDIR"/package
echo cd "$TESTDIR"/package
+32 -3
View File
@@ -11,6 +11,12 @@
set -euxo pipefail
# Typecheck
node_modules/.bin/tsc --noEmit
# Run unit tests
npm run jest
if [ $# -lt 1 ]; then
echo "Usage: $0 <minor | patch | version>"
echo "e.g. $0 patch"
@@ -43,9 +49,32 @@ git push --tags
# Publish to npm
npm publish
# Deploy the website
npm run deploy
# Create a new release on Github
"$script_dir/prepare-zip-file.sh"
gh release create "$tagname" --title "$tagname" --notes "$changelog_update" --attach "dist/release/speedscope-$version.zip"
# Deploy the website
npm run deploy
# Don't double echo the below commands
set +x
echo
echo
echo "Visit https://github.com/jlfwong/speedscope/releases/new to create a new release."
echo
echo "tag: $tagname"
echo "title: $tagname"
echo "attachment: dist/release/speedscope-$version.zip"
echo "$changelog_update"
# NOTE: This part is almost-but-not-quite-automatable using a command like this:
#
# gh release create "$tagname" --title "$tagname" --notes "$changelog_update"
# --attach "dist/release/speedscope-$version.zip"
#
# There are two problems.
#
# 1. The "--attach" flag doesn't exit
# 2. I don't want the changelog notes to include the version and date like they do in CHANGELOG.md
#
# If 1. was solveable, then 2. would be easy to work-around.
+4 -1
View File
@@ -102,7 +102,10 @@ export class FlamechartColorPassRenderer {
private material: Graphics.Material
private buffer: Graphics.VertexBuffer
constructor(private gl: Graphics.Context, theme: Theme) {
constructor(
private gl: Graphics.Context,
theme: Theme,
) {
const vertices = [
{pos: [-1, 1], uv: [0, 1]},
{pos: [1, 1], uv: [1, 1]},
+4 -1
View File
@@ -70,7 +70,10 @@ export class ViewportRectangleRenderer {
private material: Graphics.Material
private buffer: Graphics.VertexBuffer
constructor(private gl: Graphics.Context, theme: Theme) {
constructor(
private gl: Graphics.Context,
theme: Theme,
) {
const vertices = [
[-1, 1],
[1, 1],
@@ -654,6 +654,504 @@ Object {
}
`;
exports[`importFromInstrumentsDeepCopy time profile, version 16 1`] = `
Object {
"frames": Array [
Frame {
"col": undefined,
"file": undefined,
"key": ":start",
"line": undefined,
"name": "start",
"selfWeight": 0,
"totalWeight": 4479,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":main",
"line": undefined,
"name": "main",
"selfWeight": 0,
"totalWeight": 4475,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":delta()",
"line": undefined,
"name": "delta()",
"selfWeight": 395,
"totalWeight": 2000,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":alpha()",
"line": undefined,
"name": "alpha()",
"selfWeight": 1574,
"totalWeight": 1600,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":leakMemory()",
"line": undefined,
"name": "leakMemory()",
"selfWeight": 2,
"totalWeight": 65,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":szone_malloc_should_clear",
"line": undefined,
"name": "szone_malloc_should_clear",
"selfWeight": 7,
"totalWeight": 49,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":small_malloc_should_clear",
"line": undefined,
"name": "small_malloc_should_clear",
"selfWeight": 20,
"totalWeight": 44,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":small_malloc_from_free_list",
"line": undefined,
"name": "small_malloc_from_free_list",
"selfWeight": 20,
"totalWeight": 20,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":_malloc_zone_malloc",
"line": undefined,
"name": "_malloc_zone_malloc",
"selfWeight": 14,
"totalWeight": 14,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":beta()",
"line": undefined,
"name": "beta()",
"selfWeight": 1602,
"totalWeight": 1629,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":rack_get_thread_index",
"line": undefined,
"name": "rack_get_thread_index",
"selfWeight": 6,
"totalWeight": 6,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":nanov2_malloc_type",
"line": undefined,
"name": "nanov2_malloc_type",
"selfWeight": 6,
"totalWeight": 6,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":DYLD-STUB$$malloc",
"line": undefined,
"name": "DYLD-STUB$$malloc",
"selfWeight": 1,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":mvm_allocate_pages_plat",
"line": undefined,
"name": "mvm_allocate_pages_plat",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":_kernelrpc_mach_vm_map_trap",
"line": undefined,
"name": "_kernelrpc_mach_vm_map_trap",
"selfWeight": 1,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":gamma()",
"line": undefined,
"name": "gamma()",
"selfWeight": 827,
"totalWeight": 838,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const",
"line": undefined,
"name": "dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const",
"selfWeight": 0,
"totalWeight": 4,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)",
"line": undefined,
"name": "dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)",
"selfWeight": 0,
"totalWeight": 4,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
"line": undefined,
"name": "dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
"line": undefined,
"name": "mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const",
"line": undefined,
"name": "mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
"line": undefined,
"name": "invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
"line": undefined,
"name": "invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
"line": undefined,
"name": "dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
"line": undefined,
"name": "dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const",
"line": undefined,
"name": "dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
"line": undefined,
"name": "dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
"line": undefined,
"name": "invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*)",
"line": undefined,
"name": "dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::RuntimeState::findPrebuiltLoader(char const*) const",
"line": undefined,
"name": "dyld4::RuntimeState::findPrebuiltLoader(char const*) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const",
"line": undefined,
"name": "dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
"line": undefined,
"name": "dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
"line": undefined,
"name": "invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const",
"line": undefined,
"name": "dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld3::stat(char const*, stat*)",
"line": undefined,
"name": "dyld3::stat(char const*, stat*)",
"selfWeight": 0,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":stat",
"line": undefined,
"name": "stat",
"selfWeight": 3,
"totalWeight": 3,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::APIs::runAllInitializersForMain()",
"line": undefined,
"name": "dyld4::APIs::runAllInitializersForMain()",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const",
"line": undefined,
"name": "dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const",
"line": undefined,
"name": "dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const",
"line": undefined,
"name": "dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const",
"line": undefined,
"name": "dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const",
"line": undefined,
"name": "dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
"line": undefined,
"name": "dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
"line": undefined,
"name": "dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const",
"line": undefined,
"name": "dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
"line": undefined,
"name": "invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
"line": undefined,
"name": "invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
"selfWeight": 0,
"totalWeight": 1,
},
Frame {
"col": undefined,
"file": undefined,
"key": ":_GLOBAL__sub_I_stdlib_typed_new.cpp",
"line": undefined,
"name": "_GLOBAL__sub_I_stdlib_typed_new.cpp",
"selfWeight": 1,
"totalWeight": 1,
},
],
"name": "simple-time-profile-deep-copy.txt",
"stacks": Array [
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 2.00ms",
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 4.00ms",
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear;small_malloc_from_free_list 1.00ms",
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear 1.00ms",
"start;main;delta();alpha();leakMemory();_malloc_zone_malloc 1.00ms",
"start;main;delta();alpha();_malloc_zone_malloc 2.00ms",
"start;main;delta();alpha() 786.00ms",
"start;main;delta();beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 5.00ms",
"start;main;delta();beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;rack_get_thread_index 1.00ms",
"start;main;delta();beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 3.00ms",
"start;main;delta();beta();leakMemory();szone_malloc_should_clear 2.00ms",
"start;main;delta();beta();leakMemory();nanov2_malloc_type 1.00ms",
"start;main;delta();beta();leakMemory();DYLD-STUB$$malloc 1.00ms",
"start;main;delta();beta();leakMemory() 1.00ms",
"start;main;delta();beta();nanov2_malloc_type 2.00ms",
"start;main;delta();beta();_malloc_zone_malloc 1.00ms",
"start;main;delta();beta() 778.00ms",
"start;main;delta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;mvm_allocate_pages_plat;_kernelrpc_mach_vm_map_trap 1.00ms",
"start;main;delta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 3.00ms",
"start;main;delta();leakMemory();szone_malloc_should_clear 3.00ms",
"start;main;delta();leakMemory();small_malloc_should_clear 2.00ms",
"start;main;delta();leakMemory();_malloc_zone_malloc 1.00ms",
"start;main;delta();_malloc_zone_malloc 3.00ms",
"start;main;delta() 395.00ms",
"start;main;gamma();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 3.00ms",
"start;main;gamma();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 1.00ms",
"start;main;gamma();leakMemory();szone_malloc_should_clear;rack_get_thread_index 1.00ms",
"start;main;gamma();leakMemory();small_malloc_should_clear 1.00ms",
"start;main;gamma();leakMemory();_malloc_zone_malloc 1.00ms",
"start;main;gamma();leakMemory();nanov2_malloc_type 1.00ms",
"start;main;gamma();leakMemory() 1.00ms",
"start;main;gamma();_malloc_zone_malloc 2.00ms",
"start;main;gamma() 827.00ms",
"start;main;beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 4.00ms",
"start;main;beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;rack_get_thread_index 1.00ms",
"start;main;beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 1.00ms",
"start;main;beta();leakMemory();szone_malloc_should_clear;rack_get_thread_index 1.00ms",
"start;main;beta();leakMemory();nanov2_malloc_type 1.00ms",
"start;main;beta();leakMemory();small_malloc_should_clear 1.00ms",
"start;main;beta();_malloc_zone_malloc 1.00ms",
"start;main;beta() 824.00ms",
"start;main;alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 5.00ms",
"start;main;alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;rack_get_thread_index 2.00ms",
"start;main;alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 3.00ms",
"start;main;alpha();leakMemory();szone_malloc_should_clear 1.00ms",
"start;main;alpha();leakMemory();nanov2_malloc_type 1.00ms",
"start;main;alpha();leakMemory();small_malloc_should_clear 1.00ms",
"start;main;alpha();leakMemory();_malloc_zone_malloc 1.00ms",
"start;main;alpha();_malloc_zone_malloc 1.00ms",
"start;main;alpha() 788.00ms",
"start;dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const;dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*);dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&);mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const;mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const;invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const;invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&);dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&);dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer);dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const;dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer);invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&);dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*);dyld4::RuntimeState::findPrebuiltLoader(char const*) const;dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const;dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const;dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const;invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const;dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const;dyld3::stat(char const*, stat*);stat 3.00ms",
"start;dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const;dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*);dyld4::APIs::runAllInitializersForMain();dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const;dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const;dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const;dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const;dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const;dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const;dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const;dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const;dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const;dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const;invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const;invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const;_GLOBAL__sub_I_stdlib_typed_new.cpp 1.00ms",
],
}
`;
exports[`importFromInstrumentsDeepCopy time profile, version 16: indexToView 1`] = `0`;
exports[`importFromInstrumentsDeepCopy time profile, version 16: profileGroup.name 1`] = `"simple-time-profile-deep-copy.txt"`;
exports[`importFromInstrumentsDeepCopy time profile: indexToView 1`] = `0`;
exports[`importFromInstrumentsDeepCopy time profile: profileGroup.name 1`] = `"simple-time-profile-deep-copy.txt"`;
@@ -172,6 +172,68 @@ exports[`importTraceEvents bad E events: indexToView 1`] = `0`;
exports[`importTraceEvents bad E events: profileGroup.name 1`] = `"too-many-end-events.json"`;
exports[`importTraceEvents different number of start and end calls to same function at same timestamp 1`] = `
Object {
"frames": Array [
Frame {
"col": undefined,
"file": undefined,
"key": "anonymous",
"line": undefined,
"name": "anonymous",
"selfWeight": 1,
"totalWeight": 5,
},
Frame {
"col": undefined,
"file": undefined,
"key": "anonymous {\\"parent\\":1}",
"line": undefined,
"name": "anonymous {\\"parent\\":1}",
"selfWeight": 0,
"totalWeight": 4,
},
Frame {
"col": undefined,
"file": undefined,
"key": "function1 {\\"parent\\":2}",
"line": undefined,
"name": "function1 {\\"parent\\":2}",
"selfWeight": 0,
"totalWeight": 2,
},
Frame {
"col": undefined,
"file": undefined,
"key": "anonymous {\\"parent\\":3}",
"line": undefined,
"name": "anonymous {\\"parent\\":3}",
"selfWeight": 2,
"totalWeight": 2,
},
Frame {
"col": undefined,
"file": undefined,
"key": "anonymous {\\"parent\\":8}",
"line": undefined,
"name": "anonymous {\\"parent\\":8}",
"selfWeight": 2,
"totalWeight": 2,
},
],
"name": "pid 0, tid 0",
"stacks": Array [
"anonymous 1.00µs",
"anonymous;anonymous {\\"parent\\":1};function1 {\\"parent\\":2};anonymous {\\"parent\\":3} 2.00µs",
"anonymous;anonymous {\\"parent\\":1};anonymous {\\"parent\\":8} 2.00µs",
],
}
`;
exports[`importTraceEvents different number of start and end calls to same function at same timestamp: indexToView 1`] = `0`;
exports[`importTraceEvents different number of start and end calls to same function at same timestamp: profileGroup.name 1`] = `"simultaneous-anonymous-calls.json"`;
exports[`importTraceEvents end event with empty stack 1`] = `
Object {
"frames": Array [
@@ -342,6 +404,41 @@ exports[`importTraceEvents event reordering name match: indexToView 1`] = `0`;
exports[`importTraceEvents event reordering name match: profileGroup.name 1`] = `"event-reordering-name-match.json"`;
exports[`importTraceEvents hermes profile with multiple frames 1`] = `
Object {
"frames": Array [
Frame {
"col": null,
"file": null,
"key": "[root]:null:null:null",
"line": null,
"name": "[root]",
"selfWeight": 2,
"totalWeight": 14,
},
Frame {
"col": 12,
"file": "/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"key": "beta:/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js:54:12",
"line": 54,
"name": "beta",
"selfWeight": 12,
"totalWeight": 12,
},
],
"name": "pid 0, tid 0",
"stacks": Array [
"[root] 1.00µs",
"[root];beta 12.00µs",
"[root] 1.00µs",
],
}
`;
exports[`importTraceEvents hermes profile with multiple frames: indexToView 1`] = `0`;
exports[`importTraceEvents hermes profile with multiple frames: profileGroup.name 1`] = `"simple-hermes.json"`;
exports[`importTraceEvents invalid x nesting 1`] = `
Object {
"frames": Array [
@@ -468,6 +565,81 @@ exports[`importTraceEvents mismatched name: indexToView 1`] = `0`;
exports[`importTraceEvents mismatched name: profileGroup.name 1`] = `"mismatched-name.json"`;
exports[`importTraceEvents multi-thread profile with samples 1`] = `
Object {
"frames": Array [
Frame {
"col": undefined,
"file": undefined,
"key": "[root]:root",
"line": undefined,
"name": "[root]",
"selfWeight": 20770,
"totalWeight": 34096,
},
Frame {
"col": undefined,
"file": undefined,
"key": "function1:JavaScript",
"line": undefined,
"name": "function1",
"selfWeight": 13326,
"totalWeight": 13326,
},
],
"name": "hermes (pid 7512), mqt_js (tid 1)",
"stacks": Array [
"[root] 20.77ms",
"[root];function1 13.33ms",
],
}
`;
exports[`importTraceEvents multi-thread profile with samples 2`] = `
Object {
"frames": Array [
Frame {
"col": undefined,
"file": undefined,
"key": "[root thread 2]:root",
"line": undefined,
"name": "[root thread 2]",
"selfWeight": 30770,
"totalWeight": 54096,
},
Frame {
"col": undefined,
"file": undefined,
"key": "function3:JavaScript",
"line": undefined,
"name": "function3",
"selfWeight": 13326,
"totalWeight": 13326,
},
Frame {
"col": undefined,
"file": undefined,
"key": "function4:Metadata",
"line": undefined,
"name": "function4",
"selfWeight": 10000,
"totalWeight": 10000,
},
],
"name": "hermes (pid 7512, tid 2)",
"stacks": Array [
"[root thread 2] 20.77ms",
"[root thread 2];function3 13.33ms",
"[root thread 2];function4 10.00ms",
"[root thread 2] 10.00ms",
],
}
`;
exports[`importTraceEvents multi-thread profile with samples: indexToView 1`] = `0`;
exports[`importTraceEvents multi-thread profile with samples: profileGroup.name 1`] = `"multi-thread-with-samples.json"`;
exports[`importTraceEvents multiprocess 1`] = `
Object {
"frames": Array [
@@ -1178,6 +1350,41 @@ Object {
}
`;
exports[`importTraceEvents simple hermes profile 1`] = `
Object {
"frames": Array [
Frame {
"col": null,
"file": null,
"key": "[root]:null:null:null",
"line": null,
"name": "[root]",
"selfWeight": 2,
"totalWeight": 14,
},
Frame {
"col": 12,
"file": "/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js",
"key": "beta:/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js:54:12",
"line": 54,
"name": "beta",
"selfWeight": 12,
"totalWeight": 12,
},
],
"name": "pid 0, tid 0",
"stacks": Array [
"[root] 1.00µs",
"[root];beta 12.00µs",
"[root] 1.00µs",
],
}
`;
exports[`importTraceEvents simple hermes profile: indexToView 1`] = `0`;
exports[`importTraceEvents simple hermes profile: profileGroup.name 1`] = `"simple-hermes.json"`;
exports[`importTraceEvents simple object 1`] = `
Object {
"frames": Array [
@@ -1224,6 +1431,70 @@ exports[`importTraceEvents simple object: indexToView 1`] = `0`;
exports[`importTraceEvents simple object: profileGroup.name 1`] = `"simple-object.json"`;
exports[`importTraceEvents simple profile with samples 1`] = `
Object {
"frames": Array [
Frame {
"col": undefined,
"file": undefined,
"key": "[root]:root",
"line": undefined,
"name": "[root]",
"selfWeight": 30779,
"totalWeight": 64710,
},
Frame {
"col": undefined,
"file": undefined,
"key": "function1(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:1:1):JavaScript",
"line": undefined,
"name": "function1(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:1:1)",
"selfWeight": 13326,
"totalWeight": 13326,
},
Frame {
"col": undefined,
"file": undefined,
"key": "function2(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:418874:4):JavaScript",
"line": undefined,
"name": "function2(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:418874:4)",
"selfWeight": 0,
"totalWeight": 10605,
},
Frame {
"col": undefined,
"file": undefined,
"key": "function3(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:17:3):JavaScript",
"line": undefined,
"name": "function3(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:17:3)",
"selfWeight": 10605,
"totalWeight": 10605,
},
Frame {
"col": undefined,
"file": undefined,
"key": "[GC Young Gen]:Metadata",
"line": undefined,
"name": "[GC Young Gen]",
"selfWeight": 10000,
"totalWeight": 10000,
},
],
"name": "hermes (pid 7512), mqt_js (tid 7695)",
"stacks": Array [
"[root] 20.77ms",
"[root];function1(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:1:1) 13.33ms",
"[root];function2(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:418874:4);function3(http://localhost:8081/index.bundle?platform=android&dev=false&minify=false&app=org.toshi&modulesOnly=false&runModule=true:17:3) 10.61ms",
"[root] 10.01ms",
"[root];[GC Young Gen] 10.00ms",
],
}
`;
exports[`importTraceEvents simple profile with samples: indexToView 1`] = `0`;
exports[`importTraceEvents simple profile with samples: profileGroup.name 1`] = `"simple-with-samples.json"`;
exports[`importTraceEvents simple: indexToView 1`] = `0`;
exports[`importTraceEvents simple: profileGroup.name 1`] = `"simple.json"`;
+8 -2
View File
@@ -95,7 +95,10 @@ class CallGraph {
private totalWeights = new Map<Frame, number>()
private childrenTotalWeights = new Map<Frame, Map<Frame, number>>()
constructor(private fileName: string, private fieldName: string) {}
constructor(
private fileName: string,
private fieldName: string,
) {}
private getOrInsertFrame(info: FrameInfo): Frame {
return Frame.getOrInsert(this.frameSet, info)
@@ -345,7 +348,10 @@ class CallgrindParser {
private savedFileNames: {[id: string]: string} = {}
private savedFunctionNames: {[id: string]: string} = {}
constructor(contents: TextFileContent, private importedFileName: string) {
constructor(
contents: TextFileContent,
private importedFileName: string,
) {
this.lines = [...contents.splitLines()]
this.lineNum = 0
}
-17
View File
@@ -1,17 +0,0 @@
// The bits of this API that we care about. This is implemented by WebKitEntry
// https://wicg.github.io/entries-api/#api-entry
export interface FileSystemDirectoryReader {
readEntries(cb: (entries: FileSystemEntry[]) => void, error: (err: Error) => void): void
}
export interface FileSystemEntry {
readonly isFile: boolean
readonly isDirectory: boolean
readonly name: string
readonly fullPath: string
}
export interface FileSystemDirectoryEntry extends FileSystemEntry {
createReader(): FileSystemDirectoryReader
}
export interface FileSystemFileEntry extends FileSystemEntry {
file(cb: (file: File) => void, errCb: (err: Error) => void): void
}
+3 -4
View File
@@ -1,5 +1,4 @@
import {Profile, ProfileGroup} from '../lib/profile'
import {FileSystemDirectoryEntry} from './file-system-entry'
import {
importFromChromeCPUProfile,
@@ -23,7 +22,7 @@ import {decodeBase64} from '../lib/utils'
import {importFromChromeHeapProfile} from './v8heapalloc'
import {isTraceEventFormatted, importTraceEvents} from './trace-event'
import {importFromCallgrind} from './callgrind'
import {importFromPapyrus} from "./papyrus";
import {importFromPapyrus} from './papyrus'
export async function importProfileGroupFromText(
fileName: string,
@@ -189,8 +188,8 @@ async function _importProfileGroup(dataSource: ProfileDataSource): Promise<Profi
return toGroup(importFromInstrumentsDeepCopy(contents))
}
if (/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(contents.firstChunk())){
console.log("Importing as Papyrus profile")
if (/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(contents.firstChunk())) {
console.log('Importing as Papyrus profile')
return toGroup(importFromPapyrus(contents))
}
+19 -5
View File
@@ -3,7 +3,6 @@ import * as path from 'path'
import {dumpProfile, checkProfileSnapshot} from '../lib/test-utils'
import * as JSZip from 'jszip'
import {FileSystemEntry} from './file-system-entry'
import {importFromFileSystemDirectoryEntry} from '.'
describe('importFromInstrumentsDeepCopy', () => {
@@ -13,6 +12,12 @@ describe('importFromInstrumentsDeepCopy', () => {
)
})
test('time profile, version 16', async () => {
await checkProfileSnapshot(
'./sample/profiles/Instruments/16.0/simple-time-profile-deep-copy.txt',
)
})
test('allocations profile', async () => {
await checkProfileSnapshot(
'./sample/profiles/Instruments/7.3.1/random-allocations-deep-copy.txt',
@@ -24,7 +29,10 @@ describe('importFromInstrumentsDeepCopy', () => {
})
})
class ZipBackedFileSystemEntry implements FileSystemEntry {
// This is a bit of a weird type signature. I'm making this almost a
// FileSystemEntry, but ignoring the parts of the API I don't use anywhere and
// are a pain to implement.
class ZipBackedFileSystemEntry implements Omit<FileSystemEntry, 'filesystem' | 'getParent'> {
readonly isFile: boolean
readonly isDirectory: boolean
readonly name: string
@@ -33,7 +41,10 @@ class ZipBackedFileSystemEntry implements FileSystemEntry {
private zipDir: any | null
private zipFile: JSZip.JSZipObject | null
constructor(private zip: JSZip, fullPath: string) {
constructor(
private zip: JSZip,
fullPath: string,
) {
this.fullPath = fullPath
this.zipFile = zip.file(fullPath)
@@ -73,7 +84,7 @@ class ZipBackedFileSystemEntry implements FileSystemEntry {
const ret: FileSystemEntry[] = []
this.zipDir.forEach((relativePath: string, file: {name: string}) => {
if (relativePath.split('/').length === (relativePath.endsWith('/') ? 2 : 1)) {
ret.push(new ZipBackedFileSystemEntry(this.zip, file.name))
ret.push(new ZipBackedFileSystemEntry(this.zip, file.name) as any as FileSystemEntry)
}
})
cb(ret)
@@ -90,7 +101,10 @@ describe('importFromInstrumentsTrace', () => {
JSZip.loadAsync(data).then(resolve)
})
})
const root = new ZipBackedFileSystemEntry(zip, 'simple-time-profile.trace')
const root: FileSystemDirectoryEntry = new ZipBackedFileSystemEntry(
zip,
'simple-time-profile.trace',
) as any
const profileGroup = await importFromFileSystemDirectoryEntry(root)
const profile = profileGroup.profiles[profileGroup.indexToView]
expect(dumpProfile(profile)).toMatchSnapshot()
+6 -2
View File
@@ -10,7 +10,6 @@ import {
} from '../lib/profile'
import {sortBy, getOrThrow, getOrInsert, lastOf, getOrElse, zeroPad} from '../lib/utils'
import {ByteFormatter, TimeFormatter} from '../lib/value-formatters'
import {FileSystemDirectoryEntry, FileSystemEntry, FileSystemFileEntry} from './file-system-entry'
import {MaybeCompressedDataReader, TextFileContent} from './utils'
function parseTSV<T>(contents: TextFileContent): T[] {
@@ -39,12 +38,14 @@ interface PastedTimeProfileRow {
Weight?: string
'Source Path'?: string
'Symbol Name'?: string
'Symbol Names'?: string
}
interface PastedAllocationsProfileRow {
'Bytes Used'?: string
'Source Path'?: string
'Symbol Name'?: string
'Symbol Names'?: string
}
interface FrameInfoWithWeight extends FrameInfo {
@@ -109,9 +110,12 @@ export function importFromInstrumentsDeepCopy(contents: TextFileContent): Profil
const stack: FrameInfoWithWeight[] = []
let cumulativeValue: number = 0
let leadingFirstRowSpaces: number = rows[0]['Symbol Names']
? rows[0]['Symbol Names'].lastIndexOf(' ') + 1
: 0
for (let row of rows) {
const symbolName = row['Symbol Name']
const symbolName = row['Symbol Name'] || row['Symbol Names']?.slice(leadingFirstRowSpaces)
if (!symbolName) continue
const trimmedSymbolName = symbolName.trim()
let stackDepth = symbolName.length - trimmedSymbolName.length
+11 -1
View File
@@ -129,6 +129,11 @@ export function importAsPprofProfile(rawProfile: ArrayBuffer): Profile | null {
}))
const sampleTypeIndex = getSampleTypeIndex(protoProfile)
if (sampleTypeIndex < 0 || sampleTypeIndex >= sampleTypes.length) {
return null
}
const sampleType = sampleTypes[sampleTypeIndex]
const profileBuilder = new StackListProfileBuilder()
@@ -149,7 +154,12 @@ export function importAsPprofProfile(rawProfile: ArrayBuffer): Profile | null {
for (let s of protoProfile.sample) {
const stack = s.locationId ? s.locationId.map(l => frameByLocationID.get(i32(l))) : []
stack.reverse()
const value = s.value![sampleTypeIndex]
if (s.value == null || s.value.length <= sampleTypeIndex) {
return null
}
const value = s.value[sampleTypeIndex]
profileBuilder.appendSampleWithWeight(stack.filter(f => f != null) as FrameInfo[], +value)
}
+6 -4
View File
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { importProfileGroupFromText } from '.'
import {readFileSync} from 'fs'
import {importProfileGroupFromText} from '.'
import {checkProfileSnapshot} from '../lib/test-utils'
test('importFromStackprof', async () => {
@@ -20,9 +20,11 @@ describe('importCpuProfileWithProperWeights', () => {
})
test('uses samples count for weight when importing cpu profile', async () => {
const profileFile = readFileSync('./sample/profiles/stackprof/simple-cpu-stackprof.json')
const profileGroup = await importProfileGroupFromText('simple-cpu-stackprof.json', profileFile.toString())
const profileGroup = await importProfileGroupFromText(
'simple-cpu-stackprof.json',
profileFile.toString(),
)
expect(profileGroup).not.toBeNull()
if (profileGroup) {
+2 -2
View File
@@ -33,9 +33,9 @@ export function importFromStackprof(stackprofProfile: StackprofProfile): Profile
let stack: FrameInfo[] = []
for (let j = 0; j < stackHeight; j++) {
const id = raw[i++]
let frameName = frames[id].name;
let frameName = frames[id].name
if (frameName == null) {
frameName = '(unknown)';
frameName = '(unknown)'
}
const frame = {
key: id,
+20
View File
@@ -47,6 +47,10 @@ test('importTraceEvents bad E events', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/too-many-end-events.json')
})
test('importTraceEvents different number of start and end calls to same function at same timestamp', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/simultaneous-anonymous-calls.json')
})
test('importTraceEvents event re-ordering', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/must-retain-original-order.json')
})
@@ -118,3 +122,19 @@ test('importTraceEvents invalid x nesting', async () => {
test('importTraceEvents event reordering name match', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/event-reordering-name-match.json')
})
test('importTraceEvents simple hermes profile', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/simple-hermes.json')
})
test('importTraceEvents hermes profile with multiple frames', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/simple-hermes.json')
})
test('importTraceEvents simple profile with samples', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/simple-with-samples.json')
})
test('importTraceEvents multi-thread profile with samples', async () => {
await checkProfileSnapshot('./sample/profiles/trace-event/multi-thread-with-samples.json')
})
+455 -148
View File
@@ -1,5 +1,11 @@
import {sortBy, zeroPad, getOrInsert, lastOf} from '../lib/utils'
import {ProfileGroup, CallTreeProfileBuilder, FrameInfo, Profile} from '../lib/profile'
import {
ProfileGroup,
CallTreeProfileBuilder,
FrameInfo,
Profile,
StackListProfileBuilder,
} from '../lib/profile'
import {TimeFormatter} from '../lib/value-formatters'
// This file concerns import from the "Trace Event Format", authored by Google
@@ -42,12 +48,46 @@ interface TraceEvent {
cat?: string
// Any arguments provided for the event. Some of the event types have required argument fields, otherwise, you can put any information you wish in here. The arguments are displayed in Trace Viewer when you view an event in the analysis section.
args: any
args?: any
// A fixed color name to associate with the event. If provided, cname must be one of the names listed in trace-viewer's base color scheme's reserved color names list
cname?: string
}
enum ExporterSource {
HERMES = 'HERMES',
UNKNOWN = 'UNKNOWN',
}
interface HermesTraceEventArgs {
line: number | null
column: number | null
funcLine?: string | null
funcColumn?: string | null
name: string
category: string
parent?: number
url: string | null
params: string | null
allocatedCategory: string
allocatedName: string
}
const requiredHermesArguments: Array<keyof HermesTraceEventArgs> = [
'line',
'column',
'name',
'category',
'url',
'params',
'allocatedCategory',
'allocatedName',
]
type HermesTraceEvent = TraceEvent & {
args: HermesTraceEventArgs
}
interface BTraceEvent extends TraceEvent {
ph: 'B'
}
@@ -65,16 +105,53 @@ interface XTraceEvent extends TraceEvent {
// The trace format supports a number of event types that we ignore.
type ImportableTraceEvent = BTraceEvent | ETraceEvent | XTraceEvent
interface StackFrame {
line: string
column: string
funcLine: string
funcColumn: string
name: string
category: string
// A parent function may or may not exist
parent?: number
}
interface Sample {
cpu: string
name: string
ts: string
pid: number
tid: string
weight: string
// Will refer to an element in the stackFrames object
sf: number
stackFrameData?: StackFrame
}
interface TraceWithSamples {
traceEvents: TraceEvent[]
samples: Sample[]
stackFrames: {[key: string]: StackFrame}
}
interface TraceEventObject {
traceEvents: TraceEvent[]
}
type Trace = TraceEvent[] | TraceEventObject | TraceWithSamples
function pidTidKey(pid: number, tid: number): string {
// We zero-pad the PID and TID to make sorting them by pid/tid pair later easier.
return `${zeroPad('' + pid, 10)}:${zeroPad('' + tid, 10)}`
}
function partitionByPidTid(events: ImportableTraceEvent[]): Map<string, ImportableTraceEvent[]> {
const map = new Map<string, ImportableTraceEvent[]>()
function partitionByPidTid<T extends {tid: number | string; pid: number | string}>(
events: T[],
): Map<string, T[]> {
const map = new Map<string, T[]>()
for (let ev of events) {
const list = getOrInsert(map, pidTidKey(ev.pid, ev.tid), () => [])
const list = getOrInsert(map, pidTidKey(Number(ev.pid), Number(ev.tid)), () => [])
list.push(ev)
}
@@ -103,12 +180,12 @@ function selectQueueToTakeFromNext(
// If we got here, the 'B' event queue and the 'E' event queue have events at
// the front with equal timestamps.
// If the front of the 'E' queue matches the front of the 'B' queue by name,
// If the front of the 'E' queue matches the front of the 'B' queue by key,
// then it means we have a zero duration event. Process the 'B' queue first
// to ensure it opens before we try to close it.
//
// Otherwise, process the 'E' queue first.
return bFront.name === eFront.name ? 'B' : 'E'
return getEventId(bFront) === getEventId(eFront) ? 'B' : 'E'
}
function convertToEventQueues(events: ImportableTraceEvent[]): [BTraceEvent[], ETraceEvent[]] {
@@ -228,126 +305,221 @@ function getThreadNamesByPidTid(events: TraceEvent[]): Map<string, string> {
return threadNameByPidTid
}
function keyForEvent(event: TraceEvent): string {
let name = `${event.name || '(unnamed)'}`
if (event.args) {
name += ` ${JSON.stringify(event.args)}`
}
return name
function getEventName(event: TraceEvent): string {
return `${event.name || '(unnamed)'}`
}
function frameInfoForEvent(event: TraceEvent): FrameInfo {
const key = keyForEvent(event)
/**
* Attempt to construct a unique identifier for an event. Note that this
* is different from the frame key, as in some cases we don't want to include
* some arguments to allow from frame grouping (e.g. parent in the case of
* hermes profiles)
*/
function getEventId(event: TraceEvent): string {
let key = getEventName(event)
if (event.args) {
key += ` ${JSON.stringify(event.args)}`
}
return key
}
function frameInfoForEvent(
event: TraceEvent,
exporterSource: ExporterSource = ExporterSource.UNKNOWN,
): FrameInfo {
// In Hermes profiles we have additional guaranteed metadata we can use to
// more accurately populate profiles with info such as line + col number
if (exporterSource === ExporterSource.HERMES) {
const hermesFrameKey = `${event.name}:${event.args.url}:${event.args.line}:${event.args.column}`
return {
name: getEventName(event),
key: hermesFrameKey,
file: event.args.url,
line: event.args.line,
col: event.args.column,
}
}
const key = getEventId(event)
return {
name: key,
key: key,
}
}
function eventListToProfileGroup(events: TraceEvent[]): ProfileGroup {
const importableEvents = filterIgnoredEventTypes(events)
const partitioned = partitionByPidTid(importableEvents)
function getProfileName(
processName: string | undefined,
threadName: string | undefined,
pid: number,
tid: number,
): string {
if (processName != null && threadName != null) {
return `${processName} (pid ${pid}), ${threadName} (tid ${tid})`
} else if (processName != null) {
return `${processName} (pid ${pid}, tid ${tid})`
} else if (threadName != null) {
return `${threadName} (pid ${pid}, tid ${tid})`
} else {
return `pid ${pid}, tid ${tid}`
}
}
function getProfileNamesFromSamples(
events: TraceEvent[],
partitionedSamples: Map<string, Sample[]>,
): Map<string, string> {
const processNamesByPid = getProcessNamesByPid(events)
const threadNamesByPidTid = getThreadNamesByPidTid(events)
const profilePairs: [string, Profile][] = []
const profileNamesByPidTid = new Map<string, string>()
partitioned.forEach(eventsForThread => {
if (eventsForThread.length === 0) return
partitionedSamples.forEach(samples => {
if (samples.length === 0) return
const {pid, tid} = eventsForThread[0]
const profile = new CallTreeProfileBuilder()
profile.setValueFormatter(new TimeFormatter('microseconds'))
const pid = Number(samples[0].pid)
const tid = Number(samples[0].tid)
const profileKey = pidTidKey(pid, tid)
const processName = processNamesByPid.get(pid)
const threadName = threadNamesByPidTid.get(pidTidKey(pid, tid))
const threadName = threadNamesByPidTid.get(profileKey)
const profileName = getProfileName(processName, threadName, pid, tid)
if (processName != null && threadName != null) {
profile.setName(`${processName} (pid ${pid}), ${threadName} (tid ${tid})`)
} else if (processName != null) {
profile.setName(`${processName} (pid ${pid}, tid ${tid})`)
} else if (threadName != null) {
profile.setName(`${threadName} (pid ${pid}, tid ${tid})`)
} else {
profile.setName(`pid ${pid}, tid ${tid}`)
profileNamesByPidTid.set(profileKey, profileName)
})
return profileNamesByPidTid
}
function getProfileNamesFromTraceEvents(
events: TraceEvent[],
partitionedTraceEvents: Map<string, TraceEvent[]>,
): Map<string, string> {
const processNamesByPid = getProcessNamesByPid(events)
const threadNamesByPidTid = getThreadNamesByPidTid(events)
const profileNamesByPidTid = new Map<string, string>()
partitionedTraceEvents.forEach(importableEvents => {
if (importableEvents.length === 0) return
const {pid, tid} = importableEvents[0]
const profileKey = pidTidKey(pid, tid)
const processName = processNamesByPid.get(pid)
const threadName = threadNamesByPidTid.get(profileKey)
const profileName = getProfileName(processName, threadName, pid, tid)
profileNamesByPidTid.set(profileKey, profileName)
})
return profileNamesByPidTid
}
function eventListToProfile(
importableEvents: ImportableTraceEvent[],
name: string,
exporterSource: ExporterSource = ExporterSource.UNKNOWN,
): Profile {
// The trace event format is hard to deal with because it specifically
// allows events to be recorded out of order, *but* event ordering is still
// important for events with the same timestamp. Because of this, rather
// than thinking about the entire event stream as a single queue of events,
// we're going to first construct two time-ordered lists of events:
//
// 1. ts ordered queue of 'B' events
// 2. ts ordered queue of 'E' events
//
// We deal with 'X' events by converting them to one entry in the 'B' event
// queue and one entry in the 'E' event queue.
//
// The high level goal is to deal with 'B' events in 'ts' order, breaking
// ties by the order the events occurred in the file, and deal with 'E'
// events in 'ts' order, breaking ties in whatever order causes the 'E'
// events to match whatever is on the top of the stack.
const [bEventQueue, eEventQueue] = convertToEventQueues(importableEvents)
const profileBuilder = new CallTreeProfileBuilder()
profileBuilder.setValueFormatter(new TimeFormatter('microseconds'))
profileBuilder.setName(name)
const frameStack: BTraceEvent[] = []
const enterFrame = (b: BTraceEvent) => {
frameStack.push(b)
profileBuilder.enterFrame(frameInfoForEvent(b, exporterSource), b.ts)
}
const tryToLeaveFrame = (e: ETraceEvent) => {
const b = lastOf(frameStack)
if (b == null) {
console.warn(
`Tried to end frame "${
frameInfoForEvent(e, exporterSource).key
}", but the stack was empty. Doing nothing instead.`,
)
return
}
// The trace event format is hard to deal with because it specifically
// allows events to be recorded out of order, *but* event ordering is still
// important for events with the same timestamp. Because of this, rather
// than thinking about the entire event stream as a single queue of events,
// we're going to first construct two time-ordered lists of events:
//
// 1. ts ordered queue of 'B' events
// 2. ts ordered queue of 'E' events
//
// We deal with 'X' events by converting them to one entry in the 'B' event
// queue and one entry in the 'E' event queue.
//
// The high level goal is to deal with 'B' events in 'ts' order, breaking
// ties by the order the events occurred in the file, and deal with 'E'
// events in 'ts' order, breaking ties in whatever order causes the 'E'
// events to match whatever is on the top of the stack.
const [bEventQueue, eEventQueue] = convertToEventQueues(eventsForThread)
const eFrameInfo = frameInfoForEvent(e, exporterSource)
const bFrameInfo = frameInfoForEvent(b, exporterSource)
const frameStack: BTraceEvent[] = []
const enterFrame = (b: BTraceEvent) => {
frameStack.push(b)
profile.enterFrame(frameInfoForEvent(b), b.ts)
if (e.name !== b.name) {
console.warn(
`ts=${e.ts}: Tried to end "${eFrameInfo.key}" when "${bFrameInfo.key}" was on the top of the stack. Doing nothing instead.`,
)
return
}
const tryToLeaveFrame = (e: ETraceEvent) => {
const b = lastOf(frameStack)
if (b == null) {
console.warn(
`Tried to end frame "${
frameInfoForEvent(e).key
}", but the stack was empty. Doing nothing instead.`,
)
return
}
const eFrameInfo = frameInfoForEvent(e)
const bFrameInfo = frameInfoForEvent(b)
if (e.name !== b.name) {
console.warn(
`ts=${e.ts}: Tried to end "${eFrameInfo.key}" when "${bFrameInfo.key}" was on the top of the stack. Doing nothing instead.`,
)
return
}
if (eFrameInfo.key !== bFrameInfo.key) {
console.warn(
`ts=${e.ts}: Tried to end "${eFrameInfo.key}" when "${bFrameInfo.key}" was on the top of the stack. Ending ${bFrameInfo.key} instead.`,
)
}
frameStack.pop()
profile.leaveFrame(bFrameInfo, e.ts)
if (eFrameInfo.key !== bFrameInfo.key) {
console.warn(
`ts=${e.ts}: Tried to end "${eFrameInfo.key}" when "${bFrameInfo.key}" was on the top of the stack. Ending ${bFrameInfo.key} instead.`,
)
}
while (bEventQueue.length > 0 || eEventQueue.length > 0) {
const queueName = selectQueueToTakeFromNext(bEventQueue, eEventQueue)
switch (queueName) {
case 'B': {
enterFrame(bEventQueue.shift()!)
break
}
case 'E': {
// Before we take the first event in the 'E' queue, let's first see if
// there are any e events that exactly match the top of the stack.
// We'll prioritize first by key, then by name if we can't find a key
// match.
const stackTop = lastOf(frameStack)
if (stackTop != null) {
const bFrameInfo = frameInfoForEvent(stackTop)
frameStack.pop()
profileBuilder.leaveFrame(bFrameInfo, e.ts)
}
let swapped: boolean = false
while (bEventQueue.length > 0 || eEventQueue.length > 0) {
const queueName = selectQueueToTakeFromNext(bEventQueue, eEventQueue)
switch (queueName) {
case 'B': {
enterFrame(bEventQueue.shift()!)
break
}
case 'E': {
// Before we take the first event in the 'E' queue, let's first see if
// there are any e events that exactly match the top of the stack.
// We'll prioritize first by key, then by name if we can't find a key
// match.
const stackTop = lastOf(frameStack)
if (stackTop != null) {
const bFrameInfo = frameInfoForEvent(stackTop, exporterSource)
let swapped: boolean = false
for (let i = 1; i < eEventQueue.length; i++) {
const eEvent = eEventQueue[i]
if (eEvent.ts > eEventQueue[0].ts) {
// Only consider 'E' events with the same ts as the front of the queue.
break
}
const eFrameInfo = frameInfoForEvent(eEvent, exporterSource)
if (bFrameInfo.key === eFrameInfo.key) {
// We have a match! Process this one first.
const temp = eEventQueue[0]
eEventQueue[0] = eEventQueue[i]
eEventQueue[i] = temp
swapped = true
break
}
}
if (!swapped) {
// There was no key match, let's see if we can find a name match
for (let i = 1; i < eEventQueue.length; i++) {
const eEvent = eEventQueue[i]
if (eEvent.ts > eEventQueue[0].ts) {
@@ -355,8 +527,7 @@ function eventListToProfileGroup(events: TraceEvent[]): ProfileGroup {
break
}
const eFrameInfo = frameInfoForEvent(eEvent)
if (bFrameInfo.key === eFrameInfo.key) {
if (eEvent.name === stackTop.name) {
// We have a match! Process this one first.
const temp = eEventQueue[0]
eEventQueue[0] = eEventQueue[i]
@@ -365,50 +536,160 @@ function eventListToProfileGroup(events: TraceEvent[]): ProfileGroup {
break
}
}
if (!swapped) {
// There was no key match, let's see if we can find a name match
for (let i = 1; i < eEventQueue.length; i++) {
const eEvent = eEventQueue[i]
if (eEvent.ts > eEventQueue[0].ts) {
// Only consider 'E' events with the same ts as the front of the queue.
break
}
if (eEvent.name === stackTop.name) {
// We have a match! Process this one first.
const temp = eEventQueue[0]
eEventQueue[0] = eEventQueue[i]
eEventQueue[i] = temp
swapped = true
break
}
}
}
// If swapped is still false at this point, it means we're about to
// pop a stack frame that doesn't even match by name. Bummer.
}
const e = eEventQueue.shift()!
tryToLeaveFrame(e)
break
// If swapped is still false at this point, it means we're about to
// pop a stack frame that doesn't even match by name. Bummer.
}
default:
const _exhaustiveCheck: never = queueName
return _exhaustiveCheck
const e = eEventQueue.shift()!
tryToLeaveFrame(e)
break
}
default:
const _exhaustiveCheck: never = queueName
return _exhaustiveCheck
}
}
for (let i = frameStack.length - 1; i >= 0; i--) {
const frame = frameInfoForEvent(frameStack[i], exporterSource)
console.warn(`Frame "${frame.key}" was still open at end of profile. Closing automatically.`)
profileBuilder.leaveFrame(frame, profileBuilder.getTotalWeight())
}
return profileBuilder.build()
}
/**
* Returns an array containing the time difference in microseconds between the current
* sample and the next sample
*/
function getTimeDeltasForSamples(samples: Sample[]): number[] {
const timeDeltas: number[] = []
let lastTimeStamp = Number(samples[0].ts)
samples.forEach((sample: Sample, idx: number) => {
if (idx === 0) return
const timeDiff = Number(sample.ts) - lastTimeStamp
lastTimeStamp = Number(sample.ts)
timeDeltas.push(timeDiff)
})
timeDeltas.push(0)
return timeDeltas
}
/**
* The chrome json trace event spec only specifies name and category
* as required stack frame properties
*
* https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.b4y98p32171
*/
function frameInfoForSampleFrame({name, category}: StackFrame): FrameInfo {
return {
key: `${name}:${category}`,
name: name,
}
}
function getActiveFramesForSample(
stackFrames: {[key: string]: StackFrame},
frameId: number,
): FrameInfo[] {
const frames = []
let parent: number | undefined = frameId
while (parent) {
const frame: StackFrame = stackFrames[parent]
if (!frame) {
throw new Error(`Could not find frame for id ${parent}`)
}
for (let i = frameStack.length - 1; i >= 0; i--) {
const frame = frameInfoForEvent(frameStack[i])
console.warn(`Frame "${frame.key}" was still open at end of profile. Closing automatically.`)
profile.leaveFrame(frame, profile.getTotalWeight())
frames.push(frameInfoForSampleFrame(frame))
parent = frame.parent
}
return frames.reverse()
}
function sampleListToProfile(contents: TraceWithSamples, samples: Sample[], name: string): Profile {
const profileBuilder = new StackListProfileBuilder()
profileBuilder.setValueFormatter(new TimeFormatter('microseconds'))
profileBuilder.setName(name)
const timeDeltas = getTimeDeltasForSamples(samples)
samples.forEach((sample, index) => {
const timeDelta = timeDeltas[index]
const activeFrames = getActiveFramesForSample(contents.stackFrames, sample.sf)
profileBuilder.appendSampleWithWeight(activeFrames, timeDelta)
})
return profileBuilder.build()
}
function eventListToProfileGroup(
events: TraceEvent[],
exporterSource: ExporterSource = ExporterSource.UNKNOWN,
): ProfileGroup {
const importableEvents = filterIgnoredEventTypes(events)
const partitionedTraceEvents = partitionByPidTid(importableEvents)
const profileNamesByPidTid = getProfileNamesFromTraceEvents(events, partitionedTraceEvents)
const profilePairs: [string, Profile][] = []
profileNamesByPidTid.forEach((name, profileKey) => {
const importableEventsForPidTid = partitionedTraceEvents.get(profileKey)
if (!importableEventsForPidTid) {
throw new Error(`Could not find events for key: ${importableEventsForPidTid}`)
}
profilePairs.push([pidTidKey(pid, tid), profile.build()])
profilePairs.push([
profileKey,
eventListToProfile(importableEventsForPidTid, name, exporterSource),
])
})
// For now, we just sort processes by pid & tid.
// TODO: The standard specifies that metadata events with the name
// "process_sort_index" and "thread_sort_index" can be used to influence the
// order, but for simplicity we'll ignore that until someone complains :)
sortBy(profilePairs, p => p[0])
return {
name: '',
indexToView: 0,
profiles: profilePairs.map(p => p[1]),
}
}
function sampleListToProfileGroup(contents: TraceWithSamples): ProfileGroup {
const partitionedSamples = partitionByPidTid(contents.samples)
const profileNamesByPidTid = getProfileNamesFromSamples(contents.traceEvents, partitionedSamples)
const profilePairs: [string, Profile][] = []
profileNamesByPidTid.forEach((name, profileKey) => {
const samplesForPidTid = partitionedSamples.get(profileKey)
if (!samplesForPidTid) {
throw new Error(`Could not find samples for key: ${samplesForPidTid}`)
}
if (samplesForPidTid.length === 0) {
return
}
profilePairs.push([profileKey, sampleListToProfile(contents, samplesForPidTid, name)])
})
// For now, we just sort processes by pid & tid.
@@ -456,27 +737,53 @@ function isTraceEventList(maybeEventList: any): maybeEventList is TraceEvent[] {
return true
}
function isTraceEventObject(
maybeTraceEventObject: any,
): maybeTraceEventObject is {traceEvents: TraceEvent[]} {
function isHermesTraceEvent(traceEventArgs: any): traceEventArgs is HermesTraceEventArgs {
if (!traceEventArgs) {
return false
}
return requiredHermesArguments.every(prop => prop in traceEventArgs)
}
function isHermesTraceEventList(maybeEventList: any): maybeEventList is HermesTraceEvent[] {
if (!isTraceEventList(maybeEventList)) return false
// We just check the first element to avoid iterating over all trace events,
// and asumme that if the first one is formatted like a hermes profile then
// all events will be
return isHermesTraceEvent(maybeEventList[0].args)
}
function isTraceEventObject(maybeTraceEventObject: any): maybeTraceEventObject is TraceEventObject {
if (!('traceEvents' in maybeTraceEventObject)) return false
return isTraceEventList(maybeTraceEventObject['traceEvents'])
}
export function isTraceEventFormatted(
rawProfile: any,
): rawProfile is {traceEvents: TraceEvent[]} | TraceEvent[] {
function isTraceEventWithSamples(
maybeTraceEventObject: any,
): maybeTraceEventObject is TraceWithSamples {
return (
'traceEvents' in maybeTraceEventObject &&
'stackFrames' in maybeTraceEventObject &&
'samples' in maybeTraceEventObject &&
isTraceEventList(maybeTraceEventObject['traceEvents'])
)
}
export function isTraceEventFormatted(rawProfile: any): rawProfile is Trace {
// We're only going to support the JSON formatted profiles for now.
// The spec also discusses support for data embedded in ftrace supported data: https://lwn.net/Articles/365835/.
return isTraceEventObject(rawProfile) || isTraceEventList(rawProfile)
}
export function importTraceEvents(
rawProfile: {traceEvents: TraceEvent[]} | TraceEvent[],
): ProfileGroup {
if (isTraceEventObject(rawProfile)) {
export function importTraceEvents(rawProfile: Trace): ProfileGroup {
if (isTraceEventWithSamples(rawProfile)) {
return sampleListToProfileGroup(rawProfile)
} else if (isTraceEventObject(rawProfile)) {
return eventListToProfileGroup(rawProfile.traceEvents)
} else if (isHermesTraceEventList(rawProfile)) {
return eventListToProfileGroup(rawProfile, ExporterSource.HERMES)
} else if (isTraceEventList(rawProfile)) {
return eventListToProfileGroup(rawProfile)
} else {
+4 -1
View File
@@ -204,7 +204,10 @@ export class StringBackedTextFileContent implements TextFileContent {
}
export class TextProfileDataSource implements ProfileDataSource {
constructor(private fileName: string, private contents: string) {}
constructor(
private fileName: string,
private contents: string,
) {}
async name() {
return this.fileName
}
+2 -2
View File
@@ -87,8 +87,8 @@ function codeToFrameInfo(code: Code, v8log: V8LogProfile): FrameInfo {
matches[1].length > 0
? matches[1]
: file
? `(anonymous ${file.split('/').pop()}:${line})`
: '(anonymous)'
? `(anonymous ${file.split('/').pop()}:${line})`
: '(anonymous)'
return {
key: name,
name: functionName,
@@ -1,5 +1,59 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`importSpeedscopeProfiles 0.0.1 evented profile (no pretty print) 1`] = `
Object {
"frames": Array [
Frame {
"col": undefined,
"file": undefined,
"key": 0,
"line": undefined,
"name": "a",
"selfWeight": 0,
"totalWeight": 14,
},
Frame {
"col": undefined,
"file": undefined,
"key": 1,
"line": undefined,
"name": "b",
"selfWeight": 5,
"totalWeight": 14,
},
Frame {
"col": undefined,
"file": undefined,
"key": 2,
"line": undefined,
"name": "c",
"selfWeight": 5,
"totalWeight": 5,
},
Frame {
"col": undefined,
"file": undefined,
"key": 3,
"line": undefined,
"name": "d",
"selfWeight": 4,
"totalWeight": 4,
},
],
"name": "simple.txt",
"stacks": Array [
"a;b;c 2",
"a;b;d 4",
"a;b;c 3",
"a;b 5",
],
}
`;
exports[`importSpeedscopeProfiles 0.0.1 evented profile (no pretty print): indexToView 1`] = `0`;
exports[`importSpeedscopeProfiles 0.0.1 evented profile (no pretty print): profileGroup.name 1`] = `"simple.txt"`;
exports[`importSpeedscopeProfiles 0.0.1 evented profile 1`] = `
Object {
"frames": Array [
+7 -1
View File
@@ -66,6 +66,8 @@ declare const module: any
if (process.env.NODE_ENV === 'development') {
;(window as any)['Atom'] = AtomDev = {}
/*
TODO(jlfwong): Fix this
module.hot.dispose(() => {
if (AtomDev) {
hotReloadStash = new Map()
@@ -76,13 +78,17 @@ if (process.env.NODE_ENV === 'development') {
;(window as any)['Atom_hotReloadStash'] = hotReloadStash
})
*/
hotReloadStash = (window as any)['Atom_hotReloadStash'] || null
}
export class Atom<T> {
private observers: AtomListener[] = []
constructor(protected state: T, debugKey: string) {
constructor(
protected state: T,
debugKey: string,
) {
if (process.env.NODE_ENV === 'development') {
if (hotReloadStash?.has(debugKey)) {
// If we have a stored value from a previous hot reload, use that
+8 -8
View File
@@ -20,14 +20,14 @@ export class Color {
hPrime < 1
? [C, X, 0]
: hPrime < 2
? [X, C, 0]
: hPrime < 3
? [0, C, X]
: hPrime < 4
? [0, X, C]
: hPrime < 5
? [X, 0, C]
: [C, 0, X]
? [X, C, 0]
: hPrime < 3
? [0, C, X]
: hPrime < 4
? [0, X, C]
: hPrime < 5
? [X, 0, C]
: [C, 0, X]
const m = L - (0.3 * R1 + 0.59 * G1 + 0.11 * B1)
-13
View File
@@ -1,13 +0,0 @@
import {demangleCpp} from './demangle-cpp'
test('demangleCpp', () => {
expect(demangleCpp('a')).toBe('a')
expect(demangleCpp('someUnobfuscatedFunction')).toBe('someUnobfuscatedFunction')
expect(demangleCpp('__ZNK7Support6ColorFeqERKS0_')).toBe(
'Support::ColorF::operator==(Support::ColorF const&) const',
)
// Running a second time to test the cache
expect(demangleCpp('__ZNK7Support6ColorFeqERKS0_')).toBe(
'Support::ColorF::operator==(Support::ColorF const&) const',
)
})
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
gcc
+39
View File
@@ -0,0 +1,39 @@
EMCC = emcc
CFLAGS = -Os -Igcc/include -DHAVE_STDLIB_H -DHAVE_STRING_H
LDFLAGS_COMMON = \
-s EXPORTED_RUNTIME_METHODS=stringToUTF8OnStack,UTF8ToString \
-s EXPORTED_FUNCTIONS=_demangle,_free \
-s MODULARIZE=1 \
-s WASM=1 \
-s FILESYSTEM=0 \
-s MINIMAL_RUNTIME=1
# We have to disable EXPORT_ES6 as otherwise since esbuild cannot transpile that
# into umd or anything else.
# .ts files throughout the project can do this just fine because they are
# transpiled to compatible js.
ifeq ($(TEST),1)
LDFLAGS = $(LDFLAGS_COMMON) -s EXPORT_ES6=1
else
# SINGLE_FILE=1 embeds the wasm as base64.
LDFLAGS = $(LDFLAGS_COMMON) -s ASSERTIONS=0 -s SINGLE_FILE=1 -s ENVIRONMENT=web
endif
SRC_FILES = \
gcc/libiberty/safe-ctype.c \
gcc/libiberty/rust-demangle.c \
gcc/libiberty/cp-demangle.c \
demangle.c
POST_JS = demangle.post.js
EXTERN_POST_JS = demangle.extern.post.js
OUTPUT = demangle.wasm.js
all: $(OUTPUT)
$(OUTPUT): $(SRC_FILES) $(POST_JS)
$(EMCC) $(CFLAGS) $(SRC_FILES) $(LDFLAGS) --post-js $(POST_JS) --extern-post-js $(EXTERN_POST_JS) --no-entry -o $@
clean:
rm -f $(OUTPUT)
.PHONY: all clean
+30
View File
@@ -0,0 +1,30 @@
# demangle
A wrapper function on top of demangling functions from the `GNU libiberty`,
using emscripten.
# Build dependencies
## emscripten 4.0.0
Follow the official `emsdk` installation instructions:
https://emscripten.org/docs/getting_started/downloads.html#installation-instructions-using-the-emsdk-recommended
And make sure you have `emcc` in your PATH.
# Source dependencies
## GCC
Make sure to fetch `gcc` sources.
* `git clone https://github.com/gcc-mirror/gcc`
* `git reset --hard 40754a3b9bef83bf4da0675fcb378e8cd1675602`
# Build instructions
`make` to produce a single CommonJS module that contains also contain the base64 encoded wasm file.
`make TEST=1` to produce both a ES6 module AND the wasm file.
Using `make TEST=1` produce a file that can be used by `node` for testing purposes.
+38
View File
@@ -0,0 +1,38 @@
#include "gcc/include/demangle.h"
#include <string.h>
static char *non_microsoft_demangle(const char *mangled) {
int is_itanium_symbol = strncmp(mangled, "_Z", 2) == 0;
if (is_itanium_symbol) {
// Note: __cxa_demangle default is DMGL_PARAMS | DMGL_TYPES
return cplus_demangle_v3(mangled, DMGL_PARAMS | DMGL_TYPES);
}
int is_rust_symbol = strncmp(mangled, "_R", 2) == 0;
if (is_rust_symbol) {
// Note: rust_demangle uses only DMGL_VERBOSE and DMGL_NO_RECURSE_LIMIT,
// so no need to pass any options in our case.
return rust_demangle(mangled, DMGL_NO_OPTS);
}
return NULL;
}
// Logic is inspired by llvm::demangle.
// It is the caller's responsibility to free the string which is returned.
char *demangle(const char *mangled) {
char *demangled = non_microsoft_demangle(mangled);
if (demangled) {
return demangled;
}
if (mangled[0] == '_') {
demangled = non_microsoft_demangle(&mangled[1]);
if (demangled) {
return demangled;
}
}
return NULL;
}
+7
View File
@@ -0,0 +1,7 @@
/**
* DO NOT USE THIS FILE DIRECTLY.
*
* This file is only used as --extern-post-js of emcc.
*/
module.exports = Module
module.exports.default = Module
+22
View File
@@ -0,0 +1,22 @@
/**
* DO NOT USE THIS FILE DIRECTLY.
*
* This file is only used as --post-js of emcc.
*
* This file provides a higher level demangle function ready to use
* in JavaScript.
*/
Module['wasm_demangle'] = function(mangled) {
/*
* We are manually calling the lower-level generated functions
* instead of using `cwrap` because we need to `free` the pointer
* returned by `_demangle`.
*/
const param_ptr = stringToUTF8OnStack(mangled);
const result_ptr = _demangle(param_ptr);
const result = UTF8ToString(result_ptr);
if (result_ptr !== null && result_ptr !== undefined) {
_free(result_ptr);
}
return result;
}
+28
View File
@@ -0,0 +1,28 @@
import {loadDemangling} from './demangle'
test('demangle', async () => {
const demangle = await loadDemangling()
expect(demangle('a')).toBe('a')
expect(demangle('someUnobfuscatedFunction')).toBe('someUnobfuscatedFunction')
// C++ mangling
expect(demangle('__ZNK7Support6ColorFeqERKS0_')).toBe(
'Support::ColorF::operator==(Support::ColorF const&) const',
)
// Running a second time to test the cache
expect(demangle('__ZNK7Support6ColorFeqERKS0_')).toBe(
'Support::ColorF::operator==(Support::ColorF const&) const',
)
// Rust v0 mangling
expect(demangle('_RNvCskwGfYPst2Cb_3foo16example_function')).toBe('foo::example_function')
// Rust legacy mangling
expect(demangle('_ZN3std2fs8Metadata7created17h8df207f105c5d474E')).toBe(
'std::fs::Metadata::created::h8df207f105c5d474',
)
// False positive
expect(demangle('_ZoomIn')).toBe('_ZoomIn')
})
+27
View File
@@ -0,0 +1,27 @@
import createWasmDemangleModule from './demangle.wasm'
const wasmDemangleModulePromise = createWasmDemangleModule().then(module => module)
const cache = new Map<string, string>()
export async function loadDemangling(): Promise<(name: string) => string> {
// This function converts a mangled C++ name such as "__ZNK7Support6ColorFeqERKS0_"
// into a human-readable symbol (in this case "Support::ColorF::==(Support::ColorF&)")
const wasmDemangleModule = await wasmDemangleModulePromise
return cached(wasmDemangleModule.wasm_demangle)
}
function cached(demangle: (name: string) => string): (name: string) => string {
return (name: string): string => {
let result = cache.get(name)
if (result !== undefined) {
name = result
} else {
result = demangle(name)
result = result === '' ? name : result
cache.set(name, result)
name = result
}
return name
}
}
+5
View File
@@ -0,0 +1,5 @@
interface WasmDemangleModule {
wasm_demangle(mangled: string): string
}
export default function ModuleFactory(options?: unknown): Promise<WasmDemangleModule>
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
export {loadDemangling} from './demangle'
+2 -2
View File
@@ -65,7 +65,7 @@ export namespace FileFormat {
unit: ValueUnit
// The starting value of the profile. This will typically be a timestamp.
// All event values will be relative to this startValue.
// All event values will be displayed relative to this startValue.
startValue: number
// The final value of the profile. This will typically be a timestamp. This
@@ -93,7 +93,7 @@ export namespace FileFormat {
unit: ValueUnit
// The starting value of the profile. This will typically be a timestamp.
// All event values will be relative to this startValue.
// All event values will be displayed relative to this startValue.
startValue: number
// The final value of the profile. This will typically be a timestamp. This
+6
View File
@@ -5,6 +5,12 @@ describe('importSpeedscopeProfiles', () => {
await checkProfileSnapshot('./sample/profiles/speedscope/0.0.1/simple.speedscope.json')
})
test('0.0.1 evented profile (no pretty print)', async () => {
await checkProfileSnapshot(
'./sample/profiles/speedscope/0.0.1/simple-no-pretty-print.speedscope.json',
)
})
test('0.1.2 sampled profile', async () => {
await checkProfileSnapshot('./sample/profiles/speedscope/0.1.2/simple-sampled.speedscope.json')
})
+3 -16
View File
@@ -6,24 +6,11 @@
// URL, but I want speedscope to work standalone offline. This means that the remaining
// options require some way of having a local URL that corresponds the .wasm file.
//
// Also as of writing, speedscope is bundled with Parcel v1. Trying to import
// a .wasm file in Parcel v1 tries to load the wasm module itself, which is not
// what I'm trying to do -- I want SourceMapConsumer.initialize to be the thing
// booting the WebAssembly, not Parcel itself.
//
// One way of getting around this problem is to modify the build system to
// copy the .wasm file from node_modules/source-map/lib/mappings.wasm. I could do
// this, but it's a bit of a pain.
//
// Another would be to use something like
// import("url:../node_modules/source-map/lib/mappings.wasm"), and then pass the
// resulting URL to SourceMapConsumer.initialize. This is also kind of a pain,
// because I can only do that if I upgrade to Parcel v2. Ultimately, I'd like to
// use esbuild rather than parcel at all, so for now I'm just punting on this by
// using an old-version of source-map which doesn't depend on wasm.
// This is rarely used, so let's load it async to avoid bloating the initial
// bundle.
//
// TODO(jlfwong): Revisit using the newer, wasm-based version of source-map now
// that we're using esbuild for bundling.
import type {MappingItem, RawSourceMap, SourceMapConsumer} from 'source-map'
const sourceMapModule = import('source-map')
+8 -2
View File
@@ -5,7 +5,10 @@ export function clamp(x: number, minVal: number, maxVal: number) {
}
export class Vec2 {
constructor(readonly x: number, readonly y: number) {}
constructor(
readonly x: number,
readonly y: number,
) {}
withX(x: number) {
return new Vec2(x, this.y)
}
@@ -251,7 +254,10 @@ export class AffineTransform {
}
export class Rect {
constructor(readonly origin: Vec2, readonly size: Vec2) {}
constructor(
readonly origin: Vec2,
readonly size: Vec2,
) {}
isEmpty() {
return this.width() == 0 || this.height() == 0
+8 -2
View File
@@ -39,7 +39,10 @@ export function exactMatchStrings(text: string, pattern: string): [number, numbe
// A utility class for storing cached search results to avoid recomputation when
// the search results & profile did not change.
export class ProfileSearchResults {
constructor(readonly profile: Profile, readonly searchQuery: string) {}
constructor(
readonly profile: Profile,
readonly searchQuery: string,
) {}
private matches: Map<Frame, [number, number][] | null> | null = null
getMatchForFrame(frame: Frame): [number, number][] | null {
@@ -65,7 +68,10 @@ interface CachedFlamechartResult {
}
export class FlamechartSearchResults {
constructor(readonly flamechart: Flamechart, readonly profileResults: ProfileSearchResults) {}
constructor(
readonly flamechart: Flamechart,
readonly profileResults: ProfileSearchResults,
) {}
private matches: CachedFlamechartResult | null = null
private getResults(): CachedFlamechartResult {
+15 -9
View File
@@ -1,7 +1,6 @@
import {lastOf, KeyedSet} from './utils'
import {ValueFormatter, RawValueFormatter} from './value-formatters'
import {FileFormat} from './file-format-spec'
const demangleCppModule = import('./demangle-cpp')
export interface FrameInfo {
key: string | number
@@ -99,7 +98,10 @@ export class CallTreeNode extends HasWeights {
this.frozen = true
}
constructor(readonly frame: Frame, readonly parent: CallTreeNode | null) {
constructor(
readonly frame: Frame,
readonly parent: CallTreeNode | null,
) {
super()
}
}
@@ -401,16 +403,20 @@ export class Profile {
// Demangle symbols for readability
async demangle() {
let demangleCpp: ((name: string) => string) | null = null
let demangle: ((name: string) => string) | null = null
for (let frame of this.frames) {
// This function converts a mangled C++ name such as "__ZNK7Support6ColorFeqERKS0_"
// into a human-readable symbol (in this case "Support::ColorF::==(Support::ColorF&)")
if (frame.name.startsWith('__Z')) {
if (!demangleCpp) {
demangleCpp = (await demangleCppModule).demangleCpp
// This function converts a mangled C++ and Rust name into a human-readable symbol.
if (
frame.name.startsWith('__Z') ||
frame.name.startsWith('_R') ||
frame.name.startsWith('_Z')
) {
if (!demangle) {
const demangleModule = await import('./demangle')
demangle = await demangleModule.loadDemangling()
}
frame.name = demangleCpp(frame.name)
frame.name = demangle(frame.name)
}
}
}
+5 -1
View File
@@ -76,7 +76,11 @@ class Panel {
private GRAPH_WIDTH = 74 * PR
private GRAPH_HEIGHT = 30 * PR
constructor(private name: string, private fg: string, private bg: string) {
constructor(
private name: string,
private fg: string,
private bg: string,
) {
this.canvas.width = this.WIDTH
this.canvas.height = this.HEIGHT
this.canvas.style.cssText = 'width:80px;height:48px'
+1 -1
View File
@@ -105,6 +105,6 @@ export async function expectImportFailure(filepath: string) {
await importProfilesFromArrayBuffer(path.basename(filepath), arrayBuffer)
fail('Expected import to fail but it succeeded')
} catch (error) {
expect(error.message).toMatchSnapshot()
expect((error as Error).message).toMatchSnapshot()
}
}
+4 -1
View File
@@ -42,7 +42,10 @@ test('getOrInsert', () => {
})
class ValueType {
private constructor(readonly a: string, readonly num: number) {}
private constructor(
readonly a: string,
readonly num: number,
) {}
get key() {
return `${this.a}_${this.num}`
}
+9 -11
View File
@@ -213,17 +213,15 @@ export function lazyStatic<T>(cb: () => T): () => T {
}
}
const base64lookupTable = lazyStatic(
(): Map<string, number> => {
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
const ret = new Map<string, number>()
for (let i = 0; i < alphabet.length; i++) {
ret.set(alphabet.charAt(i), i)
}
ret.set('=', -1)
return ret
},
)
const base64lookupTable = lazyStatic((): Map<string, number> => {
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
const ret = new Map<string, number>()
for (let i = 0; i < alphabet.length; i++) {
ret.set(alphabet.charAt(i), i)
}
ret.set('=', -1)
return ret
})
// NOTE: There are probably simpler solutions to this problem, but I have this written already, so
// until we run into problems with this, let's just use this.
+3
View File
@@ -4,6 +4,8 @@ import {ThemeProvider} from './views/themes/theme'
console.log(`speedscope v${require('../package.json').version}`)
/*
TODO(jlfwong): Fix this
declare const module: any
if (module.hot) {
module.hot.dispose(() => {
@@ -12,6 +14,7 @@ if (module.hot) {
})
module.hot.accept()
}
*/
render(
<ThemeProvider>
+4 -4
View File
@@ -20,10 +20,10 @@ import {Application} from './application'
export const ApplicationContainer = memo(() => {
const canvas = useAtom(glCanvasAtom)
const theme = useTheme()
const canvasContext = useMemo(() => (canvas ? getCanvasContext({theme, canvas}) : null), [
theme,
canvas,
])
const canvasContext = useMemo(
() => (canvas ? getCanvasContext({theme, canvas}) : null),
[theme, canvas],
)
return (
<ProfileSearchContextProvider>
+19 -7
View File
@@ -1,11 +1,12 @@
import '../../assets/reset.css'
import '../../assets/source-code-pro.css'
import {h} from 'preact'
import {StyleSheet, css} from 'aphrodite'
import {FileSystemDirectoryEntry} from '../import/file-system-entry'
import {ProfileGroup, SymbolRemapper} from '../lib/profile'
import {FontFamily, FontSize, Duration} from './style'
import {importEmscriptenSymbolMap as importEmscriptenSymbolRemapper} from '../lib/emscripten'
import {SandwichViewContainer} from './sandwich-view'
import {saveToFile} from '../lib/file-format'
import {ActiveProfileState} from '../app-state/active-profile-state'
import {LeftHeavyFlamechartView, ChronoFlamechartView} from './flamechart-view-container'
@@ -18,6 +19,7 @@ import {canUseXHR} from '../app-state'
import {ProfileGroupState} from '../app-state/profile-group'
import {HashParams} from '../lib/hash-params'
import {StatelessComponent} from '../lib/preact-helpers'
import {SandwichViewContainer} from './sandwich-view'
const importModule = import('../import')
@@ -26,7 +28,7 @@ const importModule = import('../import')
// We put them all in one place so we can directly control the relative priority
// of these.
importModule.then(() => {})
import('../lib/demangle-cpp').then(() => {})
import('../lib/demangle').then(() => {})
import('source-map').then(() => {})
async function importProfilesFromText(
@@ -60,6 +62,10 @@ async function importFromFileSystemDirectoryEntry(entry: FileSystemDirectoryEntr
declare function require(x: string): any
const exampleProfileURL = require('../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt')
function isFileSystemDirectoryEntry(entry: FileSystemEntry): entry is FileSystemDirectoryEntry {
return entry != null && entry.isDirectory
}
interface GLCanvasProps {
canvasContext: CanvasContext | null
theme: Theme
@@ -165,6 +171,7 @@ export type ApplicationProps = {
export class Application extends StatelessComponent<ApplicationProps> {
private async loadProfile(loader: () => Promise<ProfileGroup | null>) {
this.props.setError(false)
this.props.setLoading(true)
await new Promise(resolve => setTimeout(resolve, 0))
@@ -306,13 +313,18 @@ export class Application extends StatelessComponent<ApplicationProps> {
const firstItem = ev.dataTransfer.items[0]
if ('webkitGetAsEntry' in firstItem) {
const webkitEntry: FileSystemDirectoryEntry = firstItem.webkitGetAsEntry()
const webkitEntry: FileSystemEntry | null = firstItem.webkitGetAsEntry()
// Instrument.app file format is actually a directory.
if (webkitEntry.isDirectory && webkitEntry.name.endsWith('.trace')) {
if (
webkitEntry &&
isFileSystemDirectoryEntry(webkitEntry) &&
webkitEntry.name.endsWith('.trace')
) {
console.log('Importing as Instruments.app .trace file')
const webkitDirectoryEntry: FileSystemDirectoryEntry = webkitEntry
this.loadProfile(async () => {
return await importFromFileSystemDirectoryEntry(webkitEntry)
return await importFromFileSystemDirectoryEntry(webkitDirectoryEntry)
})
return
}
@@ -416,7 +428,7 @@ export class Application extends StatelessComponent<ApplicationProps> {
}
async maybeLoadHashParamProfile() {
const {profileURL} = this.props.hashParams;
const {profileURL} = this.props.hashParams
if (profileURL) {
if (!canUseXHR) {
alert(
+2 -3
View File
@@ -308,9 +308,8 @@ export class FlamechartMinimapView extends Component<FlamechartMinimapViewProps,
const logicalSpaceMouse = this.windowToLogicalViewSpace().transformPosition(
new Vec2(ev.clientX, ev.clientY),
)
const physicalSpaceMouse = this.logicalToPhysicalViewSpace().transformPosition(
logicalSpaceMouse,
)
const physicalSpaceMouse =
this.logicalToPhysicalViewSpace().transformPosition(logicalSpaceMouse)
return this.configSpaceToPhysicalViewSpace().inverseTransformPosition(physicalSpaceMouse)
}
+25 -17
View File
@@ -239,10 +239,7 @@ export class FlamechartPanZoomView extends Component<FlamechartPanZoomViewProps,
)
if (match) {
const rangesToHighlightInTrimmedText = remapRangesToTrimmedText(
trimmedText,
match
)
const rangesToHighlightInTrimmedText = remapRangesToTrimmedText(trimmedText, match)
// Once we have the character ranges to highlight, we need to
// actually do the highlighting.
@@ -546,12 +543,10 @@ export class FlamechartPanZoomView extends Component<FlamechartPanZoomViewProps,
private zoom(logicalViewSpaceCenter: Vec2, multiplier: number) {
this.interactionLock = 'zoom'
const physicalCenter = this.logicalToPhysicalViewSpace().transformPosition(
logicalViewSpaceCenter,
)
const configSpaceCenter = this.configSpaceToPhysicalViewSpace().inverseTransformPosition(
physicalCenter,
)
const physicalCenter =
this.logicalToPhysicalViewSpace().transformPosition(logicalViewSpaceCenter)
const configSpaceCenter =
this.configSpaceToPhysicalViewSpace().inverseTransformPosition(physicalCenter)
if (!configSpaceCenter) return
const zoomTransform = AffineTransform.withTranslation(configSpaceCenter.times(-1))
@@ -634,14 +629,12 @@ export class FlamechartPanZoomView extends Component<FlamechartPanZoomViewProps,
this.onMouseDrag(ev)
return
}
this.hoveredLabel = null
const logicalViewSpaceMouse = new Vec2(ev.offsetX, ev.offsetY)
const physicalViewSpaceMouse = this.logicalToPhysicalViewSpace().transformPosition(
logicalViewSpaceMouse,
)
const configSpaceMouse = this.configSpaceToPhysicalViewSpace().inverseTransformPosition(
physicalViewSpaceMouse,
)
const physicalViewSpaceMouse =
this.logicalToPhysicalViewSpace().transformPosition(logicalViewSpaceMouse)
const configSpaceMouse =
this.configSpaceToPhysicalViewSpace().inverseTransformPosition(physicalViewSpaceMouse)
if (!configSpaceMouse) return
@@ -664,6 +657,21 @@ export class FlamechartPanZoomView extends Component<FlamechartPanZoomViewProps,
}
}
// This is a dumb hack to get around what appears to be a bug in
// TypeScript's reachability analysis. If I do the this.hoveredLabel = null
// in the outer function body, the code below accessing
// this.hoveredLabel!.node inside of the `if (this.hoveredLabel) {`
// complains that "no property node on never", indicating that it thinks
// that codepath is unreachable.
//
// Because this.hoveredLabel is accessed in the bound function
// setHoveredLabel, the codepath is obviously reachable, but the type
// checker is confused about this for some reason.
const clearHoveredLabel = () => {
this.hoveredLabel = null
}
clearHoveredLabel()
for (let frame of this.props.flamechart.getLayers()[0] || []) {
setHoveredLabel(frame)
}
+36 -30
View File
@@ -3,7 +3,7 @@ import {Sizes, FontSize, FontFamily, ZIndex} from './style'
import {css, StyleSheet} from 'aphrodite'
import {ComponentChildren, h} from 'preact'
import {useTheme, withTheme} from './themes/theme'
import { useCallback } from 'preact/hooks'
import {useCallback} from 'preact/hooks'
interface HovertipProps {
containerSize: Vec2
@@ -20,42 +20,48 @@ export function Hovertip(props: HovertipProps) {
const OFFSET_FROM_MOUSE = 7
const updateLocation = useCallback((el: HTMLDivElement | null) => {
if (!el) return
const updateLocation = useCallback(
(el: HTMLDivElement | null) => {
if (!el) return
const clientRect = el.getBoundingClientRect()
const clientRect = el.getBoundingClientRect()
// Place the hovertip to the right of the cursor.
let leftEdgeX = offset.x + OFFSET_FROM_MOUSE
// Place the hovertip to the right of the cursor.
let leftEdgeX = offset.x + OFFSET_FROM_MOUSE
// If this would cause it to overflow the container, align the right
// edge of the hovertip with the right edge of the container.
if (leftEdgeX + clientRect.width > containerWidth - 1) {
leftEdgeX = containerWidth - clientRect.width - 1
// If this would cause it to overflow the container, align the right
// edge of the hovertip with the right edge of the container.
if (leftEdgeX + clientRect.width > containerWidth - 1) {
leftEdgeX = containerWidth - clientRect.width - 1
// If aligning the right edge overflows the container, align the left edge
// of the hovertip with the left edge of the container.
if (leftEdgeX < 1) { leftEdgeX = 1 }
}
el.style.left = `${leftEdgeX}px`
// If aligning the right edge overflows the container, align the left edge
// of the hovertip with the left edge of the container.
if (leftEdgeX < 1) {
leftEdgeX = 1
}
}
el.style.left = `${leftEdgeX}px`
// Place the tooltip below the cursor
let topEdgeY = offset.y + OFFSET_FROM_MOUSE
// Place the tooltip below the cursor
let topEdgeY = offset.y + OFFSET_FROM_MOUSE
// If this would cause it to overflow the container, place the hovertip
// above the cursor instead. This intentionally differs from the horizontal
// axis logic to avoid the cursor being in the middle of a hovertip when
// possible.
if (topEdgeY + clientRect.height > containerHeight - 1) {
topEdgeY = offset.y - clientRect.height - 1
// If this would cause it to overflow the container, place the hovertip
// above the cursor instead. This intentionally differs from the horizontal
// axis logic to avoid the cursor being in the middle of a hovertip when
// possible.
if (topEdgeY + clientRect.height > containerHeight - 1) {
topEdgeY = offset.y - clientRect.height - 1
// If placing the hovertip above the cursor overflows the container, align
// the top edge of the hovertip with the top edge of the container.
if (topEdgeY < 1) { topEdgeY = 1 }
}
el.style.top = `${topEdgeY}px`
}, [containerWidth, containerHeight, offset.x, offset.y])
// If placing the hovertip above the cursor overflows the container, align
// the top edge of the hovertip with the top edge of the container.
if (topEdgeY < 1) {
topEdgeY = 1
}
}
el.style.top = `${topEdgeY}px`
},
[containerWidth, containerHeight, offset.x, offset.y],
)
return (
<div className={css(style.hoverTip)} ref={updateLocation}>
+8 -6
View File
@@ -268,12 +268,14 @@ export const ProfileTableView = memo(
[sandwichContext],
)
const onTotalClick = useCallback((ev: MouseEvent) => onSortClick(SortField.TOTAL, ev), [
onSortClick,
])
const onSelfClick = useCallback((ev: MouseEvent) => onSortClick(SortField.SELF, ev), [
onSortClick,
])
const onTotalClick = useCallback(
(ev: MouseEvent) => onSortClick(SortField.TOTAL, ev),
[onSortClick],
)
const onSelfClick = useCallback(
(ev: MouseEvent) => onSortClick(SortField.SELF, ev),
[onSortClick],
)
const onSymbolNameClick = useCallback(
(ev: MouseEvent) => onSortClick(SortField.SYMBOL_NAME, ev),
[onSortClick],