VS2013 - Configuration requirement to use performance profiler on projects - c++

In VS2013, I used to be able profile the performance of my projects of my c++ solution by intrumentation. Recently, I had to change a few things to make my project compile correctly in release, and now my projetss are now shown anymore as projet to profile in the dialog.
See: http://imgur.com/edit
I must have removed something required for the performance profiling of visual studio. I verified that I still have /DEBUG in the linker, and /PROFILE.
Anybody know what are the other requirement that could be missing ?
Thanks

We have been moving to our new profiling platform the performance and diagnostics hub http://blogs.msdn.com/b/visualstudioalm/archive/2013/07/12/performance-and-diagnostics-hub-in-visual-studio-2013.aspx . You can go to the Analyze -> Profiler -> New Performance Session. That will cause the performance explorer to open up. You can then right click on targets and select Add target project to get your project selected. Let me know if this does not work for you

Related

Visual studio 2015 profiler not showing anything from my code

I'm trying to use profiler from Visual Studio 2015 Community for CPU usage, and all I get is just my exe and [External code], nothing else:
There is a generated pdb file, and I tried to clean and rebuild my project, disabled just my code; could someone help me ? Thanks.
Try this: Debug -> Start Diagnostic Tools Without Debugger and from there select Performance Wizard rather than CPU Usage, and only from there select CPU or other option you need, this solved the problem in my case.
The accepted answer didn't work for me - in my case the problem seems to be that I didn't have Debug Info generated in my Program Database File.
The fix I needed was to change Configuration Properties → Linker → Debugging → Generate Debug Info to Yes for my Release configuration, and then recompile all.
In my case the problem was resolved by checking "Enable .net Framework source stepping" option in Tools > Options > Debugging > General. This would also disable "Enable Just My Code".
On a side note, it appears that VS2015 profiler is not particularly effective in finding out finalizer issues if you have lot of disposible objects that you never explicitly dispose (causing finalizer thread to over work). I used JetBrain dotTrace which did pointed out this issue.
I found this thread, and then found a solution... At least in the VS2015 Update 3, the Diagnostic Tools -> CPU Usage -> Filter drop-down has a "Show External Code" checkbox, which when checked expands all [External Code] placeholders.
Sometimes, it is just the lack of relevant information that may cause such error.
In some of my cases, just try cleaning the solution/builds and then start again and the problem would be fixed.

VS2013 integration with Intel Fortran Compiler

I have several C++ codes I develop in VS2013 Professional. Today, I installed the Intel Fortan Compiler (Composer XE2013 SP1), and now none of my C++ Projects will load. When I open my solution, I see:
myprojectname (load failed)
The Project requires user input. Reload the project for more information
If I reload the project, I get a popup error that reads:
Parameter "path" cannot be null.
Any suggestions on how to solve this without just reinstalling VS?
Thanks!
A Google search on this error message tends to suggest that you may get this if the project is on a network drive. The recommended solution is to right click on the project (in Solution Explorer), select Reload Project, and respond to the prompts.

VS2013 gets hung while compiling

I've a solution with ceratin no: of projects (all of them EXE projects in VC++).
I use VS2013.
This is tied to a version control system (Perforce).
I see that as soon as I start building any of the projects in this particular solution, the VS gets hung.
I see a text "Not Responding" at the top of the VS window.
Howvever teh compilation happens successfully but it takes a very long
time for the compilation due to this hang.
Id the expected compilation duration is "10seconds" it takes 3 mins to compile.
THis problem is seen in both Relaese and debug mode.
A point to note it that the very same projects were building super fast few days back & this issue started few days back.
Evevry other solution and it's projects (except this particular solution projects) are compiling very fast.
Any help is really useful.
You can also try to reset Visual studio settings trough:
Tools > Import and Export settings > reset all settings
this will reset all enviroinment settings, then restart visual studio.
edit:
I would also create a new project and copy/paste header and source files from old project to new one, and then compile.
I am not sure if you are using the P4VS Perforce Plugin with Visual Studio or not. However, there is a possibility that the compile is changing files that are checked into perforce or possibly somehow triggering an update. If you are using P4VS, please try building with it disabled and see if that
builds faster.
Try restarting your computer to see if that works. You may have some memory that was leaked from your program which is making it compile slower than usual. A restart of the computer should free all the memory.

Visual Studio 2012 "Apply Code Changes" menu-item is missing for native C++ debugging (probably due to managed-code projects in solution)

I suspect that this relates to having managed-code DLL projects in the solution, since in VS2010 the menu-item was also missing unless I manually unloaded all managed-code projects from the solution.
In VS2012 though, I now have many more managed DLLs in the solution (not by personal choice), so I am hoping that there might be a way to enable "Apply Code Changes" even with managed DLLs in the solution.
I have set my local debugging mode to "Native Only" and also edited the "Edit and Continue" options under Debug - Options and Settings... to enable native "Edit and Continue", but still I get no "Apply Code Changes" icon under the Debug menu.
If I manually add the 'Apply Code Changes' button to a toolbar, it remains continually disabled.
Please can anyone offer any hints and tips as to how I might get this to work, or do I simply have to unload all managed-code projects from the solution?
Supposing that I do have to unload the managed-code projects, is there a straightforward way to maintain two different sets of solution options so that I can quickly decide whether I wish to mount all projects or native-only?
Although I do not have a definitive solution to your problem (I am an a similar position myself) I suspect that a good thorough reading of this MSDN document would be productive for us both:
Edit and Continue (Visual C++)

Win32 application (VS2010) runs much slow then a console in Eclipse (c++)

I have a project which I created in Eclipse c++. The project invokes a function that does a lot of loops (Thousands) to calculate the result.
When I run it in Eclipse it takes 1 minute (~70 seconds).
I wanted to add a GUI to the project so I opened a WinForm (Win32) project in VisualStudio2010 and moved all files of the project from the eclipse directory to the new directory (created for VS2010).
Now, when I run the form, the function takes 4-5 minutes. I tried to cancel the progress bar but it wasn't the problem, so I understood that long time is not because of the GUI.
I think the problem is in the compilation in VS2010. I tried to change some Optimizations properties, but the project couldn't be compiled...
How can I reduce the run time?
Thanks!
Basically you answered your own question:
I think the problem is in the compilation in VS2010. I tried to change
some Optimizations properties, but the project couldn't be compiled...
however, it's hard to answer it, since there is a lot of optimization options in both of compilers, it's hard to tell what option makes it much faster/slower. It's also possible (and most probably is) that MS compiler just cant produce exactly the same or similar code to that of Eclipse's compiler.
Your options is to "play" with optimization switches of the VS compiler and see if it helps. You can try to compare it's options to ones of the Eclipse to find differences, but most likely they will be just too different.
As #Zuljin correctly mentioned also check you selected Win32 project, not CLR (Windows Forms) application. If you are using CLR project, then it's natural it will possibly run slower than Native program type.
My bet would be the debugger in VS2010
Build with your optimized settings but then start the generated file from the explorer, not from Visual Studio. You can also deactivate the debugger attachment in the project settings.
See if the run time is any different.