Hello, Does anybody have any suggestions for profiling ruby code? I''ve been trying to use Profiler__ , but have been running into problems because it basically ignores any C# method invocations. I''ll find out that all my ruby-only code runs quite fast and it''s slow where it''s calling C#(.NET) code. Is there any good way of hunting that down? I''ve also tried looking for any information about Clr.profiler as well, but I''m not sure what that''s for. Thanks, Martin
Tomas should be able to help with this. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith Sent: Thursday, September 10, 2009 2:39 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Profiling IronRuby Hello, Does anybody have any suggestions for profiling ruby code? I''ve been trying to use Profiler__ , but have been running into problems because it basically ignores any C# method invocations. I''ll find out that all my ruby-only code runs quite fast and it''s slow where it''s calling C#(.NET) code. Is there any good way of hunting that down? I''ve also tried looking for any information about Clr.profiler as well, but I''m not sure what that''s for. Thanks, Martin _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
You can use Visual Studio Profiler (see http://www.microsoft.com/downloads/details.aspx?familyid=fd02c7d6-5306-41f2-a1be-b7dcb74c9c0b&displaylang=en, http://blogs.msdn.com/profiler/, http://msdn.microsoft.com/en-us/teamsystem/aa718868.aspx) to look at C# methods. You can also run "ir.exe -profile" to get inclusive times for Ruby methods. This command creates profile.log file in the current directory containing the results. We haven''t tested this command much so you may find some issues with it. Use NGen''d release build of IronRuby. If you run into any issues let us know. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Sunday, September 13, 2009 12:31 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Profiling IronRuby Tomas should be able to help with this. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith Sent: Thursday, September 10, 2009 2:39 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Profiling IronRuby Hello, Does anybody have any suggestions for profiling ruby code? I''ve been trying to use Profiler__ , but have been running into problems because it basically ignores any C# method invocations. I''ll find out that all my ruby-only code runs quite fast and it''s slow where it''s calling C#(.NET) code. Is there any good way of hunting that down? I''ve also tried looking for any information about Clr.profiler as well, but I''m not sure what that''s for. Thanks, Martin _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Hi Tomas, Thanks for your response. I''m actually embedding IronRuby ta add scripting to my application. I''ve tried creating the engine this way: _Engine = Ruby.CreateEngine(x => { x.Options["EnableTracing"] = ScriptingRuntimeHelpers.True; x.Options["Profile"] ScriptingRuntimeHelpers.True; }); For some reason, it doesn''t seem to be giving me any information about the CLR profile. The problem with using the Visual Studio Profiler for us is that (and I''m assuming here) it wont step into the ruby code. Thanks again for your help, Martin On Sun, Sep 13, 2009 at 9:37 AM, Tomas Matousek <Tomas.Matousek at microsoft.com> wrote:> You can use Visual Studio Profiler (see http://www.microsoft.com/downloads/details.aspx?familyid=fd02c7d6-5306-41f2-a1be-b7dcb74c9c0b&displaylang=en, http://blogs.msdn.com/profiler/, http://msdn.microsoft.com/en-us/teamsystem/aa718868.aspx) to look at C# methods. > You can also run "ir.exe -profile" to get inclusive times for Ruby methods. This command creates profile.log file in the current directory containing the results. We haven''t tested this command much so you may find some issues with it. > Use NGen''d ?release build of IronRuby. > If you run into any issues let us know. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville > Sent: Sunday, September 13, 2009 12:31 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Profiling IronRuby > > Tomas should be able to help with this. > > JD > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith > Sent: Thursday, September 10, 2009 2:39 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Profiling IronRuby > > Hello, > > Does anybody have any suggestions for profiling ruby code? ?I''ve been trying to use Profiler__ , but have been running into problems because it basically ignores any C# method invocations. ?I''ll find out that all my ruby-only code runs quite fast and it''s slow where it''s calling > C#(.NET) code. ?Is there any good way of hunting that down? > > I''ve also tried looking for any information about Clr.profiler as well, but I''m not sure what that''s for. > > Thanks, > Martin > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >
I see. There is currently no remedy for this. You can separately get numbers for all C# methods (including those called from Ruby code) using VS profiler and for Ruby methods using "Profile" option. But there is currently no tool that would get you both into the same report. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith Sent: Tuesday, September 15, 2009 10:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Profiling IronRuby Hi Tomas, Thanks for your response. I''m actually embedding IronRuby ta add scripting to my application. I''ve tried creating the engine this way: _Engine = Ruby.CreateEngine(x => { x.Options["EnableTracing"] = ScriptingRuntimeHelpers.True; x.Options["Profile"] = ScriptingRuntimeHelpers.True; }); For some reason, it doesn''t seem to be giving me any information about the CLR profile. The problem with using the Visual Studio Profiler for us is that (and I''m assuming here) it wont step into the ruby code. Thanks again for your help, Martin On Sun, Sep 13, 2009 at 9:37 AM, Tomas Matousek <Tomas.Matousek at microsoft.com> wrote:> You can use Visual Studio Profiler (see http://www.microsoft.com/downloads/details.aspx?familyid=fd02c7d6-5306-41f2-a1be-b7dcb74c9c0b&displaylang=en, http://blogs.msdn.com/profiler/, http://msdn.microsoft.com/en-us/teamsystem/aa718868.aspx) to look at C# methods. > You can also run "ir.exe -profile" to get inclusive times for Ruby methods. This command creates profile.log file in the current directory containing the results. We haven''t tested this command much so you may find some issues with it. > Use NGen''d ?release build of IronRuby. > If you run into any issues let us know. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville > Sent: Sunday, September 13, 2009 12:31 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Profiling IronRuby > > Tomas should be able to help with this. > > JD > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith > Sent: Thursday, September 10, 2009 2:39 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Profiling IronRuby > > Hello, > > Does anybody have any suggestions for profiling ruby code? ?I''ve been > trying to use Profiler__ , but have been running into problems because > it basically ignores any C# method invocations. ?I''ll find out that > all my ruby-only code runs quite fast and it''s slow where it''s calling > C#(.NET) code. ?Is there any good way of hunting that down? > > I''ve also tried looking for any information about Clr.profiler as well, but I''m not sure what that''s for. > > Thanks, > Martin > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >_______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core