Compile Linux perf with ncurses interface?

1.1k views Asked by At

If I use distro provided Linux perf binary, it usually has a nice ncurses interface (i.e. perf top).

However, when I compile perf from linux kernel source, it only contains text based output. perf without ncurses interface

I wonder what do I need to do to compile it with ncurses support? P.S. I have libncurses5-dev:amd64 installed.

1

There are 1 answers

0
osgx On BEST ANSWER

perf uses no ./configure script as it is part of user-space tools built with linux kernel (and kernel has not autotools nor configure). There are makefiles in perf subdirectory tools/perf in linux kernel tree, and you can rerun make in it.

Two extra user interfaces, TUI and GTK are disabled in http://lxr.free-electrons.com/source/tools/perf/Makefile.config?v=4.8#L499. TUI is disabled when there is no newt/slang (/usr/include/slang/slang.h or /usr/include/slang.h) and GTK2 UI needs gtk2-devel or libgtk2.0-dev. Feature macro are defined in Makefile.perf:

 42 # Define NO_SLANG if you do not want TUI support.
 43 #
 44 # Define NO_GTK2 if you do not want GTK+ GUI support.