View Single Post
Old 03-13-2019, 01:26 PM   #3
HadrienG
Human being with feelings
 
Join Date: Mar 2019
Posts: 7
Default Profiling results

So, I rebuilt libSwell with debug info (and threw an -O3 -march=native into the mix while I was at it, just in case there's vectorizable stuff in there :P), and installed a few more debug info packages, then ran another 20s perf profile with "perf record -a --call-graph=dwarf,64000 -F 300 -o /dev/shm/perf.data -- sleep 20".

First of all, we see reaper, spending a lot of time sleeping for reasons that only cockos devs with access to its debugging symbols could tell. My guess is that it's doing this because in real-time processing, it's too risky to fall asleep when there is no work to do...

Code:
-   25,38%     0,00%  reaper/mediaafx  libc-2.29.so                        [.] __GI___clone (inlined)
     __GI___clone (inlined)
     start_thread
   - __threadproc
      - 24,54% 0x64d778
         - 24,52% usleep
              __GI___nanosleep (inlined)
Then we have cinnamon, who as I pointed out earlier spends a curious lot of time iterating over glib events:

Code:
-   20,54%     0,00%  cinnamon         cinnamon                            [.] _start
     _start
     __libc_start_main
     main
     meta_run
     g_main_loop_run
   - g_main_context_iterate (inlined)
      - 8,43% g_main_context_dispatch
         - g_main_dispatch (inlined)
            - 7,54% clutter_clock_dispatch
               - master_clock_update_stages (inlined)
                  - 7,25% _clutter_stage_do_update
                     + 7,14% clutter_stage_do_redraw (inlined)
            - 0,74% 0x7fb843d30071
                 gdk_display_get_event
      - 5,41% g_main_context_prepare
           4,63% g_source_iter_next
      - 4,95% g_main_context_check
           4,26% g_source_iter_next
      - 1,72% g_main_context_poll (inlined)
           1,71% __GI___poll (inlined)
With the extra debug symbols that I just installed, I can also look into the details of clutter's draw call. And all I can say without going above the char limit for this post is... wow.

Last edited by HadrienG; 03-13-2019 at 02:03 PM.
HadrienG is offline   Reply With Quote