heap_query_log
Query heap operation logs with filters for caller, address, action, or event types to debug memory allocation events.
Instructions
查询 heap_logger 的完整文本日志 /tmp/heaplog.txt,并可按地址/caller/action 过滤。
这个工具用于“只看某一段/某个 source 点附近日志”,不要求当前必须 处于 heap action。heaplog.txt 每行是 JSON 事件。
Args: caller_contains: caller 符号子串过滤。 action_contains: action 名称子串过滤。 text_contains: 原始 JSON 行文本子串过滤。 addr_start: 地址范围起点。 addr_end: 地址范围终点。 around_addr: 中心地址。 around_size: 中心地址半径。 event_types: 类型/分组过滤,如 "malloc,calloc,free"。 last: 返回最后 N 条匹配事件。
Returns: 过滤后的 heaplog 风格文本。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| last | No | ||
| addr_end | No | ||
| addr_start | No | ||
| around_addr | No | ||
| around_size | No | ||
| event_types | No | ||
| text_contains | No | ||
| action_contains | No | ||
| caller_contains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |