This enables about:profiling everywhere, and removes the ifdefs. I can confirm that it
does not break things on a full Beta simulation in my manual tests. The DevTools panel
cannot be enabled. The popup cannot be enabled either.
Differential Revision: https://phabricator.services.mozilla.com/D63706
--HG--
extra : moz-landing-system : lando
This commit adds tests for the profiler popup, and migrates some of the
older ones to use about:profiling instead.
Differential Revision: https://phabricator.services.mozilla.com/D62915
--HG--
rename : devtools/client/performance-new/test/browser/browser_popup-env-restart-button.js => devtools/client/performance-new/test/browser/browser_aboutprofiling-env-restart-button.js
rename : devtools/client/performance-new/test/browser/browser_popup-features-disabled.js => devtools/client/performance-new/test/browser/browser_aboutprofiling-features-disabled.js
rename : devtools/client/performance-new/test/browser/browser_popup-end-to-end-click.js => devtools/client/performance-new/test/browser/browser_popup-record-capture.js
extra : moz-landing-system : lando
This commit implements the actual UI changes. A follow-up commit adds the
tests for the changes. The CSS is a little bit awkard since it uses lots of
ID selectors rather than class selectors. I wanted to be able to write quick
selects, since it's selecting across the entire browser document. I feel
a little conflicted with the approach, as I would prefer to use classes in
general.
The panel.jsm.js file collects all of the UI handling changes rather than
having everything in menu-button.jsm.js, as the latter can get loaded
at startup. I'm not sure if it's completely worth the trouble of having
two files, as most of it should be pretty light.
This commit does not handle localization for the panel, as we should be moving
to Fluent. Rather than solve that here, I will follow-up with it in Bug 1599774.
Differential Revision: https://phabricator.services.mozilla.com/D62914
--HG--
extra : moz-landing-system : lando
This commit removes the old popup implementation, but does not implement the new one
yet. This is in a follow-up commit. The client is in a bit of an awkard state where
it is mid-transition to a new architecture. Some of the code comments and documentation
were updated to reflect the changes coming up.
Differential Revision: https://phabricator.services.mozilla.com/D62913
--HG--
extra : moz-landing-system : lando
The presets in recording-utils.js couldn't be shared via the ChromeUtils.import
mechanism. When they were in recording-utils.js they could only be loaded in
via the DevTools require() loader. This commit changes it so that they are
stored in a jsm, and are also injected to each UI interface where the
ChromeUtils.import function is available (only in the initializers).
Differential Revision: https://phabricator.services.mozilla.com/D62912
--HG--
extra : moz-landing-system : lando
This enables about:profiling everywhere, and removes the ifdefs. I can confirm that it
does not break things on a full Beta simulation in my manual tests. The DevTools panel
cannot be enabled. The popup cannot be enabled either.
Differential Revision: https://phabricator.services.mozilla.com/D63706
--HG--
extra : moz-landing-system : lando
This commit adds tests for the profiler popup, and migrates some of the
older ones to use about:profiling instead.
Differential Revision: https://phabricator.services.mozilla.com/D62915
--HG--
rename : devtools/client/performance-new/test/browser/browser_popup-env-restart-button.js => devtools/client/performance-new/test/browser/browser_aboutprofiling-env-restart-button.js
rename : devtools/client/performance-new/test/browser/browser_popup-features-disabled.js => devtools/client/performance-new/test/browser/browser_aboutprofiling-features-disabled.js
rename : devtools/client/performance-new/test/browser/browser_popup-end-to-end-click.js => devtools/client/performance-new/test/browser/browser_popup-record-capture.js
extra : moz-landing-system : lando
This commit implements the actual UI changes. A follow-up commit adds the
tests for the changes. The CSS is a little bit awkard since it uses lots of
ID selectors rather than class selectors. I wanted to be able to write quick
selects, since it's selecting across the entire browser document. I feel
a little conflicted with the approach, as I would prefer to use classes in
general.
The panel.jsm.js file collects all of the UI handling changes rather than
having everything in menu-button.jsm.js, as the latter can get loaded
at startup. I'm not sure if it's completely worth the trouble of having
two files, as most of it should be pretty light.
This commit does not handle localization for the panel, as we should be moving
to Fluent. Rather than solve that here, I will follow-up with it in Bug 1599774.
Differential Revision: https://phabricator.services.mozilla.com/D62914
--HG--
extra : moz-landing-system : lando
This commit removes the old popup implementation, but does not implement the new one
yet. This is in a follow-up commit. The client is in a bit of an awkard state where
it is mid-transition to a new architecture. Some of the code comments and documentation
were updated to reflect the changes coming up.
Differential Revision: https://phabricator.services.mozilla.com/D62913
--HG--
extra : moz-landing-system : lando
The presets in recording-utils.js couldn't be shared via the ChromeUtils.import
mechanism. When they were in recording-utils.js they could only be loaded in
via the DevTools require() loader. This commit changes it so that they are
stored in a jsm, and are also injected to each UI interface where the
ChromeUtils.import function is available (only in the initializers).
Differential Revision: https://phabricator.services.mozilla.com/D62912
--HG--
extra : moz-landing-system : lando
The default preset is "web-developer", and the DevTools panel was using that
preset over the custom values until at least one value was tweaked. This patch
changes the UI to only use the "custom" preset when in the DevTools panel. This
panel code will all be removed soon, so this is only a migration step.
Differential Revision: https://phabricator.services.mozilla.com/D62956
--HG--
extra : moz-landing-system : lando
This test isn't ready to be run on all versions of Firefox yet. It is
part of the suite of changes for the new about:profiling workflow.
Differential Revision: https://phabricator.services.mozilla.com/D62458
--HG--
extra : moz-landing-system : lando
We want to be sure that the URL used for the WebChannel is validated to an
allowed set of domains. This test ensures that we are not allowing unknown
domains through.
Differential Revision: https://phabricator.services.mozilla.com/D57122
--HG--
extra : moz-landing-system : lando
This commit adds a WebChannel mechanism to the profiler popup workflow.
This will enable us to provide some configuration operations from the
content page in order to ease user onboarding, as well as a mechanism
to migrate away from the extension.
Differential Revision: https://phabricator.services.mozilla.com/D57121
--HG--
extra : moz-landing-system : lando
The reducer errors in the implementation of the DevTools panel, as the presetName was not being fetched from the preferences in the debuggee. This fixes that. TypeScript caught this, but I guess I forgot to check it.
Differential Revision: https://phabricator.services.mozilla.com/D61128
--HG--
extra : moz-landing-system : lando
This commit changes the testing utility to be generic to work for any
input radio or checkbox on the page, where the input is located near
in the DOM to the text element.
Differential Revision: https://phabricator.services.mozilla.com/D58466
--HG--
extra : moz-landing-system : lando
This commit creates profiler presets for the current browser. It does not
handle remote profiling yet, as there is no UI surface for it yet. The
preset setting updates happen inside of the reducers and presets, and not
the selectors. This design was chosen so that as the presets were changed,
it would actually change the settings below, making it easy to change and
customize the settings by chosing the nearest preset.
The UI designs are still in a bit of a flux, so this UI design was the
easiest to implement for the initial pass, but we don't yet have consensus
on what the UI will look like for the final design.
Differential Revision: https://phabricator.services.mozilla.com/D58465
--HG--
extra : moz-landing-system : lando
This patch adds a new context for the performance-new components. It's
eventually the only place where the settings will live, but for now
the components share the settings between the popup, the devtools panel,
and the about:profiling page.
This page uses the base styling that the preferences page uses. The styles
should obey the theming for the browser, and ignore the devtools theming
colors.
Differential Revision: https://phabricator.services.mozilla.com/D55010
--HG--
extra : moz-landing-system : lando
This is probably the biggest change to the existing components, as it makes the
summary dropdowns conditional based on the page context. This keeps the old
workflow working, but allows for the new about:profiling page's design. Most
of the diff here is creating the new _renderSection method which consolidates
this logic, and also handles the summary div structure.
Differential Revision: https://phabricator.services.mozilla.com/D55009
--HG--
extra : moz-landing-system : lando
The new about:profiling page creates some more complexity around what
the page context is. It is simpler to handle the different cases with
a union, rather than booleans.
Differential Revision: https://phabricator.services.mozilla.com/D55008
--HG--
extra : moz-landing-system : lando
This commit is fairly trivial, but creates the about:profiler page to
start the new about:profiler work.
Differential Revision: https://phabricator.services.mozilla.com/D53729
--HG--
extra : moz-landing-system : lando
This patch adds a new context for the performance-new components. It's
eventually the only place where the settings will live, but for now
the components share the settings between the popup, the devtools panel,
and the about:profiling page.
This page uses the base styling that the preferences page uses. The styles
should obey the theming for the browser, and ignore the devtools theming
colors.
Differential Revision: https://phabricator.services.mozilla.com/D55010
--HG--
extra : moz-landing-system : lando
This is probably the biggest change to the existing components, as it makes the
summary dropdowns conditional based on the page context. This keeps the old
workflow working, but allows for the new about:profiling page's design. Most
of the diff here is creating the new _renderSection method which consolidates
this logic, and also handles the summary div structure.
Differential Revision: https://phabricator.services.mozilla.com/D55009
--HG--
extra : moz-landing-system : lando
The new about:profiling page creates some more complexity around what
the page context is. It is simpler to handle the different cases with
a union, rather than booleans.
Differential Revision: https://phabricator.services.mozilla.com/D55008
--HG--
extra : moz-landing-system : lando
This commit is fairly trivial, but creates the about:profiler page to
start the new about:profiler work.
Differential Revision: https://phabricator.services.mozilla.com/D53729
--HG--
extra : moz-landing-system : lando
This patch:
- Removes the responsiveness feature from the default features since we don't
have it anymore.
- Adds "Renderer" thread to the default threads list. That is needed to capture
screenshots with webrender.
Depends on D55103
Differential Revision: https://phabricator.services.mozilla.com/D55158
--HG--
extra : moz-landing-system : lando
It's being used in the client and server, and so is a shared file.
Differential Revision: https://phabricator.services.mozilla.com/D52247
--HG--
rename : devtools/server/performance-new/gecko-profiler-interface.js => devtools/shared/performance-new/gecko-profiler-interface.js
rename : devtools/server/performance-new/moz.build => devtools/shared/performance-new/moz.build
extra : moz-landing-system : lando
To test this feature, check the "JSTracer" feature, and the user should be
prompted with a message bar to restart the browser. This will then set the
proper environment variable. Unfortunately, currently the user can still do
this even if a feature is not available in the build. See Bug 1585659.
Differential Revision: https://phabricator.services.mozilla.com/D50085
--HG--
extra : moz-landing-system : lando
This test is relying on a profiler feature that is not available in every
platform. This patch changes it to use the "js" feature, which should be
supported everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D49948
--HG--
extra : moz-landing-system : lando
This value isn't really used, nevertheless it's good to have it to the
right value for documentation reason and consistency.
Differential Revision: https://phabricator.services.mozilla.com/D49643
--HG--
extra : moz-landing-system : lando
This also renames various variables from "settings" to "preferences" to
make it clearer that the values are about actual preferences stored in
the user profile.
Differential Revision: https://phabricator.services.mozilla.com/D49641
--HG--
extra : moz-landing-system : lando
Expose the Gecko Profiler feature "nostacksampling" as "No Periodic Sampling".
Differential Revision: https://phabricator.services.mozilla.com/D49231
--HG--
extra : moz-landing-system : lando
This function is used in several locations and at least two files, so
it's useful to have it exist as a named and exported function.
Differential Revision: https://phabricator.services.mozilla.com/D49945
--HG--
extra : moz-landing-system : lando
The function had the wrong argument parameters, and it wasn't
fetching the latest list of objdirs.
Differential Revision: https://phabricator.services.mozilla.com/D49006
--HG--
extra : moz-landing-system : lando
Everything should be typed in the JS Docs. I added a bunch of TODOs for features
the could be added in the future, but weren't valuable for this initial
prototype. Unfortunately I couldn't get the @types folder working, and had to
co-locate the redux.d.ts next to the vender file. TypeScript was attempting
to parse the file, and was failing.
Differential Revision: https://phabricator.services.mozilla.com/D46042
--HG--
extra : moz-landing-system : lando
This commit sets up the configuration for TypeScript to work in tree.
It also adds the commands to run everything in our CI. For now this
configuration is limiting everything to the performance-new directory
as much as possible.
Differential Revision: https://phabricator.services.mozilla.com/D46041
--HG--
extra : moz-landing-system : lando
This patch changes the use of the recording state object with raw strings.
The strings can be type checked, and there is no more benefit to having
it as an Object. The plain strings are easier to type check.
Differential Revision: https://phabricator.services.mozilla.com/D46040
--HG--
extra : moz-landing-system : lando
This patch creates the first full mochitest that exercises the profiler
popup's mechanisms of capturing profiles. The test tries to use user-focused
mechanisms–clicking buttons to fully capture a profile.
In addition, it fixes two leaks that were uncovered by the leaktest check.
The first has to do with the iframe src creating an about:blank page when
set to an empty string. The next was the Services.obs.addObserver call
in the perfFrontInterface not being removed when the page was unloaded.
Differential Revision: https://phabricator.services.mozilla.com/D45530
--HG--
extra : source : f44e632769d75b428d0a84a3274bdf45095b91fc
The popup's shortcuts use a different codepath than the popup's buttons.
When using the buttons, the profile was not being captured as a gzipped
profile, and it was using the DevTools' mechanism for getting the symbol
tables. This patch makes the getSymbolTables mechanism configuring in the
recording panel's client.
In addition, browser code made its way into the client. This patch moves
the browser code to all be in browser.js to match the original code
organization for the panel, which was trying to keep browser APIs
out of the React components and Redux store.
Differential Revision: https://phabricator.services.mozilla.com/D45529
--HG--
extra : source : 5a3661caf52faaf67b10fcef9e3121d639a17cc3
This patch creates the first full mochitest that exercises the profiler
popup's mechanisms of capturing profiles. The test tries to use user-focused
mechanisms–clicking buttons to fully capture a profile.
In addition, it fixes two leaks that were uncovered by the leaktest check.
The first has to do with the iframe src creating an about:blank page when
set to an empty string. The next was the Services.obs.addObserver call
in the perfFrontInterface not being removed when the page was unloaded.
Differential Revision: https://phabricator.services.mozilla.com/D45530
--HG--
extra : moz-landing-system : lando
The popup's shortcuts use a different codepath than the popup's buttons.
When using the buttons, the profile was not being captured as a gzipped
profile, and it was using the DevTools' mechanism for getting the symbol
tables. This patch makes the getSymbolTables mechanism configuring in the
recording panel's client.
In addition, browser code made its way into the client. This patch moves
the browser code to all be in browser.js to match the original code
organization for the panel, which was trying to keep browser APIs
out of the React components and Redux store.
Differential Revision: https://phabricator.services.mozilla.com/D45529
--HG--
extra : moz-landing-system : lando
This is broken out into a separate commit since it is a layout change
for the DevTools as well. Note, that this area is still not localized.
Differential Revision: https://phabricator.services.mozilla.com/D43120
--HG--
extra : moz-landing-system : lando
This changeset is the bulk of the changes. It should contain most of
the minimum necessary changes to have everything working correctly.
Differential Revision: https://phabricator.services.mozilla.com/D43119
--HG--
rename : devtools/client/performance-new/popup/popup.html => devtools/client/performance-new/popup/popup.xhtml
extra : moz-landing-system : lando
This change is a one-liner, but I wanted to call it out in its own commit
since it is a true behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D43118
--HG--
extra : moz-landing-system : lando
This is broken out into a separate commit since it is a layout change
for the DevTools as well. Note, that this area is still not localized.
Differential Revision: https://phabricator.services.mozilla.com/D43120
--HG--
extra : moz-landing-system : lando
This changeset is the bulk of the changes. It should contain most of
the minimum necessary changes to have everything working correctly.
Differential Revision: https://phabricator.services.mozilla.com/D43119
--HG--
rename : devtools/client/performance-new/popup/popup.html => devtools/client/performance-new/popup/popup.xhtml
extra : moz-landing-system : lando
This change is a one-liner, but I wanted to call it out in its own commit
since it is a true behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D43118
--HG--
extra : moz-landing-system : lando
ChromeUtils.import still support a second argument as it used to do
when it was Components.utils.import. But this is deprecated and we should
instead always use the returned value.
Differential Revision: https://phabricator.services.mozilla.com/D37708
--HG--
extra : moz-landing-system : lando
This commit takes the popup, and wires it up the button using the
CustomizableUI interface. It is integrated with the DevTools initialization
code.
Differential Revision: https://phabricator.services.mozilla.com/D31629
--HG--
extra : moz-landing-system : lando
The performance profiler pop-up menu wants to be near DevTools, but work
without the complete DevTools initialization. This patch ensure that
any calls to lazyRequireGetter properly initialize the provider.
Differential Revision: https://phabricator.services.mozilla.com/D31628
--HG--
extra : moz-landing-system : lando
This commit represents the changes needed to convert the existing
Gecko Profiler Add-on code to work outside of the WebExtensions
environment. A following commit will actually wire it into the
rest of the browser.
Differential Revision: https://phabricator.services.mozilla.com/D31627
--HG--
extra : moz-landing-system : lando
The picked objdirs are stored in a preference named devtools.performance.recording.objdirs
as a JSON-ified array of string paths.
Differential Revision: https://phabricator.services.mozilla.com/D13041
--HG--
extra : moz-landing-system : lando
This gives the new devtools performance panel the same symbolication
capabilities as the Gecko Profiler add-on.
Differential Revision: https://phabricator.services.mozilla.com/D13425
--HG--
extra : moz-landing-system : lando
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
We made the profiler buffer resizable before that patch but then we decided that
it's not a good idea to do since we are spending so much time to allocate memory.
Since buffer size is constant, we don't need to add "max" anymore.
Differential Revision: https://phabricator.services.mozilla.com/D15656
--HG--
extra : moz-landing-system : lando
Add a new class to extract tracelogger data using chunked buffers and use this to write the data out to the profiler JSON output. Copying the data in chunks lets us minimize our memory overhead when writing out to the profiler so a large array of millions of elements does not need to be allocated ahead of time.
Differential Revision: https://phabricator.services.mozilla.com/D11791
--HG--
extra : moz-landing-system : lando