The critical path for the graph is the most time-consuming path or call-sequence originating from the root. It is displayed as a thick red edge in the graphical view and starts from the heaviest, the most time-consuming thread. This is a path with maximum Edge time values.
vtl view -critical-path
This invocation will provide call-sequence data per thread.
You can also traverse the most time-consuming paths for a particular function in different directions:
In the graph:
Right-click a node and select the Max path to bottom pop-up menu command to highlight functions from the function down to the end of the graph.
Right-click a node and select the Max path to root pop-up menu command to highlight functions from the function upwards to the root.
In the call list, click the Edge Time column header to sort by ascending/descending edge time.
vtl view -critical-path -focus-func <function_name>
The VTune(TM) Performance Analyzer will show the most time-consuming path that leads from the function <function_name> down to the end of the graph - critical path to bottom, and the most time-consuming path that leads from the root (beginning of the graph) down to the function - critical path to root.
Command-line example:
>vtl view -critical-path -focus-func deflate
The output is:
Critical path from root to "deflate":
[NAME(1)]; [MODULE(2)]; [THREAD(3)]; [CLASS(4)]; [SELF_TIME(5)]; [TOTAL_TIME(6)];
[WAIT_TIME(7)]; [TOTAL_WAIT_TIME(8)]; [#_CALLS(9)]; [#_CALLERS(10)]; [#_CALLEES(11)];
[ADDRESS(12)]; [MANGLED_NAME(13)]; [DISPLAY_NAME(14)]; [PROCESS(15)]; [SOURCE_FILE(16)]
deflate; /home/gzip; Thread_1245; ; 496039; 3182144; 0; 0; 1; 1; 4; 0x1B78; deflate;
deflate; /home/gzip; /home/SOFT/gzip-1.3/deflate.c
zip; /home/gzip; Thread_1245; ; 4403; 3223116; 0; 0; 1; 1; 7; 0xB2A4; zip;
zip; /home/gzip; /home/SOFT/gzip-1.3/util.c
treat_file; /home/gzip; Thread_1245; ; 46; 3230875; 0; 0; 1; 1; 10; 0x2AA0; treat_file;
treat_file; /home/gzip; /home/SOFT/gzip-1.3/gzip.c
main; /home/gzip; Thread_1245; ; 124; 3231090; 0; 0; 1; 1; 9; 0x20E0; main;
main; /home/gzip; /home/SOFT/gzip-1.3/gzip.c
__libc_start_main; /lib/libc.so.6; Thread_1245; ; 35; 3231127; 0; 0; 1; 1; 3; 0x1C1A4;
__libc_start_main; __libc_start_main; /home/gzip; unknown
Thread_1245; unknown; Thread_1245; ; 3231127; 3231127; 0; 0; 1; 0; 1; 0x0; unknown;
unknown; /home/gzip; unknown
Critical path from "deflate" to bottom:
[NAME(1)]; [MODULE(2)]; [THREAD(3)]; [CLASS(4)]; [SELF_TIME(5)]; [TOTAL_TIME(6)];
[WAIT_TIME(7)]; [TOTAL_WAIT_TIME(8)]; [#_CALLS(9)]; [#_CALLERS(10)]; [#_CALLEES(11)];
[ADDRESS(12)]; [MANGLED_NAME(13)]; [DISPLAY_NAME(14)]; [PROCESS(15)]; [SOURCE_FILE(16)]
deflate; /home/gzip; Thread_1245; ; 496039; 3182144; 0; 0; 1; 1; 4; 0x1B78; deflate;
deflate; /home/gzip; /home/SOFT/gzip-1.3/deflate.c
longest_match; /home/gzip; Thread_1245; ; 1652997; 1652997; 0; 0; 680797; 1; 0; 0x1508;
longest_match; longest_match; /home/gzip; /home/SOFT/gzip-1.3/deflate.c
You can merge data for the functions or calls that appear in more than one thread and view the call sequence data for the merged thread by using the following options:
vtl view -critical-path -focus-func <function_name> -merge-threads
Or, you can view max path to root and max path to bottom from a specific function with merged threads, as follows:
vtl view -critical-path -merge-threads
The critical path also depends on the function Total time values, which means that Self Wait time also contributes to functions on the critical path.