Bug 1515197 - Remove the window length setting from devtools performance panel r=julienw
authorNazım Can Altınova <canaltinova@gmail.com>
Mon, 07 Jan 2019 21:37:05 +0000
changeset 509865 27dc3484e7ef99a4f786fac1f9a5d29eb9de8498
parent 509864 ee870d4a43083769491e0964ae180304542fc10f
child 509866 f46ff2feaf5f4deee1db87bf701f0ef1553044aa
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjulienw
bugs1515197
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1515197 - Remove the window length setting from devtools performance panel r=julienw Differential Revision: https://phabricator.services.mozilla.com/D15655
devtools/client/performance-new/browser.js
devtools/client/performance-new/components/Settings.js
devtools/client/performance-new/initializer.js
devtools/client/performance-new/panel.js
devtools/client/performance-new/store/actions.js
devtools/client/performance-new/store/reducers.js
devtools/client/performance-new/store/selectors.js
devtools/client/performance-new/test/chrome/chrome.ini
devtools/client/performance-new/test/chrome/head.js
devtools/client/performance-new/test/chrome/test_perf-settings-duration.html
devtools/client/performance-new/utils.js
devtools/client/performance/modules/global.js
devtools/client/webconsole/test/chrome/test_render_perf.html
devtools/client/webide/content/webide.js
devtools/server/actors/perf.js
devtools/server/actors/root.js
devtools/shared/moz.build
devtools/shared/performance-new/common.js
devtools/shared/performance-new/moz.build
--- a/devtools/client/performance-new/browser.js
+++ b/devtools/client/performance-new/browser.js
@@ -115,29 +115,24 @@ async function _getIntPref(preferenceFro
  * is helpful for configuring for remote targets like Android phones that may require
  * different features or configurations.
  *
  * @param {PreferenceFront} preferenceFront
  * @param {object} defaultSettings See the getRecordingSettings selector for the shape
  *                                 of the object and how it gets defined.
  */
 async function getRecordingPreferences(preferenceFront, defaultSettings = {}) {
-  const [ entries, duration, interval, features, threads ] = await Promise.all([
+  const [ entries, interval, features, threads ] = await Promise.all([
     _getIntPref(
       preferenceFront,
       `devtools.performance.recording.entries`,
       defaultSettings.entries
     ),
     _getIntPref(
       preferenceFront,
-      `devtools.performance.recording.window-length`,
-      defaultSettings.duration
-    ),
-    _getIntPref(
-      preferenceFront,
       `devtools.performance.recording.interval`,
       defaultSettings.interval
     ),
     _getArrayOfStringsPref(
       preferenceFront,
       `devtools.performance.recording.features`,
       defaultSettings.features
     ),
@@ -145,17 +140,17 @@ async function getRecordingPreferences(p
       preferenceFront,
       `devtools.performance.recording.threads`,
       defaultSettings.threads
     ),
   ]);
 
   // The pref stores the value in usec.
   const newInterval = interval / 1000;
-  return { entries, duration, interval: newInterval, features, threads };
+  return { entries, interval: newInterval, features, threads };
 }
 
 /**
  * Take the recording settings, as defined by the getRecordingSettings selector, and
  * persist them to preferences.
  *
  * @param {PreferenceFront} preferenceFront
  * @param {object} defaultSettings See the getRecordingSettings selector for the shape
@@ -163,20 +158,16 @@ async function getRecordingPreferences(p
  */
 async function setRecordingPreferences(preferenceFront, settings) {
   await Promise.all([
     preferenceFront.setIntPref(
       `devtools.performance.recording.entries`,
       settings.entries
     ),
     preferenceFront.setIntPref(
-      `devtools.performance.recording.window-length`,
-      settings.duration
-    ),
-    preferenceFront.setIntPref(
       `devtools.performance.recording.interval`,
       // The pref stores the value in usec.
       settings.interval * 1000
     ),
     preferenceFront.setCharPref(
       `devtools.performance.recording.features`,
       JSON.stringify(settings.features)
     ),
--- a/devtools/client/performance-new/components/Settings.js
+++ b/devtools/client/performance-new/components/Settings.js
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 const { PureComponent, createFactory } = require("devtools/client/shared/vendor/react");
 const { div, details, summary, label, input, span, h2, section } = require("devtools/client/shared/vendor/react-dom-factories");
 const Range = createFactory(require("devtools/client/performance-new/components/Range"));
-const { makeExponentialScale, formatFileSize, calculateOverhead, INFINITE_WINDOW_LENGTH } = require("devtools/client/performance-new/utils");
+const { makeExponentialScale, formatFileSize, calculateOverhead } = require("devtools/client/performance-new/utils");
 const { connect } = require("devtools/client/shared/vendor/react-redux");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const actions = require("devtools/client/performance-new/store/actions");
 const selectors = require("devtools/client/performance-new/store/selectors");
 
 // sizeof(double) + sizeof(char)
 // http://searchfox.org/mozilla-central/rev/e8835f52eff29772a57dca7bcc86a9a312a23729/tools/profiler/core/ProfileEntry.h#73
 const PROFILE_ENTRY_SIZE = 9;
@@ -159,26 +159,23 @@ const featureCheckboxes = [
  * This component manages the settings for recording a performance profile.
  */
 class Settings extends PureComponent {
   static get propTypes() {
     return {
       // StateProps
       interval: PropTypes.number.isRequired,
       entries: PropTypes.number.isRequired,
-      duration: PropTypes.number.isRequired,
       features: PropTypes.array.isRequired,
       threads: PropTypes.array.isRequired,
       threadsString: PropTypes.string.isRequired,
-      actorVersion: PropTypes.string.isRequired,
 
       // DispatchProps
       changeInterval: PropTypes.func.isRequired,
       changeEntries: PropTypes.func.isRequired,
-      changeDuration: PropTypes.func.isRequired,
       changeFeatures: PropTypes.func.isRequired,
       changeThreads: PropTypes.func.isRequired,
     };
   }
 
   constructor(props) {
     super(props);
     this.state = {
@@ -189,17 +186,16 @@ class Settings extends PureComponent {
     this._handleThreadCheckboxChange = this._handleThreadCheckboxChange.bind(this);
     this._handleFeaturesCheckboxChange = this._handleFeaturesCheckboxChange.bind(this);
     this._setThreadTextFromInput = this._setThreadTextFromInput.bind(this);
     this._handleThreadTextCleanup = this._handleThreadTextCleanup.bind(this);
     this._renderThreadsColumns = this._renderThreadsColumns.bind(this);
 
     this._intervalExponentialScale = makeExponentialScale(0.01, 100);
     this._entriesExponentialScale = makeExponentialScale(100000, 100000000);
-    this._durationExponentialScale = makeExponentialScale(1, INFINITE_WINDOW_LENGTH);
   }
 
   _renderNotches() {
     const { interval, entries, features } = this.props;
     const overhead = calculateOverhead(interval, entries, features);
     const notchCount = 22;
     const notches = [];
     for (let i = 0; i < notchCount; i++) {
@@ -390,28 +386,16 @@ class Settings extends PureComponent {
       Range({
         label: "Sampling interval:",
         value: this.props.interval,
         id: "perf-range-interval",
         scale: this._intervalExponentialScale,
         display: _intervalTextDisplay,
         onChange: this.props.changeInterval,
       }),
-      // Firefox 65 introduced a duration-based buffer with actorVersion 1.
-      // We are hiding the duration range if the actor is older. Fx65+
-      this.props.actorVersion > 0
-        ? Range({
-          label: "Window length:",
-          value: this.props.duration,
-          id: "perf-range-duration",
-          scale: this._durationExponentialScale,
-          display: _durationTextDisplay,
-          onChange: this.props.changeDuration,
-        })
-        : null,
       Range({
         label: "Max buffer size:",
         value: this.props.entries,
         id: "perf-range-entries",
         scale: this._entriesExponentialScale,
         display: _entriesTextDisplay,
         onChange: this.props.changeEntries,
       }),
@@ -449,38 +433,26 @@ function _intervalTextDisplay(value) {
  * Format the entries number for display.
  * @param {number} value
  * @return {string}
  */
 function _entriesTextDisplay(value) {
   return formatFileSize(value * PROFILE_ENTRY_SIZE);
 }
 
-/**
- * Format the duration number for display.
- * @param {number} value
- * @return {string}
- */
-function _durationTextDisplay(value) {
-  return value === INFINITE_WINDOW_LENGTH ? `∞` : `${value} sec`;
-}
-
 function mapStateToProps(state) {
   return {
     interval: selectors.getInterval(state),
     entries: selectors.getEntries(state),
-    duration: selectors.getDuration(state),
     features: selectors.getFeatures(state),
     threads: selectors.getThreads(state),
     threadsString: selectors.getThreadsString(state),
-    actorVersion: selectors.getActorVersion(state),
   };
 }
 
 const mapDispatchToProps = {
   changeInterval: actions.changeInterval,
   changeEntries: actions.changeEntries,
-  changeDuration: actions.changeDuration,
   changeFeatures: actions.changeFeatures,
   changeThreads: actions.changeThreads,
 };
 
 module.exports = connect(mapStateToProps, mapDispatchToProps)(Settings);
--- a/devtools/client/performance-new/initializer.js
+++ b/devtools/client/performance-new/initializer.js
@@ -25,28 +25,25 @@ const {
   setRecordingPreferences,
 } = require("devtools/client/performance-new/browser");
 
 /**
  * Initialize the panel by creating a redux store, and render the root component.
  *
  * @param perfFront - The Perf actor's front. Used to start and stop recordings.
  * @param preferenceFront - Used to get the recording preferences from the device.
- * @param actorVersion {(number|undefined)} - The Perf actor's version.
  */
-async function gInit(perfFront, preferenceFront, actorVersion) {
+async function gInit(perfFront, preferenceFront) {
   const store = createStore(reducers);
-  actorVersion = actorVersion || 0;
 
   // Do some initialization, especially with privileged things that are part of the
   // the browser.
   store.dispatch(actions.initializeStore({
     perfFront,
     receiveProfile,
-    actorVersion,
     // Pull the default recording settings from the reducer, and update them according
     // to what's in the target's preferences. This way the preferences are stored
     // on the target. This could be useful for something like Android where you might
     // want to tweak the settings.
     recordingSettingsFromPreferences: await getRecordingPreferences(
       preferenceFront,
       selectors.getRecordingSettings(store.getState())
     ),
--- a/devtools/client/performance-new/panel.js
+++ b/devtools/client/performance-new/panel.js
@@ -22,26 +22,25 @@ class PerformancePanel {
       this._opening = this._doOpen();
     }
     return this._opening;
   }
 
   async _doOpen() {
     this.panelWin.gToolbox = this.toolbox;
     this.panelWin.gTarget = this.target;
-    const actorVersion = this.target.getTrait("perfActorVersion");
 
     const [perfFront, preferenceFront] = await Promise.all([
       this.target.client.mainRoot.getFront("perf"),
       this.target.client.mainRoot.getFront("preference"),
     ]);
 
     this.isReady = true;
     this.emit("ready");
-    this.panelWin.gInit(perfFront, preferenceFront, actorVersion);
+    this.panelWin.gInit(perfFront, preferenceFront);
     return this;
   }
 
   // DevToolPanel API:
 
   get target() {
     return this.toolbox.target;
   }
--- a/devtools/client/performance-new/store/actions.js
+++ b/devtools/client/performance-new/store/actions.js
@@ -4,17 +4,17 @@
 "use strict";
 
 const selectors = require("devtools/client/performance-new/store/selectors");
 const { recordingState: {
   AVAILABLE_TO_RECORD,
   REQUEST_TO_START_RECORDING,
   REQUEST_TO_GET_PROFILE_AND_STOP_PROFILER,
   REQUEST_TO_STOP_PROFILER,
-}, INFINITE_WINDOW_LENGTH } = require("devtools/client/performance-new/utils");
+}} = require("devtools/client/performance-new/utils");
 
 /**
  * The recording state manages the current state of the recording panel.
  * @param {string} state - A valid state in `recordingState`.
  * @param {object} options
  */
 const changeRecordingState = exports.changeRecordingState =
   (state, options = { didRecordingUnexpectedlyStopped: false }) => ({
@@ -68,25 +68,16 @@ exports.changeInterval = interval => _di
  * @param {number} entries
  */
 exports.changeEntries = entries => _dispatchAndUpdatePreferences({
   type: "CHANGE_ENTRIES",
   entries,
 });
 
 /**
- * Updates the recording settings for the duration.
- * @param {number} duration in seconds
- */
-exports.changeDuration = duration => _dispatchAndUpdatePreferences({
-  type: "CHANGE_DURATION",
-  duration,
-});
-
-/**
  * Updates the recording settings for the features.
  * @param {object} features
  */
 exports.changeFeatures = features => _dispatchAndUpdatePreferences({
   type: "CHANGE_FEATURES",
   features,
 });
 
@@ -111,27 +102,16 @@ exports.initializeStore = values => ({
 
 /**
  * Start a new recording with the perfFront and update the internal recording state.
  */
 exports.startRecording = () => {
   return (dispatch, getState) => {
     const recordingSettings = selectors.getRecordingSettings(getState());
     const perfFront = selectors.getPerfFront(getState());
-    // We should pass 0 to startProfiler call if the window length should be infinite.
-    if (recordingSettings.duration === INFINITE_WINDOW_LENGTH) {
-      recordingSettings.duration = 0;
-    }
-    // Firefox 65 introduced a duration-based buffer with actorVersion 1.
-    // We should delete the duration parameter if the profiled Firefox is older than
-    // version 1. This cannot happen inside the devtools panel but it may happen
-    // when profiling an older Firefox with remote debugging. Fx65+
-    if (selectors.getActorVersion(getState()) < 1) {
-      delete recordingSettings.duration;
-    }
     perfFront.startProfiler(recordingSettings);
     dispatch(changeRecordingState(REQUEST_TO_START_RECORDING));
   };
 };
 
 /**
  * Returns a function getDebugPathFor(debugName, breakpadId) => string which
  * resolves a (debugName, breakpadId) pair to the library's debugPath, i.e.
--- a/devtools/client/performance-new/store/reducers.js
+++ b/devtools/client/performance-new/store/reducers.js
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 const { combineReducers } = require("devtools/client/shared/vendor/redux");
 
 const { recordingState: {
   NOT_YET_KNOWN,
 }} = require("devtools/client/performance-new/utils");
-const { DEFAULT_WINDOW_LENGTH } = require("devtools/shared/performance-new/common");
 /**
  * The current state of the recording.
  * @param state - A recordingState key.
  */
 function recordingState(state = NOT_YET_KNOWN, action) {
   switch (action.type) {
     case "CHANGE_RECORDING_STATE":
       return action.state;
@@ -80,31 +79,16 @@ function entries(state = 10000000, actio
     case "INITIALIZE_STORE":
       return action.recordingSettingsFromPreferences.entries;
     default:
       return state;
   }
 }
 
 /**
- * The window length of profiler's circular buffer. Defaults to 20 sec.
- * @param {number} state
- */
-function duration(state = DEFAULT_WINDOW_LENGTH, action) {
-  switch (action.type) {
-    case "CHANGE_DURATION":
-      return action.duration;
-    case "INITIALIZE_STORE":
-      return action.recordingSettingsFromPreferences.duration;
-    default:
-      return state;
-  }
-}
-
-/**
  * The features that are enabled for the profiler.
  * @param {array} state
  */
 function features(state = ["js", "stackwalk", "responsiveness"], action) {
   switch (action.type) {
     case "CHANGE_FEATURES":
       return action.features;
     case "INITIALIZE_STORE":
@@ -148,33 +132,18 @@ function initializedValues(state = null,
         receiveProfile: action.receiveProfile,
         setRecordingPreferences: action.setRecordingPreferences,
       };
     default:
       return state;
   }
 }
 
-/**
- * The current actor version
- * @param {number} state
- */
-function actorVersion(state = 0, action) {
-  switch (action.type) {
-    case "INITIALIZE_STORE":
-      return action.actorVersion;
-    default:
-      return state;
-  }
-}
-
 module.exports = combineReducers({
   recordingState,
   recordingUnexpectedlyStopped,
   isSupportedPlatform,
   interval,
   entries,
-  duration,
   features,
   threads,
   initializedValues,
-  actorVersion,
 });
--- a/devtools/client/performance-new/store/selectors.js
+++ b/devtools/client/performance-new/store/selectors.js
@@ -3,26 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 const getRecordingState = state => state.recordingState;
 const getRecordingUnexpectedlyStopped = state => state.recordingUnexpectedlyStopped;
 const getIsSupportedPlatform = state => state.isSupportedPlatform;
 const getInterval = state => state.interval;
 const getEntries = state => state.entries;
-const getDuration = state => state.duration;
 const getFeatures = state => state.features;
 const getThreads = state => state.threads;
 const getThreadsString = state => getThreads(state).join(",");
-const getActorVersion = state => state.actorVersion;
 
 const getRecordingSettings = state => {
   return {
     entries: getEntries(state),
-    duration: getDuration(state),
     interval: getInterval(state),
     features: getFeatures(state),
     threads: getThreads(state),
   };
 };
 
 const getInitializedValues = state => {
   const values = state.initializedValues;
@@ -38,19 +35,17 @@ const getSetRecordingPreferencesFn =
   state => getInitializedValues(state).setRecordingPreferences;
 
 module.exports = {
   getRecordingState,
   getRecordingUnexpectedlyStopped,
   getIsSupportedPlatform,
   getInterval,
   getEntries,
-  getDuration,
   getFeatures,
   getThreads,
   getThreadsString,
   getRecordingSettings,
   getInitializedValues,
   getPerfFront,
   getReceiveProfileFn,
   getSetRecordingPreferencesFn,
-  getActorVersion,
 };
--- a/devtools/client/performance-new/test/chrome/chrome.ini
+++ b/devtools/client/performance-new/test/chrome/chrome.ini
@@ -1,13 +1,12 @@
 [DEFAULT]
 support-files =
   head.js
 
-[test_perf-settings-duration.html]
 [test_perf-settings-entries.html]
 [test_perf-settings-features.html]
 [test_perf-settings-interval.html]
 [test_perf-settings-threads.html]
 [test_perf-state-01.html]
 [test_perf-state-02.html]
 [test_perf-state-03.html]
 [test_perf-state-04.html]
--- a/devtools/client/performance-new/test/chrome/head.js
+++ b/devtools/client/performance-new/test/chrome/head.js
@@ -185,17 +185,16 @@ function createPerfComponent() {
   function recordingPreferencesMock(settings) {
     recordingPreferencesCalls.push(settings);
   }
 
   function mountComponent() {
     store.dispatch(actions.initializeStore({
       perfFront: perfFrontMock,
       receiveProfile: receiveProfileMock,
-      actorVersion: 1,
       recordingSettingsFromPreferences: selectors.getRecordingSettings(store.getState()),
       setRecordingPreferences: recordingPreferencesMock,
     }));
 
     return ReactDOM.render(
       React.createElement(
         ReactRedux.Provider,
         { store },
deleted file mode 100644
--- a/devtools/client/performance-new/test/chrome/test_perf-settings-duration.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<head>
-  <meta charset="utf-8">
-  <title>Perf component test</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-<body>
-  <div id="container"></div>
-
-  <pre id="test">
-    <script src="head.js" type="application/javascript"></script>
-    <script type="application/javascript">
-      "use strict";
-
-      /**
-       * Test that the duration setting can be changed.
-       */
-      addPerfTest(async () => {
-        const {
-          perfFrontMock,
-          mountAndInitializeComponent,
-          selectors,
-          getState,
-          recordingPreferencesCalls,
-        } = createPerfComponent();
-
-        await mountAndInitializeComponent();
-
-        is(selectors.getDuration(getState()), 20,
-          "The duration starts out with the default");
-        is(recordingPreferencesCalls.length, 0,
-          "No calls have been made to set preferences");
-
-        const inputValue = 75;
-        const scaledValue = 90;
-        const input = document.querySelector("#perf-range-duration");
-        setReactFriendlyInputValue(input, inputValue);
-
-        is(selectors.getDuration(getState()), scaledValue,
-          "The duration was changed according to a logarithmic scale.");
-        is(recordingPreferencesCalls[0].duration, scaledValue,
-          "The preference was recorded.");
-
-        // Start the profiler by clicking the start button, and flushing the async
-        // calls out to the mock perf front.
-        document.querySelector("button").click();
-        await perfFrontMock._flushAsyncQueue();
-
-        is(perfFrontMock._startProfilerCalls.length, 1,
-          "Start profiler was called once");
-        is(perfFrontMock._startProfilerCalls[0].duration, scaledValue,
-          "Start profiler was called with the correct duration");
-      });
-    </script>
-  </pre>
-</body>
-</html>
--- a/devtools/client/performance-new/utils.js
+++ b/devtools/client/performance-new/utils.js
@@ -20,24 +20,16 @@ const recordingState = {
   // Some other code with access to the profiler started it.
   OTHER_IS_RECORDING: "other-is-recording",
   // Profiling is not available when in private browsing mode.
   LOCKED_BY_PRIVATE_BROWSING: "locked-by-private-browsing",
 };
 
 const UNITS = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
 
-// Window Length accepts a numerical value between 1-N. We also need to put an
-// infinite number at the end of the window length slider. Therefore, the max
-// value pretends like it's infinite in the slider.
-// The maximum value of window length is 300 seconds. And because of the working
-// mechanism of `makeExponentialScale` the next value is 400, so we are treating
-// 400 as infinity.
-const INFINITE_WINDOW_LENGTH = 400;
-
 /**
  * Linearly interpolate between values.
  * https://en.wikipedia.org/wiki/Linear_interpolation
  *
  * @param {number} frac - Value ranged 0 - 1 to interpolate between the range
  *                        start and range end.
  * @param {number} rangeState - The value to start from.
  * @param {number} rangeEnd - The value to interpolate to.
@@ -183,10 +175,9 @@ function calculateOverhead(interval, buf
 }
 
 module.exports = {
   formatFileSize,
   makeExponentialScale,
   scaleRangeWithClamping,
   calculateOverhead,
   recordingState,
-  INFINITE_WINDOW_LENGTH,
 };
--- a/devtools/client/performance/modules/global.js
+++ b/devtools/client/performance/modules/global.js
@@ -25,13 +25,12 @@ exports.L10N = new MultiLocalizationHelp
  */
 exports.PREFS = new PrefsHelper("devtools.performance", {
   "show-triggers-for-gc-types": ["Char", "ui.show-triggers-for-gc-types"],
   "show-platform-data": ["Bool", "ui.show-platform-data"],
   "hidden-markers": ["Json", "timeline.hidden-markers"],
   "memory-sample-probability": ["Float", "memory.sample-probability"],
   "memory-max-log-length": ["Int", "memory.max-log-length"],
   "profiler-buffer-size": ["Int", "profiler.buffer-size"],
-  "profiler-window-length": ["Int", "profiler.window-length-seconds"],
   "profiler-sample-frequency": ["Int", "profiler.sample-frequency-hz"],
   // TODO: re-enable once we flame charts via bug 1148663.
   "enable-memory-flame": ["Bool", "ui.enable-memory-flame"],
 });
--- a/devtools/client/webconsole/test/chrome/test_render_perf.html
+++ b/devtools/client/webconsole/test/chrome/test_render_perf.html
@@ -177,29 +177,27 @@ window.onload = async function() {
     null,
     document,
   );
   wrapper.init();
 
   // From https://github.com/devtools-html/perf.html/blob/b73eb73df04c7df51464fa50eeadef3dc7f5d4e2/docs/gecko-profile-format.md#L21
   const settings = {
     entries: 100000000,
-    duration: 20,
     interval: 1,
     features: ["js"],
     threads: ["GeckoMain"],
   };
   Services.profiler.StartProfiler(
     settings.entries,
     settings.interval,
     settings.features,
     settings.features.length,
     settings.threads,
     settings.threads.length,
-    settings.duration
   );
   info("Profiler has started");
 
   await wait(500);
 
   await testBulkLogging(wrapper);
 
   await wait(500);
--- a/devtools/client/webide/content/webide.js
+++ b/devtools/client/webide/content/webide.js
@@ -878,20 +878,18 @@ var Cmds = {
     UI.selectDeckPanel("devicepreferences");
   },
 
   showPerformancePanel: function() {
     UI.selectDeckPanel("performance");
     const iframe = document.getElementById("deck-panel-performance");
 
     iframe.addEventListener("DOMContentLoaded", () => {
-      const actorVersion = AppManager.connection.client.mainRoot.traits.perfActorVersion;
       iframe.contentWindow.gInit(AppManager.perfFront,
-                                 AppManager.preferenceFront,
-                                 actorVersion);
+                                 AppManager.preferenceFront);
     }, { once: true });
   },
 
   async play() {
     let busy;
     switch (AppManager.selectedProject.type) {
       case "packaged":
         busy = UI.busyWithProgressUntil(AppManager.installAndRunProject(),
--- a/devtools/server/actors/perf.js
+++ b/devtools/server/actors/perf.js
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 const protocol = require("devtools/shared/protocol");
 const { ActorClassWithSpec, Actor } = protocol;
 const { perfSpec } = require("devtools/shared/specs/perf");
-const { DEFAULT_WINDOW_LENGTH } = require("devtools/shared/performance-new/common");
 const { Ci } = require("chrome");
 const Services = require("Services");
 
 loader.lazyImporter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 // Some platforms are built without the Gecko Profiler.
 const IS_SUPPORTED_PLATFORM = "nsIProfiler" in Ci;
@@ -50,18 +49,19 @@ exports.PerfActor = ActorClassWithSpec(p
     if (!IS_SUPPORTED_PLATFORM) {
       return false;
     }
 
     // For a quick implementation, decide on some default values. These may need
     // to be tweaked or made configurable as needed.
     const settings = {
       entries: options.entries || 1000000,
-      duration: options.duration !== undefined
-        ? options.duration : DEFAULT_WINDOW_LENGTH,
+      // Window length should be Infinite if nothing's been passed.
+      // options.duration is supported for `perfActorVersion > 0`.
+      duration: options.duration || 0,
       interval: options.interval || 1,
       features: options.features ||
         ["js", "stackwalk", "responsiveness", "threads", "leaf"],
       threads: options.threads || ["GeckoMain", "Compositor"],
     };
 
     try {
       // This can throw an error if the profiler is in the wrong state.
--- a/devtools/server/actors/root.js
+++ b/devtools/server/actors/root.js
@@ -165,20 +165,20 @@ RootActor.prototype = {
     heapSnapshots: true,
     // Whether or not the timeline actor can emit DOMContentLoaded and Load
     // markers, currently in use by the network monitor. Fx45+
     documentLoadingMarkers: true,
     // Whether or not the webextension addon actor have to be connected
     // to retrieve the extension child process target actors.
     webExtensionAddonConnect: true,
     // Version of perf actor. Fx65+
-    // Version 1 - Firefox 65: Introduces a duration-based buffer. With that change
-    // Services.profiler.StartProfiler method accepts an additional parameter called
-    // `window-length`. This is an optional parameter but it will throw an error if the
-    // profiled Firefox doesn't accept it.
+    // Version 1 - Firefox 65: Introduces a duration-based buffer. It can be controlled
+    // by adding a `duration` property (in seconds) to the options passed to
+    // `front.startProfiler`. This is an optional parameter but it will throw an error if
+    // the profiled Firefox doesn't accept it.
     perfActorVersion: 1,
   },
 
   /**
    * Return a 'hello' packet as specified by the Remote Debugging Protocol.
    */
   sayHello: function() {
     return {
--- a/devtools/shared/moz.build
+++ b/devtools/shared/moz.build
@@ -15,17 +15,16 @@ DIRS += [
     'fronts',
     'heapsnapshot',
     'inspector',
     'jsbeautify',
     'layout',
     'locales',
     'node-properties',
     'performance',
-    'performance-new',
     'platform',
     'protocol',
     'qrcode',
     'screenshot',
     'security',
     'sprintfjs',
     'specs',
     'transport',
deleted file mode 100644
--- a/devtools/shared/performance-new/common.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-/*
- * Default window length in seconds.
- */
-const DEFAULT_WINDOW_LENGTH = 20;
-
-exports.DEFAULT_WINDOW_LENGTH = DEFAULT_WINDOW_LENGTH;
deleted file mode 100644
--- a/devtools/shared/performance-new/moz.build
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DevToolsModules(
-    'common.js',
-)