Visual Studio Community 2019 hangs during “Preparing data” for performance profiler for a MATLAB MEX file

烈酒焚心 提交于 2020-06-27 16:30:08

问题


I am attempting to profile a MEX (.mexw64) file using Visual Studio Community Edition 2019.

This MEX file was created from a C++ file that we wrote, and was compiled using GCC and G++, with debugging symbols enabled. (-g, not -g3 if that matters)

Here were my steps:

1: Open MATLAB

2: Run the script until the point before the MEX is called using a breakpoint

3: Attach MATLAB to VS using Analyze, then Performance Profiler..., then Choose Target, and selecting Running Process and choosing MATLAB (R2016b)

3.5: Select "CPU usage data" from the two options.

4: Start collection

5: Quickly go back to MATLAB, start the script

6: Wait for MEX call to finish (about 6 seconds total)

7: Choose "Stop collection" in Visual Studio

The result is that it says "Preparing data. The output window may contain additional information".

When I choose "Open Details" I just get a window that says "Preparing CPU usage data...74%" and it hasn't budged in half an hour.

Anyone have any thoughts on how to fix this?

EDIT: It looks like if I select a time slice from that 6 seconds that wasn't where the MEX call was made, it does actually work and provide some info. (Seems like lots of dlls that MATLAB uses) but that doesn't help me at all since I need info about the MEX file and that's it.

来源:https://stackoverflow.com/questions/56743294/visual-studio-community-2019-hangs-during-preparing-data-for-performance-profi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!