Skip to main content
GameDev.net gamedev.net
🔒 Locked

SlimTune Profiler for .NET (0.1.5 Release) Updated!

Started by Promit Aug 8, 2009 at 12:04 PM 16 replies 8k views
Original Post
Promit
Promit
For those of you that don't know, I've been working on a profiler. I have a journal post about it here. This is the 0.1.5 release, which I think I'm making my first official release. Both x86 and x64 targets are supported, for all XP, Vista, 7, and probably the servers too. I recommend uninstalling a previous version if you've got one. Link to Installer Right now only sampling mode profiling is supported in the public build. The remote profiling and real-time profiling features are both fully functional, and I've included a pair of prototype visualizers. These are both based on existing profilers, possibly a little too faithfully (their originals do some odd things). Most people seem to favor the dotTrace style visualizer, but I'm looking for feedback on both. The whole thing is open source under the MIT license, and the visualizers will actually be pluggable when it's done, so you'll be able to write your own and drop them in -- or publish them. (In theory they're pluggable now but I haven't tried it yet.) This is hopefully the final release of the 0.1 series -- I think I've got nearly all the sampling bugs knocked out and the major features are there. If you guys could try it out and let me know what you think, I'd really appreciate it. I'm especially interested in applications that are drastically affected performance-wise by this thing. My hope is that this particular build will supplant NProf completely. [Edited by - Promit on August 13, 2009 2:32:33 PM]
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
rip-off
rip-off
Looks good. I threw a little XNA game I have been working on onto it, works great. I don't have too much time to really mess around with it right now though...
Promit
Promit
I forgot to mention, I'm curious what the effect on runtime performance is when the profiler is active with your projects.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
dblack
dblack
Any chance of a list of dependancies in order to build from SVN?

It seems to require some SQL things and I am guessing additional C++ libraries in order to build from the google code SVN version. I am using vanilla VC++ and VC# express 2008.
Promit
Promit
SQL Server Compact, which is included in the repository under install\ExtraFiles. You'll also need boost set up and built correctly. I should warn you, the SVN tends to be hilariously unstable at any given point in time.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Oluseyi
Oluseyi
Quote:
Original post by Promit
SQL Server Compact, which is included in the repository under install\ExtraFiles. You'll also need boost set up and built correctly. I should warn you, the SVN tends to be hilariously unstable at any given point in time.

Time for branch management? [smile]
Promit
Promit
Nobody is supposed to be playing with the source code right now, it's nothing close to a stable app and no one's on the project right now. I make the source available, but I'm not making any promises about it [smile]
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
dblack
dblack
Hmm, seems to require ATL which isnt included in the express editions or the more recent windows SDKs...
benryves
benryves
I just tried it out here, and it certainly seems to be working though I'm not entirely sure how I should be reading the results. [oh] 49.96% is spent in Thread #3 (System.Threading.ThreadHelper.ThreadStart()) that I don't recognise (it contains references to remoting further down the tree, is this part of the profiler?) 30.53% of the rest of the time spent in Device.Present in the main application thread (which I do at least recognise); these two large values render most of the other results pretty small (lots of 0.1% or 0.0% scores) which aren't too easy to compare to eachother.

Of the 20% remaining, the profiler has shown me that one method call is responsible for 5.91% total CPU time, which I've trimmed to about 3.49%. Cheers! [grin]

I look forwards to seeing where this project goes; a good, free profiler is something .NET seems to be missing!
[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]
dragonhawk360
dragonhawk360
Wow, amazing. Props to you, Promit, as it is about time someone began making a decent free .NET profiler. It works very well, considering it is still a beta (Or alpha, I don't know what you call it). I would like to see a whole set of Slim products for .NET, and this (along with SlimDX) are just the beginning I am guessing. I would ask what's next, but let's not get too far ahead of finishing this. Good job.
Sirisian
Sirisian
woot. This'll come in handy later. Runs fine and it's rather intuitive. I would suggest adding a dialog that says "You didn't specify the results directory. Would you like to use the current executable directory?".

I tested it with my WIP socket server and it's showing exactly what I expected.
I was just testing with 10 clients sending 10 packets/sec. (The console thread just has an admin I/O interface).

It's perfect right now for my needs :P
Promit
Promit
I've updated the original post with information about the new 0.1.5 release. There is a Ventspace post as well. This is the big one, lots of bugs knocked out and it should be a fully functioning (albeit rough) tool at this point. I'm really eager for feedback, as I personally consider this to be a complete replacement for NProf.

[Edited by - Promit on August 13, 2009 3:34:45 PM]
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Dusho
Dusho
Firstly, thank you for the tool. I think any useful freeware is welcomed.
Will there be a possibility to attach profiler to a process, in the future? As often you'll like to profile only some sub-part of program (or only one testcase from UnitTests, and so on). Until now I used ANTS or YourKit for CPU profiling, but I'm willing to exchange those for some cute freeware solution.
Keep up good work!
Promit
Promit
Quote:
Original post by Dusho
Will there be a possibility to attach profiler to a process, in the future? As often you'll like to profile only some sub-part of program (or only one testcase from UnitTests, and so on).
You can already do this, in that once an app has been launched via SlimTune, you can connect and disconnect at will. What is missing right now is the ability to trigger the profiler from the app itself.

You'll be able to stop and start profiling independently of the connection eventually. (This is something I should've realized at the beginning, but it won't be difficult to retrofit.) As part of the profiler API, an app will be able to control this, so you could add a line like SlimTune.BeginProfiling() to your unit test and it would start there. I'm not there yet, but it is planned. Another planned feature is that, if you're using the tracing or hybrid modes, you'll be able to set functions as triggers for the tracing, so you'll be able to get very detailed results on just pieces of the app. I have confirmed that this works, but there's no UI for it and it's kind of unstable right now. Probably in 0.2.0.

I don't think I can compete with ANTS or YourKit, but I am a hell of a lot cheaper. And maybe I can bring a few tricks of my own to the table. (Does anyone have remote profiling other than me?)
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
VizOne
VizOne
Just wanted to drop a post to thank you for developing an alternative .NET profiler. While I have a dotTrace license, it crashes on my SlimDX-based app. A few weeks ago I've actually been looking into the source code of CLR Profiler to find out how profiling under .NET works (it turns out to be pretty comfortable with ICorProfilerCallback2) and had started development on a simple profiler myself - digging out my rusty COM knowledge. So it's quite a coincidence that you come up with a profiler at this very moment. First impression is great! Keep going.

If you've nothing left to do, maybe you could add memory profiling as well. CLR Profiler is pretty nice at it, but it's not that sophisticated.
Promit
Promit
Heh, I think I've actually got more to do than when I started. Like SlimDX, a relatively simple toy is rapidly becoming an insanely ambitious goal. I've left memory profiling a bit low on the priority list because CLR Profiler does an alright job, but memory profiling is definitely coming. As is native profiling, a profiler API, automation, timed snapshots, comparison snapshots...
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.