Repository navigation
Fix process memory in code --status - #331297
Kumar Abhinav (Abhinav0905) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates process memory reporting to treat ProcessItem.mem consistently as bytes and simplifies diagnostics output formatting accordingly.
Changes:
- Remove platform-specific memory conversion logic in diagnostics output and always render
memas MB from bytes. - Document
ProcessItem.memas “Memory usage in bytes.”
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/platform/diagnostics/node/diagnosticsService.ts | Simplifies diagnostics table output by assuming ProcessItem.mem is already in bytes. |
| src/vs/base/common/processes.ts | Documents the mem field’s unit as bytes to clarify the API contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@microsoft-github-policy-service agree |
|
Hi Robo (@deepak1556), this is ready for human review. The change makes the |
|
Hi Robo (@deepak1556), following up on the August 28 note. The change is still limited to treating ProcessItem.mem as bytes and converting it to MB once in diagnostics output. The CLA and dependency checks pass, while the required PR check is still awaiting maintainer approvals. Could you confirm the byte contract or point me to the right owner for review? |
|
Hi Robo (@deepak1556), could this focused two-file fix get a review soon, or could you point me to the right owner? The branch is current with main, the CLA and dependency checks pass, and the earlier Copilot questions have been answered. I am available to make any requested changes quickly. |
|
Hi Robo (@deepak1556), I've updated the branch with the latest |
|
Hi Robo (@deepak1556), I rechecked this against |
Fixes #331296
Related to #194322 and #331139.
What changed
ProcessItem.memconsistently as bytes when formatting thecode --statusprocess table.ProcessItem.memcontract.Root cause
listProcessesalready converts non-Windows%memvalues to bytes, butDiagnosticsService.formatProcessItemapplied the old percentage-to-bytes calculation a second time on macOS and Linux. This produced impossible values such as 25,332,747,904 MB for a process with about 94 MiB RSS.The Process Explorer already formats
item.memas bytes. This change makes the diagnostics text path consistent with that behavior.PR #331139 changes the macOS source metric from RSS to physical footprint but continues to store the result in bytes, so the two fixes are compatible and address separate output paths.
Validation
git diff --checkpassed.mainat4ccdb71a3e5.