heap_query_delta
Query and filter heap delta logs by caller, address range, or event types to analyze memory allocation patterns after heap layout.
Instructions
查询最近一次 heap-end 产生的 /tmp/heap_delta.json,可按 caller/地址过滤。
适合只关注布局后的 source 点相关日志,例如:
caller_contains="SLPParseSrvUrl"
around_addr="0x57eebce8", around_size=0x400
event_types="free"
Args: event_types: 逗号分隔类型/分组,如 "alloc", "free", "malloc,calloc"。 caller_contains: caller 符号子串过滤。 action_contains: action 名称子串过滤。 addr_start: 地址范围起点。 addr_end: 地址范围终点。 around_addr: 中心地址。 around_size: 中心地址半径。 limit: 最多返回多少条。 include_raw: 是否附带完整 JSON。
Returns: 过滤后的 heaplog 风格文本。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "heap_query_delta"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| addr_end | No | ||
| addr_start | No | ||
| around_addr | No | ||
| around_size | No | ||
| event_types | No | ||
| include_raw | No | ||
| action_contains | No | ||
| caller_contains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |