Hi Joe,

Actually, I've been seeing exactly the same problem too, if I to
dynamically attach to the running JRuby (which is a most simplest way
to profile the running app with no modifications how the app starts).

Oh well, so I reverted to the good old/proper way to start profiling
app with additional command line parameters, and then it worked just
fine :)

So, here's what I do:

1. I copied jruby.bat to jruby-profile.bat

2. Added the following after %_VM_OPTS% but before -cp there:

-agentpath:D:\re\NetBeans-6.0-RC1\profiler2\lib\deployed\jdk16\windows\profilerinterface.dll=D:\re\NetBeans-6.0-RC1\profiler2\lib,5140

(when you follow your profiler wizard you'll be provided with proper
line for your environment)

3. In Netbeans "Attach Wizard", select Attach Method: Local. Attach
Invocation: "Direct".

4. For CPU profiling, create a new custom profile, I called it JRuby.
This can be done from "Attach Profiler" screen (there is a link on the
left: "Create Custom...")

5. In settings: "Entire Application". Filter: "Quck Filter". I
typically select org.jruby.* as inclusion pattern to instrument
classes.

6. Start jruby-profile.bat. It will start, and will wait for
connection, not running anything, which is good: you could start
proifiling from the very start.

And that's it.

Things to be aware of: Running under debugger is much slower (expected).
It's much more useful to analyze snapshots rather than Live Results
(more info available for snapshots, like "Hot Spots" and "Combined".
Combined tab is the most useful one.

Thanks,
  --Vladimir


On Dec 4, 2007 5:47 AM, Joseph Athman <[EMAIL PROTECTED]> wrote:
> I don't know if I'm totally missing something here (and I realize this isn't
> a NetBeans support forum :) ) but I can't get the profiler to work in NB.
> The live profiling results just always says "no profiling results available
> yet".  Under Basic Telemetry it says "Instrumented: 0 Methods" which I'm
> sure isn't right.  Can't seem to figure it out though.  I'm sure other
> people have had better luck than me.  I haven't ever done much in NetBeans
> but I'm trying to get acquainted with it because of its 1st class ruby
> support.  Thanks for any help.
>
> Joe
>
>
>
> On Dec 3, 2007 9:04 PM, Charles Oliver Nutter <[EMAIL PROTECTED]>
> wrote:
> >
> > Joseph Athman wrote:
> > > Charlie, are there any specific packages/classes/methods that you think
> > > could use some work in a profiler?  Maybe some tests that you think
> > > should run faster but aren't for some reason?
> >
> > Anything IO-related really needs some attention. For example, that Wide
> > Finder benchmark is almost entirely IO bound, and I'm sure there's a lot
> > that could be improved.
> >
> > The IO classes in question are RubyIO/RubyFile and then all the IO
> > backends that inherit from IOHandler (IOHandlerSeekable, IOHandlerNio,
> > and so on). They're kindof a nasty mish-mash of implementations, and IO
> > remains one of the ugly bottlenecks in JRuby (not as bad as Regex was,
> > but not great).
> >
> >
> >
> >
> > - Charlie
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to