Mex profile function in visual studio

In here it explains how to profile the .exe file in visual studio. Is there a way to profile mex code using the same procedure?

Thank.

+4
source share
1 answer

Are you sure you can. Just let me generate debugging information (characters) when creating the MEX file and connect to MATLAB.exe from the Analyze-> Profile menu in Visual Studio.

, MEX Visual Studio. , MEX VS ( mex), ( Linker-Advanced-Profile), , MATLAB.exe Analyze- > Profiler- > Attach/detach....

mex MATLAB, MEX , :

mex -g -O -largeArrayDims myMEX.cpp

MEX VS-, mex, , , -O , . EDIT. mexopts.bat /DEBUG /PROFILE ( !) LINKFLAGS. -g mex, .

EDIT 2. R2014a MEX .bat . XML , C:\Users\Jon\AppData\Roaming\MathWorks\MATLAB\R2014a\mex_C_win64.xml.

+8

Source: https://habr.com/ru/post/1537932/


All Articles