The GNU gProf profiler can be used to get a detailed profile of the program. It gives a an easy to read output which shows how much time is being spent in each function.
Usage
gcc -pg TestProf.c -o TestGprof.out
./TestGprof.out
scott@ksf16u:~$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06)
scott@ksf16u:~$ lspci | grep -i 3D
02:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
# Lua JIT generates /tmp/perf-<PID>.map files that perf needs to resolve symbols
# We need to map PIDs from Container to Host and copy the corrosponding files so
# perf can resolve the symbols
# Compile LuaJIT in DockerFile with --with-luajit-xcflags="-DLUAJIT_USE_PERFTOOLS"
#!/bin/bash
| # tmux configuration | |
| set -g default-terminal "screen-256color" | |
| # Enable mouse support (click to select panes, drag to resize, scroll) | |
| set -g mouse on | |
| # switch panes using Alt-arrow without prefix | |
| bind -n M-Left select-pane -L | |
| bind -n M-Right select-pane -R |