profile_process
Profile a specific Linux process using perf to collect performance data for flame graph generation. Specify PID, duration, frequency, and event.
Instructions
Profile a specific process using perf to collect performance data for flame graph generation. Requires perf tool to be installed on the system.
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": {
"pid": "<pid>"
},
"name": "profile_process"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | Process ID to profile | |
| duration | No | Duration in seconds to collect data (default: 10) | |
| frequency | No | Sampling frequency in Hz (default: 99) | |
| event | No | Perf event to record (default: cpu-clock). Other options: cycles, instructions, cache-misses | cpu-clock |