Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Thursday, January 22, 2015

VS Community profiling

Some notes jotted down while I was playing with this profiler for the first time.

Profiling

  • Open the "Performance Explorer"
  • Right click on a project - "Start profiling"
  • If asked to upgrade your profile, say yes
  • Switch of sampling on your target until at the point you want to profile.
  • Once you are finished look at the .vsp file, it may take some processing to show up
  • You need to sample long enough to get some moderaly accurate samples
  • Current View (top selection box): Modules is very useful in Unreal as you might want to differentiate between your code and engine code.
  • Sample for long enough to get > 1 samples in functions you care about (or enough in functions you don't to eliminate the need to care). More samples makes your game perform slower!
  • If you don't have "Collect Samples" ticked at launch it will complain about not having any executables selected for profiling, that's okay.
  • I've found that sometimes the application doesn't launch through the performance explorer, in which case you can simply launch normally and "attach"
  • When you stop profiling and first see the result you see a time line in seconds - you can select a section of this to generate data from, by default the whole time is used.
  • On that same summary page - top rightish, there is an option to "Show Just My Code", this is very helpful to getting to the bits you are working on.


Unreal editor - finding your update code - look here:

UE4Editor-UnrealEd.dll
-FEngineLoop::Tick
--GuardedMain
---WinMain
----_tmainCRTStartup
-----UE4Editor.exe
------My update functions should be here

Friday, January 9, 2015

VS Community

As my friend Rich pointed out Visual Studio Community, a more fully fledged IDE than the Express version, is now available.

20 minutes into use...

  • Peek definition is cool - you can even edit in the definition
  • Intellisense is faster - perhaps usable with Unreal? The jury is out... but working intellisense is a huge productivity booster
  • Working debugging visualiser macros (see this and follow directions at the bottom for UE4.natvis)
    • NOTE: The installation under My Documents worked for me, not the other one
    • This allows you to see strings and arrays in the debugger without the 
  • Profiling support
  • Better symbol resolution - I always meant to get engine symbols working with VSExpress but they just worked out of the box with the community edition.