@msteed
Quote:
That leaves GCC as the unknown quantity. I haven't installed GCC 11 yet, so I can't try it to see what difference I get. Maybe you could try
running the test programs as provided with Profyler, which are compiled with GCC 8.3.0, and comparing those results to the ones you get when
they're compiled with GCC 11.1.0.
Ok here we go:
Note: In order to execute "SOLibTest" from your original Tests (GCC 8.3.0 built) i had to use my GCC 11.1.0 built "MyLib.so" because it is not included.
Original Tests launched from Workbench:
Profile Data for MultiThread
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.175 s 100.0 % 1.175 s 1.002 s 85.3 % 1.002 s
MyPrintf 2 172.963 ms 14.7 % 86.481 ms 172.963 ms 14.7 % 86.481 ms
Profile Data for SOLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 98.380 ms 100.0 % 98.380 ms 2.286 us 0.0 % 2.286 us
MyLib_Hello 1 85.012 us 0.1 % 85.012 us 1.083 us 0.0 % 1.083 us
MyLib_MyPrintf 2 98.376 ms 100.0 % 49.188 ms 98.376 ms 100.0 % 49.188 ms
MyLib_World 1 98.293 ms 99.9 % 98.293 ms 1.163 us 0.0 % 1.163 us
Profile Data for LinkLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 116.627 ms 100.0 % 116.627 ms 1.644 us 0.0 % 1.644 us
MyLib_Hello 1 58.305 us 0.0 % 58.305 us 1.123 us 0.0 % 1.123 us
MyLib_MyPrintf 2 116.623 ms 100.0 % 58.311 ms 116.623 ms 100.0 % 58.311 ms
MyLib_World 1 116.567 ms 99.9 % 116.567 ms 1.083 us 0.0 % 1.083 us
Profile Data for Recursion
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
CR 2 57.273 ms 99.8 % 28.636 ms 2.045 us 0.0 % 1.023 us
main 1 57.363 ms 100.0 % 57.363 ms 1.805 us 0.0 % 1.805 us
MyPrintf 13 57.343 ms 100.0 % 4.411 ms 57.343 ms 100.0 % 4.411 ms
Recurse 11 13.898 ms 24.2 % 1.263 ms 13.875 us 0.0 % 1.261 us
Wazzup 1 56.082 ms 97.8 % 56.082 ms 1.805 us 0.0 % 1.805 us
Profile Data for StructorPlus
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
__static_initialization_and_des 2 76.850 ms 96.6 % 38.425 ms 2.366 us 0.0 % 1.183 us
_GLOBAL__sub_D_TheGlobalClass 1 561.761 us 0.7 % 561.761 us 1.163 us 0.0 % 1.163 us
_GLOBAL__sub_I_TheGlobalClass 1 76.292 ms 95.9 % 76.292 ms 1.965 us 0.0 % 1.965 us
Hello() 1 1.520 ms 1.9 % 1.520 ms 1.203 us 0.0 % 1.203 us
main 1 2.675 ms 3.4 % 2.675 ms 5.293 us 0.0 % 5.293 us
MyPrintf(char*) 5 79.511 ms 100.0 % 15.902 ms 79.511 ms 100.0 % 15.902 ms
TestClass::TestClass() 2 76.889 ms 96.7 % 38.444 ms 2.847 us 0.0 % 1.424 us
TestClass::~TestClass() 2 1.109 ms 1.4 % 554.303 us 2.366 us 0.0 % 1.183 us
Original Tests launched from Shell:
Profile Data for MultiThread
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.001 s 100.0 % 1.001 s 1.001 s 99.9 % 1.001 s
MyPrintf 2 554.623 us 0.1 % 277.312 us 554.623 us 0.1 % 277.312 us
Profile Data for SOLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 250.665 us 100.0 % 250.665 us 2.406 us 1.0 % 2.406 us
MyLib_Hello 1 74.466 us 29.7 % 74.466 us 1.083 us 0.4 % 1.083 us
MyLib_MyPrintf 2 246.134 us 98.2 % 123.067 us 246.134 us 98.2 % 123.067 us
MyLib_World 1 173.793 us 69.3 % 173.793 us 1.043 us 0.4 % 1.043 us
Profile Data for LinkLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 250.384 us 100.0 % 250.384 us 1.604 us 0.6 % 1.604 us
MyLib_Hello 1 74.185 us 29.6 % 74.185 us 1.323 us 0.5 % 1.323 us
MyLib_MyPrintf 2 246.415 us 98.4 % 123.208 us 246.415 us 98.4 % 123.208 us
MyLib_World 1 174.595 us 69.7 % 174.595 us 1.043 us 0.4 % 1.043 us
Profile Data for Recursion
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
CR 2 841.098 us 88.8 % 420.549 us 2.125 us 0.2 % 1.063 us
main 1 947.162 us 100.0 % 947.162 us 1.764 us 0.2 % 1.764 us
MyPrintf 13 927.954 us 98.0 % 71.381 us 927.954 us 98.0 % 71.381 us
Recurse 11 7.383 ms 779.4 % 671.146 us 13.794 us 1.5 % 1.254 us
Wazzup 1 259.768 us 27.4 % 259.768 us 1.524 us 0.2 % 1.524 us
Profile Data for StructorPlus
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
__static_initialization_and_des 2 1.851 ms 59.8 % 925.669 us 2.366 us 0.1 % 1.183 us
_GLOBAL__sub_D_TheGlobalClass 1 1.545 ms 49.9 % 1.545 ms 1.203 us 0.0 % 1.203 us
_GLOBAL__sub_I_TheGlobalClass 1 309.331 us 10.0 % 309.331 us 2.005 us 0.1 % 2.005 us
Hello() 1 157.112 us 5.1 % 157.112 us 1.163 us 0.0 % 1.163 us
main 1 1.241 ms 40.1 % 1.241 ms 4.892 us 0.2 % 4.892 us
MyPrintf(char*) 5 3.079 ms 99.5 % 615.760 us 3.079 ms 99.5 % 615.760 us
TestClass::TestClass() 2 492.067 us 15.9 % 246.034 us 2.526 us 0.1 % 1.263 us
TestClass::~TestClass() 2 2.436 ms 78.7 % 1.218 ms 2.406 us 0.1 % 1.203 us
Original Tests launched from Shell via run:
Profile Data for MultiThread
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.006 s 100.0 % 1.006 s 1.002 s 99.6 % 1.002 s
MyPrintf 2 3.944 ms 0.4 % 1.972 ms 3.944 ms 0.4 % 1.972 ms
Profile Data for SOLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.138 ms 100.0 % 1.138 ms 2.366 us 0.2 % 2.366 us
MyLib_Hello 1 70.416 us 6.2 % 70.416 us 1.083 us 0.1 % 1.083 us
MyLib_MyPrintf 2 1.134 ms 99.6 % 566.794 us 1.134 ms 99.6 % 566.794 us
MyLib_World 1 1.065 ms 93.6 % 1.065 ms 1.083 us 0.1 % 1.083 us
Profile Data for LinkLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.075 ms 100.0 % 1.075 ms 1.604 us 0.1 % 1.604 us
MyLib_Hello 1 69.453 us 6.5 % 69.453 us 1.163 us 0.1 % 1.163 us
MyLib_MyPrintf 2 1.071 ms 99.6 % 535.696 us 1.071 ms 99.6 % 535.696 us
MyLib_World 1 1.004 ms 93.4 % 1.004 ms 1.043 us 0.1 % 1.043 us
Profile Data for Recursion
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
CR 2 3.131 ms 96.9 % 1.566 ms 2.165 us 0.1 % 1.083 us
main 1 3.232 ms 100.0 % 3.232 ms 1.885 us 0.1 % 1.885 us
MyPrintf 13 3.212 ms 99.4 % 247.105 us 3.212 ms 99.4 % 247.105 us
Recurse 11 24.133 ms 746.7 % 2.194 ms 13.995 us 0.4 % 1.272 us
Wazzup 1 1.022 ms 31.6 % 1.022 ms 1.724 us 0.1 % 1.724 us
Profile Data for StructorPlus
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
__static_initialization_and_des 2 2.674 ms 36.6 % 1.337 ms 2.326 us 0.0 % 1.163 us
_GLOBAL__sub_D_TheGlobalClass 1 1.607 ms 22.0 % 1.607 ms 1.203 us 0.0 % 1.203 us
_GLOBAL__sub_I_TheGlobalClass 1 1.069 ms 14.6 % 1.069 ms 1.564 us 0.0 % 1.564 us
Hello() 1 1.524 ms 20.9 % 1.524 ms 1.243 us 0.0 % 1.243 us
main 1 4.632 ms 63.4 % 4.632 ms 5.173 us 0.1 % 5.173 us
MyPrintf(char*) 5 7.292 ms 99.8 % 1.458 ms 7.292 ms 99.8 % 1.458 ms
TestClass::TestClass() 2 2.636 ms 36.1 % 1.318 ms 2.967 us 0.0 % 1.484 us
TestClass::~TestClass() 2 3.139 ms 42.9 % 1.569 ms 2.486 us 0.0 % 1.243 us
Tests built using GCC 11.1.0 launched from Shell:
Profile Data for MultiThread
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.005 s 100.0 % 1.005 s 1.002 s 99.6 % 1.002 s
MyPrintf 2 3.773 ms 0.4 % 1.886 ms 3.773 ms 0.4 % 1.886 ms
Profile Data for SOLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.123 ms 100.0 % 1.123 ms 2.165 us 0.2 % 2.165 us
MyLib_Hello 1 74.746 us 6.7 % 74.746 us 1.083 us 0.1 % 1.083 us
MyLib_MyPrintf 2 1.118 ms 99.6 % 559.095 us 1.118 ms 99.6 % 559.095 us
MyLib_World 1 1.046 ms 93.1 % 1.046 ms 1.083 us 0.1 % 1.083 us
Profile Data for LinkLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 989.708 us 100.0 % 989.708 us 1.724 us 0.2 % 1.724 us
MyLib_Hello 1 72.902 us 7.4 % 72.902 us 1.243 us 0.1 % 1.243 us
MyLib_MyPrintf 2 985.658 us 99.6 % 492.829 us 985.658 us 99.6 % 492.829 us
MyLib_World 1 915.082 us 92.5 % 915.082 us 1.083 us 0.1 % 1.083 us
Profile Data for Recursion
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
CR 2 3.078 ms 96.7 % 1.539 ms 2.085 us 0.1 % 1.043 us
main 1 3.184 ms 100.0 % 3.184 ms 1.604 us 0.1 % 1.604 us
MyPrintf 13 3.165 ms 99.4 % 243.438 us 3.165 ms 99.4 % 243.438 us
Recurse 11 24.184 ms 759.6 % 2.199 ms 13.835 us 0.4 % 1.258 us
Wazzup 1 969.177 us 30.4 % 969.177 us 1.644 us 0.1 % 1.644 us
Profile Data for StructorPlus
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
__static_initialization_and_des 2 2.570 ms 35.6 % 1.285 ms 2.286 us 0.0 % 1.143 us
_GLOBAL__sub_D_TheGlobalClass 1 1.541 ms 21.3 % 1.541 ms 1.163 us 0.0 % 1.163 us
_GLOBAL__sub_I_TheGlobalClass 1 1.032 ms 14.3 % 1.032 ms 1.724 us 0.0 % 1.724 us
Hello() 1 1.531 ms 21.2 % 1.531 ms 1.404 us 0.0 % 1.404 us
main 1 4.650 ms 64.4 % 4.650 ms 5.213 us 0.1 % 5.213 us
MyPrintf(char*) 5 7.206 ms 99.8 % 1.441 ms 7.206 ms 99.8 % 1.441 ms
TestClass::TestClass() 2 2.597 ms 36.0 % 1.299 ms 2.687 us 0.0 % 1.344 us
TestClass::~TestClass() 2 3.085 ms 42.7 % 1.542 ms 2.566 us 0.0 % 1.283 us
Tests built using GCC 11.1.0 launched from Shell via run:
Profile Data for MultiThread
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.006 s 100.0 % 1.006 s 1.002 s 99.6 % 1.002 s
MyPrintf 2 3.971 ms 0.4 % 1.986 ms 3.971 ms 0.4 % 1.986 ms
Profile Data for SOLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 1.123 ms 100.0 % 1.123 ms 2.446 us 0.2 % 2.446 us
MyLib_Hello 1 70.255 us 6.3 % 70.255 us 1.123 us 0.1 % 1.123 us
MyLib_MyPrintf 2 1.119 ms 99.6 % 559.295 us 1.119 ms 99.6 % 559.295 us
MyLib_World 1 1.051 ms 93.5 % 1.051 ms 1.083 us 0.1 % 1.083 us
Profile Data for LinkLibTest
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
main 1 979.242 us 100.0 % 979.242 us 1.724 us 0.2 % 1.724 us
MyLib_Hello 1 69.694 us 7.1 % 69.694 us 1.203 us 0.1 % 1.203 us
MyLib_MyPrintf 2 975.232 us 99.6 % 487.616 us 975.232 us 99.6 % 487.616 us
MyLib_World 1 907.824 us 92.7 % 907.824 us 1.083 us 0.1 % 1.083 us
Profile Data for Recursion
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
CR 2 3.078 ms 96.3 % 1.539 ms 2.005 us 0.1 % 1.003 us
main 1 3.196 ms 100.0 % 3.196 ms 1.764 us 0.1 % 1.764 us
MyPrintf 13 3.177 ms 99.4 % 244.348 us 3.177 ms 99.4 % 244.348 us
Recurse 11 23.465 ms 734.2 % 2.133 ms 13.794 us 0.4 % 1.254 us
Wazzup 1 1.046 ms 32.7 % 1.046 ms 1.724 us 0.1 % 1.724 us
Profile Data for StructorPlus
Function Name # of Calls Incl. Time Incl. % Incl. Avg. Excl. Time Excl. % Excl. Avg.
------------------------------- ----------- ----------- ------- ----------- ----------- ------- -----------
__static_initialization_and_des 2 2.646 ms 35.8 % 1.323 ms 2.246 us 0.0 % 1.123 us
_GLOBAL__sub_D_TheGlobalClass 1 1.557 ms 21.1 % 1.557 ms 1.163 us 0.0 % 1.163 us
_GLOBAL__sub_I_TheGlobalClass 1 1.092 ms 14.8 % 1.092 ms 1.925 us 0.0 % 1.925 us
Hello() 1 1.582 ms 21.4 % 1.582 ms 1.243 us 0.0 % 1.243 us
main 1 4.746 ms 64.2 % 4.746 ms 4.972 us 0.1 % 4.972 us
MyPrintf(char*) 5 7.379 ms 99.8 % 1.476 ms 7.379 ms 99.8 % 1.476 ms
TestClass::TestClass() 2 2.677 ms 36.2 % 1.339 ms 2.286 us 0.0 % 1.143 us
TestClass::~TestClass() 2 3.126 ms 42.3 % 1.563 ms 2.406 us 0.0 % 1.203 us
The results i've posted earlier are "Tests built using GCC 11.1.0 launched from Workbench".