Profiling the plugin.

   2099   3   1
User Avatar
Member
41 posts
Joined: Feb. 2014
Offline
Hello, What is the best way to proceed for profiling the code? I'm using the built-in profiler in VS2010 without no luck. When I start the profiling session (CPU sampling) the report is showing me the time Houdini spends in all the dlls, like the graphics drivers, or the opengl driver, instead of showing me the time spent in each function of the custom plugin.

When doing the instrumentation, VS opens Houdini with the default scene. That's it.

I could use the random-pausing technique but the code ends so fast (0.1 s) that I'm unable to get any useful sample.

Unfortunately, I haven't found any post related to profiling code here.

Thanks in advance
User Avatar
Member
7735 posts
Joined: July 2005
Offline
If you have fast code like that, especially if during node cook, then you might want to consider making your cook much longer, say by looping it a few thousand times. Secondly, make sure you built your plugin with symbols (make sure that you're using the -Z7 or -Zi compiler option).

I've never used VS2010 for profiling but I've had moderate success with VS2012 with the win64-vc11 build. I've also used GlowCode in the past but version 8.0 was the last one I had.
User Avatar
Member
41 posts
Joined: Feb. 2014
Offline
edward
If you have fast code like that, especially if during node cook, then you might want to consider making your cook much longer, say by looping it a few thousand times. Secondly, make sure you built your plugin with symbols (make sure that you're using the -Z7 or -Zi compiler option).

I've never used VS2010 for profiling but I've had moderate success with VS2012 with the win64-vc11 build. I've also used GlowCode in the past but version 8.0 was the last one I had.

I just found the way without using symbols* applying the infinite monkey theorem.

Go to:

Analyze -> Profiler ->Attach/Detach -> Select the houdini.exe

Cook the SOP (few frames)

Stop profiling

The report is bloated is with an infinite, unnecesary amount of dlls (this is why I couldn't find the function), doubleclick the one that has cookmySOP (if you can find it).

That's it.

Hope this helps.

*(btw the hcustom -d command doesn't print -Z7 -Zi, I used -Zc:forScope)
User Avatar
Member
678 posts
Joined: July 2005
Offline
pedro3145
*(btw the hcustom -d command doesn't print -Z7 -Zi, I used -Zc:forScope)

Yes it does, but to see them you need to specify correct flags to print output flags for debug mode. See this topic => http://forums.odforce.net/topic/17885-visual-studio-startup-project/?gopid=108460#entry108460 [forums.odforce.net]
  • Quick Links