Profile a program
The profiler runs a run configuration once under the profiler that fits its program, and shows where the time or the memory went, down to the line in the editor. The profiler is Experimental.

Real frames of the application · ferris-idea drive, then ferris-idea drive screenshot after each step (docs/site/scripts/record-tour.py) · main build of v1.6.0, 2026-12-04 · throwaway Python demo project; theme Ferris IDEA Dark
Which profiler runs
Section titled “Which profiler runs”Ferris IDEA chooses from the configuration’s program and your system; there is no choice to make.
| Program | CPU | Memory | What it needs |
|---|---|---|---|
Python (python, python3, pypy3 with a script) |
cProfile | tracemalloc | nothing; the configuration’s own interpreter runs it |
Java (java, Maven exec:java, Gradle run) |
JDK Flight Recorder, a sample every millisecond | the allocation samples of the same recording | JDK 17 or later, with the jfr tool next to java or in JAVA_HOME |
| native program, macOS | /usr/bin/sample, every millisecond |
leaks at exit: what was still allocated, by call tree |
nothing |
| native program, Linux | perf, user space, 1000 samples a second |
Valgrind Massif, the peak | perf or valgrind installed |
On Linux, perf must be allowed: when kernel.perf_event_paranoid is above 2, Ferris IDEA says
so before it starts and names the command (sudo sysctl kernel.perf_event_paranoid=2); it never
changes the setting itself. Profiling on Windows is not available. Kotlin’s own kotlin launcher
is not profiled; run the program through java or Gradle run instead.
Profile a run configuration
Section titled “Profile a run configuration”- Select the configuration in the run widget: one from
run.toml, or what you ran last, such as a file started with Run Current File (Run configurations). - Choose Run › Profile for time, or Run › Profile Memory. Both are also in the ⋮ menu
next to the Run and Debug buttons. On a line with a ▶ for a
main, ⌥↩ offers Profile ‘name’ as well. - The before-launch steps run, then the program runs once under the profiler. The status bar says “Profiled name: n ms” when it is done, and the Profiler tool window opens.
The profile ends when the program ends, or when the configuration’s timeout stops it. Only one profile records at a time.
Read the profile
Section titled “Read the profile”The Profiler tool window (View › Tool Windows › Profiler) has these views; Tab or 1 to 6 switch between them:
| View | Shows |
|---|---|
| Call Tree | who called whom, with total and own time; → and ← open and close |
| Hot Spots | the functions with the most own time, as a share of the run |
| Flame Graph | callers above callees, wider is more time; frames under 0.5 % and deeper than 32 levels are left out |
| Timeline (Java) | one row per thread over time, with the CPU load; = and - zoom down to a sixteenth, ← → move, 0 shows all |
| Events (Java) | the recording’s events in order |
| Event Types (Java) | each event type with its count; ↩ lists its events |
- Only project code (P) hides frames outside the project.
- For Java, CPU time, Total time (including waiting) and Allocations (T cycles them) switch what the views count.
- ↩ or a double-click opens the source at the line. In the Timeline, ↩ opens the call tree of that thread.
- F5 profiles again; Close removes the profile.
While a profile is shown, the editor shows the cost of each line in the gutter; click a cost to
select its function in the call tree. The costs disappear when you edit the file and come back on
undo. cProfile measures whole functions, so its costs stand on the lines where a function or a
comprehension starts; perf and memory profiles give none.
Attach to a running process
Section titled “Attach to a running process”- Run › Attach Profiler to Process…. The Profiler tool window lists your own processes, newest first.
- Type to filter and choose one with ↑ ↓.
- Press ↩ for ten seconds of CPU samples, or on macOS ⌥↩ for a heap snapshot by class (bytes and count).
On macOS this uses sample and heap, on Linux perf -p, where a heap snapshot is not
available. The duration is ten seconds in the window; an agent can choose up to 120.
What is kept
Section titled “What is kept”Only the last profile is kept, in .ferris-idea/profiles/ in the project, with the raw output of
the profiler beside it (last.prof, last.jfr, last.sample.txt and so on). A new profile
replaces it. There is no search inside a profile, no zoom in the flame graph, and no way to save
or open other recordings yet.
When it does not work
Section titled “When it does not work”- macOS refuses to sample: allow the app that starts Ferris IDEA under System Settings › Privacy & Security › Developer Tools.
- “Java memory profiles are not supported yet”: use Profile and the Allocations view of the recording instead.
- Linux: perf is missing: install
linux-perf(Debian),linux-tools-commonandlinux-tools-generic(Ubuntu) orperf(Fedora, Arch). - Python: the configuration is refused: profiling needs a script;
python -cand a barepythonare not profiled. - “A profile is already being recorded”: wait until the running one ends.
For agents
Section titled “For agents”Reading the last profile and the process list needs no right; recording needs the right run,
and a run configuration also a trusted project. Both record tools do a dry run unless the agent
asks otherwise.
profile_attachAttach the profiler to one of the user's running processes without restarting it:cpusamples from outside (macOSsample, Linuxperf),memorytakes a heap snapshot by class (macOSheap).profile_lastThe workspace's last profile (CPU, memory or attached, from the Profiler tool window,profile_runorprofile_attach), read from.ferris-idea/profiles/last.jsonwithout running anything: engine, unit (samples = milliseconds, or seconds), command, exit code, duration, notes, the 25 hottest functions by self cost with file and line, and the pruned call tree.profile_processesThe user's own processes that the profiler can attach to, newest first: pid, command line andrefusedwith the reason for processes that must not be attached to (JetBrains IDEs are always refused).profile_recordingThe last Java profile's recording; runs nothing.profile_runProfile a run configuration from.ferris-idea/run.tomlfor CPU (default) or memory: before-launch configurations run normally, then the configuration runs once under a profiler (cProfile/tracemalloc for Python, JDK Flight Recorder for Java,sample/leakson macOS,perf/Massif on Linux; Java memory refused).
No tool matches. Try fewer words, or .



