Repository: electron
Issue: support Chromium's 'memlog' command-line switch
Labels: enhancement :sparkles:,platform/all,9-x-y

### Preflight Checklist
* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

(Note: I saw there was a closed question about memlog, I am filing a bug report though, as the behaviour with appending memlog switch via electron, doesn't appear to match the behaviour from Chrome)

### Issue Details

* **Electron Version:**
  * v9.0.5
* **Operating System:**
  * Arch Linux (rolling release)

### Expected Behavior

When appending the memlog flag with Chrome as detailed below:
```
chromium --memlog=all
```
And capturing a trace with MemoryInfra chosen, additional heap information is obtained.

### Actual Behavior

No additional heap information is obtained, when the Chrome memlog flag is appended from electron app.

### To Reproduce

Use the following minimal code example:

```
const {app, BrowserWindow, contentTracing} = require('electron')
const path = require('path')

app.commandLine.appendSwitch("memlog","all")
app.commandLine.appendSwitch("memlog-keep-small-allocations")
app.commandLine.appendSwitch("memlog-sampling-rate",100000)
app.commandLine.appendSwitch('memlog-stack-mode', 'native');

function createWindow () {
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      preload: path.join(__dirname, 'preload.js')
    }
  })
  mainWindow.loadFile('index.html')
}

app.on('ready', async () => {
    await contentTracing.startRecording({
      trace_buffer_size_in_kb: 1024*300,
      included_categories: ['disabled-by-default-memory-infra'],
      excluded_categories: ['*'],
      "memory_dump_config": {
      "triggers": [
        { "mode": "light", "periodic_interval_ms": 50 },
        { "mode": "detailed", "periodic_interval_ms": 1000 }
      ]
     }
    })
    console.log('Tracing started')
    await new Promise(resolve => setTimeout(resolve, 60000))
    const path = await contentTracing.stopRecording()
    console.log('Tracing data recorded to ' + path)
})

app.whenReady().then(async () => {
  createWindow()
  
  app.on('activate', function () {
    // On macOS it's common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (BrowserWindow.getAllWindows().length === 0) createWindow()
  })
})

app.on('window-all-closed', function () {
  if (process.platform !== 'darwin') app.quit()
})

```

This code tries to set the Chrome memlog switch and records a trace, which I load using the chrome://tracing tool.

### Screenshots

The following screenshot shows the effect of using --memlog=all, when conducting tracing from just Chromium (not electron) you can see the additional 'Heap Details' section:

![chromium](https://raw.githubusercontent.com/chrisruk/scratch-profiling/master/images/tracing-heap.png)

The following screenshot shows the trace I obtain from electron using the code above, as you can see, there is no heap details section:

![electron](https://user-images.githubusercontent.com/19668907/85541879-6a74e880-b610-11ea-90f9-cc52f54740fa.png)