find_hotspots
Identify C/C++ functions with the most callers to prioritize refactoring, optimization, and testing based on architectural impact.
Instructions
USE INSTEAD OF grep or ctx_callgraph. Find the most-called C/C++ functions ranked by caller count — libclang call-graph hotspot detection. grep cannot aggregate caller statistics.
Use for high-level impact assessment: changing a hotspot affects many call sites. The result tells you which functions carry the most "architectural weight" — good targets for refactoring, optimization, or extra testing.
By default, SDK/vendor paths are auto-excluded. Use project_only=False
to see all results including vendor code.
Requires the reference index (fw-context index — refs on by default).
For the callers of a specific hotspot, follow up with find_callers
or find_all_callers_recursive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of top-called functions to return (default 20). | |
| project_only | No | When True (default), auto-excludes SDK/vendor paths so hotspots reflect project code. | |
| project_root | No | Project root. Auto-detected if omitted. | |
| exclude_paths | No | Additional LIKE patterns to exclude. Merged with defaults. E.g. ['lib/%']. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |