Skip to content

Commit c408a0e

Browse files
committed
Merge branch 'main' into ruby2
* main: (289 commits) Escape CSS URLs that are coming from profiles (firefox-devtools#5874) Memoize the computation of search filtering across threads. Memoize the computation of the implementation-filtered thread across threads. Memoize the computation of the call node table across threads. Reserve functions for collapsed resources globally. Correctly adjust transforms when merging profiles. Use Int32Array and oldXToNewXPlusOne convention in merge-compare.ts. Make profile compacting apply to the newly-shared tables. Update snapshots. Share the stackTable, frameTable, funcTable, resourceTable and nativeSymbols across threads. Update docsify to v4.13.1 with a PR manually patched Remove unused ga docsify plugin Remove async attribute from module script tag. (firefox-devtools#5870) Bump rollup from 2.79.2 to 2.80.0 Remove unused defaultCategory parameter. Implement the "collapse resource" transform with the help of the "collapse direct recursion" transform. Persist selected marker in URL and show sticky tooltip on load (firefox-devtools#5847) Fix unhandled promise rejection in setupInitialUrlState (firefox-devtools#5864) Force canvas redraw when system theme changes (firefox-devtools#5861) Fix the color of dark mode back arrow svg (firefox-devtools#5863) ...
2 parents fa070cf + 147f2ca commit c408a0e

356 files changed

Lines changed: 589899 additions & 680355 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules/
44
.DS_Store
55
dist/
66
public_html/
7+
build-meta/
78
flow-coverage
89
coverage
910
.eslintcache
@@ -12,3 +13,4 @@ coverage
1213
webpack.local-config.js
1314
*.orig
1415
*.rej
16+
.idea/

CONTRIBUTING.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ First off, thanks for taking the time to contribute to Mozilla and the Firefox P
66

77
This project is made up of a cross section of different parts of Mozilla, including people from Firefox DevTools and from Firefox's platform team who are working on the C++ and Rust internals of Firefox. Some core Mozillians on the team are:
88

9-
| - | Name | Github Handle | Position |
10-
| ------------------------------------------------------------------------------------------ | ------------------ | -------------------------------------------------------------- | -------------------------------------- |
11-
| ![][julienw] | Julien Wajsberg | [@julienw](https://github.com/julienw) | Firefox Frontend Engineer |
12-
| ![][canova] | Nazim Can Altinova | [@canova](https://github.com/canova) | Firefox Platform and Frontend Engineer |
13-
| <img src="https://avatars.githubusercontent.com/mstange?size=56" width="56" height="56" /> | Markus Stange | [@mstange](https://github.com/mstange) | Firefox Platform Engineer |
14-
| ![][AdamBrouwersHarries] | Adam Harries | [@AdamBrouwersHarries](https://github.com/AdamBrouwersHarries) | Firefox Platform Engineer |
15-
| ![][davehunt] | Dave Hunt | [@davehunt](https://github.com/davehunt) | Firefox Profiler Team Manager |
9+
| - | Name | Github Handle | Position |
10+
| ------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------ | -------------------------------------- |
11+
| ![][fatadel] | Adel Fatkhutdinov | [@fatadel](https://github.com/fatadel) | Firefox Frontend Engineer |
12+
| ![][carverdamien] | Damien Carver | [@carverdamien](https://github.com/carverdamien) | Firefox Platform Engineer |
13+
| ![][canova] | Nazim Can Altinova | [@canova](https://github.com/canova) | Firefox Platform and Frontend Engineer |
14+
| <img src="https://avatars.githubusercontent.com/mstange?size=56" width="56" height="56" /> | Markus Stange | [@mstange](https://github.com/mstange) | Firefox Platform Engineer |
15+
| ![][davehunt] | Dave Hunt | [@davehunt](https://github.com/davehunt) | Firefox Profiler Team Manager |
1616

1717
<!-- mstange's image is differently inserted because its size isn't properly controlled by the size parameter, strangely -->
1818

1919
[mstange]: https://avatars.githubusercontent.com/mstange?size=56
20-
[julienw]: https://avatars.githubusercontent.com/julienw?size=56
20+
[fatadel]: https://avatars.githubusercontent.com/fatadel?size=56
21+
[carverdamien]: https://avatars.githubusercontent.com/carverdamien?size=56
2122
[canova]: https://avatars.githubusercontent.com/canova?size=56
2223
[davehunt]: https://avatars.githubusercontent.com/davehunt?size=56
23-
[AdamBrouwersHarries]: https://avatars.githubusercontent.com/AdamBrouwersHarries?size=56
2424

2525
We're friendly and we're on the [Mozilla Matrix instance](https://chat.mozilla.org/) in the [_Firefox Profiler_ channel (_#profiler:mozilla.org_)](https://chat.mozilla.org/#/room/#profiler:mozilla.org). Come chat with us if you have any questions about the project.
2626

@@ -37,30 +37,21 @@ To get started clone the repo and get the web application started.
3737
1. Run `git clone git@github.com:firefox-devtools/profiler.git`
3838
2. Run `cd profiler`
3939
3. Run `yarn install`, this will install all of the dependencies.
40-
4. Run `yarn start`, this will start up the webpack server.
40+
4. Run `yarn start`, this will start up the development server.
4141
5. Point your browser to [http://localhost:4242](http://localhost:4242).
4242
6. If port `4242` is taken, then you can run the web app on a different port: `FX_PROFILER_PORT=1234 yarn start`
4343

44-
Other [webpack](https://webpack.js.org/configuration/) and [webpack server](https://webpack.js.org/configuration/dev-server/) options can be set in a `webpack.local-config.js` file at the repo root. For example, if you want to disable caching and the server to automatically open the home page, put in there the following code:
45-
46-
```js
47-
module.exports = function (config, serverConfig) {
48-
config.cache = false;
49-
serverConfig.open = true;
50-
};
51-
```
52-
5344
This project uses [TypeScript](https://www.typescriptlang.org/).
5445

5546
## Using GitHub Codespaces
5647

5748
Alternatively, you can also develop the Firefox Profiler online in a pre-configured development environment using [GitHub Codespaces](https://github.com/features/codespaces).
5849

59-
GitHub Codespaces will automatically install all dependencies, start the webpack server for you, and forward port 4242 so you can access the web app. Please look at our [GitHub Codespaces documentation](./docs-developer/codespaces.md) for more information.
50+
GitHub Codespaces will automatically install all dependencies, start the development server for you, and forward port 4242 so you can access the web app. Please look at our [GitHub Codespaces documentation](./docs-developer/codespaces.md) for more information.
6051

6152
## Loading in profiles for development
6253

63-
The web app doesn't include any performance profiles by default, so you'll need to load some in. Make sure the local Webpack web server is running, and then try one of the following:
54+
The web app doesn't include any performance profiles by default, so you'll need to load some in. Make sure the local development server is running, and then try one of the following:
6455

6556
#### 1. Record a profile:
6657

__mocks__/gecko-profiler-demangle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// This module replaces the wasm-pack generated module 'gecko-profiler-demangle'
22
// in our tests.
33
// The reason for this replacement is the fact that wasm-pack (or rather,
4-
// wasm-bindgen), when targeting the browser + webpack, generates an ES6 module
4+
// wasm-bindgen), when targeting the browser + bundlers, generates an ES6 module
55
// that node cannot deal with. Most importantly, it uses the syntax
66
// "import * as wasm from './gecko_profiler_demangle_bg';" in order to load
7-
// the wasm module, which is currently only supported by webpack.
7+
// the wasm module, which is currently only supported by bundlers.
88
// The long-term path to make this work correctly is to wait for node to
99
// support ES6 modules (and WASM as ES6 modules) natively [1]. It's possible
1010
// that in the medium term, wasm-bindgen will get support for outputting JS
11-
// files which work in both webpack and in node natively [2].
11+
// files which work in both bundlers and in node natively [2].
1212
// [1] https://medium.com/@giltayar/native-es-modules-in-nodejs-status-and-future-directions-part-i-ee5ea3001f71
1313
// [2] https://github.com/rustwasm/wasm-bindgen/issues/233
1414

docs-developer/CHANGELOG-formats.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ Note that this is not an exhaustive list. Processed profile format upgraders can
66

77
## Processed profile format
88

9+
### Version 60
10+
11+
The following tables have moved into `profile.shared`: `stackTable`, `frameTable`, `funcTable`, `resourceTable`, `nativeSymbols`. They are no longer per-thread.
12+
Marker and sample data (including allocation samples) remains within the thread.
13+
14+
### Version 59
15+
16+
A new optional `usedInnerWindowIDs` field was added to the `Thread` type. This field contains an array of inner window IDs. It is used for the tab selector dropdown in the profiler UI, together with the information from `profile.pages`. When a tab is selected in this dropdown, threads that don't have an inner window ID for the selected tab in their `usedInnerWindowIDs` field are hidden. The array is treated as a set - the order of items in it has no meaning.
17+
18+
Profiles which don't use `profile.pages` also don't need to use the `thread.usedInnerWindowIDs` field.
19+
920
### Version 58
1021

1122
A new `SourceTable` has been added to `profile.shared.sources` to centralize all source file information. The `FuncTable.fileName` field has been replaced with `FuncTable.source`, which references indices in the shared sources table. This change allows storing a UUID per JS source, which will be used for fetching sources.
@@ -122,13 +133,17 @@ We've also cleaned up the ResourceTable format:
122133

123134
### Older Versions
124135

125-
Older versions are not documented in this changelog but can be found in [processed-profile-versioning.jt](../src/profile-logic/processed-profile-versioning.ts).
136+
Older versions are not documented in this changelog but can be found in [processed-profile-versioning.ts](../src/profile-logic/processed-profile-versioning.ts).
126137

127138
## Gecko profile format
128139

140+
### Version 33
141+
142+
The `sources` field in the Gecko profile format is now non-optional. An upgrader was added that creates an empty `SourceTable` for profiles that don't have one.
143+
129144
### Version 32
130145

131-
`frameTable` `location` string field was changed to include an optional `sourceIndex` at the end of the string inside brackets for JS sources. For example, new JS frames look like this: `functionName (http://script.url/:1234:1234)[1234]` with the last number being its `sourceIndex`. This index references entries in the shared `SourceTable` in `profile.sources` (added in in the same version) which centralizes all source file information.
146+
`frameTable` `location` string field was changed to include an optional `sourceIndex` at the end of the string inside brackets for JS sources. For example, new JS frames look like this: `functionName (http://script.url/:1234:1234)[1234]` with the last number being its `sourceIndex`. This index references entries in the shared `SourceTable` in `profile.sources` (added in the same version) which centralizes all source file information.
132147

133148
### Version 31
134149

@@ -157,4 +172,4 @@ The `searchable` property is implemented in the marker schema. Previously all th
157172

158173
### Older Versions
159174

160-
Older versions are not documented in this changelog but can be found in [gecko-profile-versioning.jt](../src/profile-logic/gecko-profile-versioning.ts).
175+
Older versions are not documented in this changelog but can be found in [gecko-profile-versioning.ts](../src/profile-logic/gecko-profile-versioning.ts).

0 commit comments

Comments
 (0)