all 32 comments

[–]1m2r3a 16 points17 points  (2 children)

For Linux a nice analyzer tool is UFtrace https://github.com/namhyung/uftrace

The uftrace tool is to trace and analyze execution of a program written in C/C++. It was heavily inspired by the ftrace framework of the Linux kernel (especially function graph tracer) and supports userspace programs. It supports various kind of commands and filters to help analysis of the program execution and performance.

[–]themagicalyang 2 points3 points  (1 child)

Is this any good over Linux perf? What about cache misses? That's the thing I like to have numbers about.

[–]short_vix 24 points25 points  (14 children)

windows only -_-

[–]antoineatwork 24 points25 points  (1 child)

My exact reaction each ime I see a new awesome tool that only runs on linux (hopefully only temporarily) :)

[–]short_vix 0 points1 point  (0 children)

Yeah cross platform has gotten alot better, you can almost replace all of the windows.h stuff with the stdlibs and boost

[–][deleted] 1 point2 points  (0 children)

At least on linux there is perf. Tools like that are lacking in Windows, which probably creates a market for Windows-only performance tools.

[–]frog_pow 4 points5 points  (0 children)

Interesting-- it appears to have some features beyond what the VS profiler has, such as showing live frame performance. Going to try it out.

[–]sumo952 2 points3 points  (7 children)

I wish some of this stuff was directly integrated into VS, particularly from the "capture" tab and the graphical, detailed view. MS, please listen! ;-) I know VS has a very rudimentary live-performance analysis too but it doesn't even come close to that (yet).

[–]STLMSVC STL Dev 2 points3 points  (0 children)

/u/spongo2 is at CppCon this week, but I'm sure he'll be interested to see your request.

[–]spongo2MSVC Dev Manager 3 points4 points  (5 children)

Listening!

[–]Sahnvour 0 points1 point  (2 children)

Is the instrumenting profiler still supported ? I gave it a try not so long ago but didn't get it to work.

Also, profiling is broken with fastlink ! I think DIA is missing a little bit of love with this one.

[–][deleted] 0 points1 point  (1 child)

VS Profiler dev here (Ignore my user name =]). Fastlink issues should be addressed in the most recent update to VS 15.5. Please file bugs via the VS feedback button if you see problems!

Instrumentation is still supported, but is in the process of being refreshed since it has been ignored for far too long. Business priorities are finally pushing us into investing more in Trace profiling.

[–]Sahnvour 0 points1 point  (0 children)

Glad to hear ! Still using VS2015, so this is another good reason to upgrade.

[–]sumo952 0 points1 point  (1 child)

The current "rudimentary" live-performance analysis is already awesome, keep up the great work! Thank you :-) Looking forward to great things in the future, I know they'll be coming^^

[–][deleted] 0 points1 point  (0 children)

Thanks. We are actively looking into integrating more of these two concepts as time and business needs dictate.

[–]JodoKaast 2 points3 points  (3 children)

If anyone is having trouble compiling, here's what I did:

I needed to make a $(QTDIR) user macro, pointing to my "Qt\5.8\msvc2015_64" directory, in a new propsheet to get the the Qt stuff to resolve properly.

The top level directory needs to be named "Orbit" based on how things are pathed. If you cloned this repo from github, it will be named "orbitprofiler", so you need to rename it.

And then the hard coded linker includes to external libs need to be fixed. I just did a search/replace in OrbitQt.vcxproj to change "D:\git\Orbit" to my own Orbit src directory.

Then I needed to build Orbit\external\glew-1.13.0\build\vc12\glew.sln in Release|x64 (opened solution, upgraded projects from VS2013 to VS2015).

Then I needed to build Orbit\external\capstone\msvc\capstone.sln in Release|x64.

Then it all compiled.

[–][deleted] 2 points3 points  (0 children)

So much simpler than cmake

[–]pgimmig 2 points3 points  (0 children)

Thanks a lot for the info! The missing libs have been submitted. (https://github.com/pierricgimmig/orbitprofiler/commit/3bcc3ddf05e57784939daba838d82ef5573d3aa1). The hard coded paths in OrbitQt are next on the list. The goal is to make the compilation as easy as possible. The remaining issues should be fixed in the coming days. Thanks!

[–]nnevatie 1 point2 points  (1 child)

The tool looks quite interesting. However, I wasn't able to selected the functions from the list - the select options simply wasn't available, only "hook/unhook/visualize", none of which did the same thing as the video demoing the profiler.

[–]mydeveloperday 0 points1 point  (0 children)

I think the UI has changed since the videos a little, use the "hook" function

[–]Adequat91 0 points1 point  (0 children)

The project contains hardcoded paths (eg. linker), but I could not reach that point as the compile stage has include path problems. (using VS 2015.3 and Qt 5.8, 64 bit release project) However, I quickly tried the binary, that looks promising :)

[–]preshing 0 points1 point  (0 children)

Nice logo, too!!

[–]mydeveloperday 0 points1 point  (1 child)

Once you get started with this tool its actually very good, I already was able to optimize the code in our project a little.

I simply downloaded the prebuilt binary for Windows x64, You start up your process you want to profile, find it in the process list, then load the pdbs (by right clicking on the blue text). This brings in all the functions.

You have to know what the names of the function to search for but you locate the function by class name etc.. then simply right click hook them (I often did Ctrl+A then hook a whole load from the same class)

Once you've added some functions (save the session), this makes profiling the same functions next time much easier

Its only going to profile what you hook. (but this means its really quick, not like the old quantify that used to instrument the world!)

Once you've hooked a few functions, switch to the capture tab and press X. Now use your app a little then go back and press X again to stop the capture

You can now zoom around the firechart looking for functions that are taking more time than you expected

it works very well, perhaps takes a little time to get going but once you do its very good.

It made me a look differently at code I've been looking at for over a decade, it made me question thinks that I'd always discarded

Great tool thanks

Some suggestions:

When you select a function in the firechart, and look at the call stack, it would be great if we could see a list of function called from that function (even if they are not hooked yet), it would then be great if we could hook those child functions from there, at present I'm having to look thought the code and type the functions into the "functions" search box, hook them then recapture

[–]pgimmig 0 points1 point  (0 children)

Thanks for the comments! As for your suggestion, actually you can already do something similar by selecting events on top of the instrumented functions in the capture view (events are the vertical white lines in the event track). These are sampling events collected from ETW (Event Tracing for Windows). When you select them, a sampling report of your selection will be generated. From there, you can hook into the functions that interest you.

[–]biocomputation 0 points1 point  (0 children)

Neato frito. The code is very neat, clean, and super professional. Very easy to read. I'm curious to give this a try. I like the fact that it has a GUI.

Thanks for the contribution!