/ docs / native-profiling.md
native-profiling.md
 1  # Profiling the Atom Render Process on macOS with Instruments
 2  
 3  ![Instruments](https://cloud.githubusercontent.com/assets/1789/14193295/d503db7a-f760-11e5-88bf-fe417c0cd913.png)
 4  
 5  * Determine the version of Electron for your version of Atom.
 6    * Open the dev tools with `alt-cmd-i`
 7    * Evaluate `process.versions.electron` in the console.
 8  * Based on this version, download the appropriate Electron symbols from the [releases](https://github.com/atom/electron/releases) page.
 9    * The file name should look like `electron-v1.X.Y-darwin-x64-dsym.zip`.
10    * Decompress these symbols in your `~/Downloads` directory.
11  * Now create a time profile in Instruments.
12    * Open `Instruments.app`.
13    * Select `Time Profiler`
14    * In Atom, determine the pid to attach to by evaluating `process.pid` in the dev tools console.
15    * Attach to this pid via the menu at the upper left corner of the Instruments profiler.
16    * Click record, do your thing.
17    * Click stop.
18    * The symbols should have been automatically located by Instruments (via Spotlight or something?), giving you a readable profile.