Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5017 Discussions

the difference between the source function and function

去你的
Beginner
1,648 Views

Hi. 

I am trying using vtune to analysis the my code. When I use the microarchitecture analysis. It shows my code is terrible.

_0-1713135474237.png

Then I go to the bottom-up windows. Trying to see the which function causes this problem. When I choose Function/stack in group:

_1-1713135556869.png

It shows my four function run very well.(My four functions is update_slack ....)

But when I choose source / function / Call stack in group

It shows that:

_2-1713135676598.png

It seems that these functions cause my problem. But actually I even not use this function in my code!!.

I have two problem:
1, What is the difference between the source function and function.

2, I never use this function. How these functions appears in my profilers?

Best,

lzxdjb

 

 

0 Kudos
12 Replies
yuzhang3_intel
Moderator
1,587 Views

Eigen is a C++ template library for linear algebra,  if your functions call these library functions? By default, the child processes will be analyzed by the VTune, if the functions are called by the processes? From the VTune result, the bottlenecks should be located in the library.

 

Hotspots analysis type with call stack can tell you the callers of the library functions.

0 Kudos
去你的
Beginner
1,584 Views

I never call Eigen::internal::function;

In fact, These kind of functions even never appears in the Eigen library!

0 Kudos
yuzhang3_intel
Moderator
1,574 Views

It is interesting.  Did you launch one application or profile system? Please post your command line.

0 Kudos
去你的
Beginner
1,572 Views

I actually run a binary file in the VTune-gui. I do not run any command line. I think I just launch one application, put the binary file into it, and I run microarchitecture analysis.

0 Kudos
yuzhang3_intel
Moderator
1,570 Views

Please share the binary if possible. I can try it locally.

0 Kudos
去你的
Beginner
1,558 Views

This is the binary's zip. 

0 Kudos
去你的
Beginner
1,552 Views

MY code actually use four function: update_slack update_primal update_dual update_linear_cost. I think this four functions should be the top of time. But actually I even could not find them since they cost so short time compare to those Eigen::internal  .... , that even not appear in Eigen library!

0 Kudos
yuzhang3_intel
Moderator
1,530 Views

It looks like the binary is based on Mac OS? I can't run it on Windows and Ubuntu. Actually, VTune doesn't support Mac OS anymore.

0 Kudos
去你的
Beginner
1,506 Views

I run it in ubuntu. I guess because binary can only run in local machine.

here is the source code:

you can first :

mkdir build

cd build

cmake ..

make

and the binary file is in the ../build/examples/original_tine_profile.

0 Kudos
yuzhang3_intel
Moderator
1,485 Views

Failed to build.

yuzhang3@yuzhang3-10710:~/workspace/isvc_jira_ips/TinyMPC/build$ make
[ 16%] Building CXX object src/tinympc/CMakeFiles/tinympc.dir/admm.cpp.o
In file included from /home/yuzhang3/workspace/isvc_jira_ips/TinyMPC/include/Eigen/Eigen.h:61,
from /home/yuzhang3/workspace/isvc_jira_ips/TinyMPC/src/tinympc/types.hpp:3,
from /home/yuzhang3/workspace/isvc_jira_ips/TinyMPC/src/tinympc/admm.hpp:3,
from /home/yuzhang3/workspace/isvc_jira_ips/TinyMPC/src/tinympc/admm.cpp:4:
/home/yuzhang3/workspace/isvc_jira_ips/TinyMPC/include/Eigen/Eigen/Core:39:52: error: missing binary operator before token "("
39 | #if EIGEN_COMP_MINGW && EIGEN_GNUC_STRICT_LESS_THAN(6,0,0)
| ^
/home/yuzhang3/workspace/isvc_jira_ips/TinyMPC/include/Eigen/Eigen/Core:185:10: fatal error: src/Core/arch/Default/ConjHelper.h: No such file or directory
185 | #include "src/Core/arch/Default/ConjHelper.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/tinympc/CMakeFiles/tinympc.dir/build.make:76: src/tinympc/CMakeFiles/tinympc.dir/admm.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: src/tinympc/CMakeFiles/tinympc.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

0 Kudos
去你的
Beginner
1,474 Views

It is very strange though. 

_0-1713325860101.png

Try this one?

0 Kudos
yuzhang3_intel
Moderator
1,443 Views

Built success. I captured one hotspot as attached. You can see the call stack information about Eigen.

yuzhang3_intel_0-1713340640516.png

 

0 Kudos
Reply