Erik Chen | 8f908e2 | 2018-02-26 16:06:58 | [diff] [blame] | 1 | # Filing Memory Bugs |
| 2 | |
| 3 | This page describes the common set of steps for filing a memory bug. |
| 4 | |
| 5 | 1. Grab platform-specific measurements. |
| 6 | * [macOS](#macOS) |
| 7 | * [Windows](#Windows) |
| 8 | * [Linux](#Linux) |
| 9 | 2. Grab a [memory-infra](#memory-infra) trace. |
| 10 | 3. [File a |
| 11 | bug](https://bugs.chromium.org/p/chromium/issues/entry?template=Memory%20usage) |
| 12 | on crbug.com. Attach screenshots and traces from previous steps. |
| 13 | |
| 14 | ## Windows |
| 15 | |
| 16 | ### Task Manager |
| 17 | |
| 18 | * Open Task Manager. |
| 19 | * Select the **Details** pane. |
| 20 | * Right click the first row with column names. Select **Select Columns**. |
| 21 | * Select **Memory (private working set)** |
| 22 | * Select **Memory (shared working set)** |
| 23 | * Select **Commit size** |
| 24 | * Sort processes with highest **Memory (private working set)** first by clicking |
| 25 | once on the column name. |
| 26 | * Take a screenshot using [Snipping |
| 27 | Tool](https://support.microsoft.com/en-us/help/13776/windows-use-snipping-tool-to-capture-screenshots) |
| 28 | |
| 29 |  |
| 30 | |
| 31 | ## macOS |
| 32 | |
| 33 | ### Step 1 - Activity Monitor |
| 34 | |
| 35 | * Open Activity Monitor, Select the Memory Tab. |
| 36 | * Under the **View** Menu, select the **Real Private Memory** and **Real Memory** columns. |
| 37 | * Sort processes with highest **Private Memory** first by clicking once on **Private Memory**. |
| 38 | * Take a screenshot by pressing cmd + shift + 3. |
| 39 | * You can also use cmd + shift + 4 to manually select a region on the screen to save. |
| 40 | |
| 41 |  |
| 42 | |
| 43 | ### Step 2 - Terminal |
| 44 | |
| 45 | * Open the Terminal application. |
| 46 | * Run the following command and report the results. ```vm_stat``` |
| 47 | |
| 48 |  |
| 49 | |
| 50 | ## Linux |
| 51 | |
| 52 | ### /proc/meminfo |
| 53 | |
| 54 | * Open a shell. |
| 55 | * Run the command ```cat /proc/meminfo``` |
| 56 | * Record the results. |
| 57 | |
| 58 |  |
| 59 | |
| 60 | ## <a name="memory-infra"></a> Memory-Infra Trace |
| 61 | |
| 62 | * Open a new chrome tab and navigate to **chrome://tracing** |
| 63 | * Click **Record** in the top left corner. |
| 64 | * Click the button **Manually select settings** and click **None** under the left column to unselect everything. |
| 65 | * Under the right column, select **memory-infra** |
| 66 | * Click **Record**. Wait for five seconds. Then click **stop**. |
| 67 | * Click the **Save** button in the top left corner a pick a name for the trace. |