Top memory consumers
mat_top_consumersFind high-retained individual objects plus retained-size breakdowns by class, class loader, and package to quickly see which components drive heap usage after an overview.
Instructions
Read-only Top Consumers report: biggest individual objects plus retained-size breakdowns by class, class loader, and package. Use this as a quick 'who is using the most memory' overview after mat_overview. Prefer mat_histogram when you need a sortable list of every class with instance counts and shallow/retained sizes, and mat_dominator when you need to walk the object graph downward from a specific parent object. Requires the report_id of a parsed dump (status=DONE).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"report_id": "<report_id>"
},
"name": "mat_top_consumers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes | Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |