uprof_collect
Profile a command or process with AMD uProf, returning a result_id for later report generation.
Instructions
Run a uProf collection and store the result; returns a result_id handle.
Pass exactly one target: command (argv list, launched under the profiler) or
pid (attach — requires duration_sec, since attach has no natural end).
config is a collect config such as "tbp" or "hotspots" (uprof_check lists
them; only 'tbp' works on non-AMD CPUs; allow_unknown=true forces an unlisted
one). call_graph=true adds call-stack sampling; extra_events are raw -e
event specs; label is a free-form tag for telling results apart later.
timeout_sec caps how long the collection may run before it is killed
(default 300s, or duration_sec when larger); raise it for long workloads.
app_exit_code is the profiled program's own exit — a non-zero value is
surfaced as a warning, so a crashed target does not masquerade as a clean
profile. In mock mode the target command really runs but every profile number
is synthetic. Feed the returned result_id to the report/compare tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| label | No | ||
| config | Yes | ||
| command | No | ||
| call_graph | No | ||
| timeout_sec | No | ||
| working_dir | No | ||
| duration_sec | No | ||
| extra_events | No | ||
| allow_unknown | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| target | Yes | ||
| analysis | Yes | ||
| warnings | Yes | ||
| result_id | Yes | ||
| result_dir | Yes | ||
| elapsed_sec | Yes | ||
| app_exit_code | No |