[ANN] JRuby 1.5.5 Released

Discussion in 'Ruby' started by Thomas E Enebo, Nov 10, 2010.

  1. The JRuby community is pleased to announce the release of JRuby 1.5.5.

    (Note: Due to a showstopper bug found after the release of the
    jruby-jars gem and
    the inability to remove gem releases from rubygems.org we have skipped
    from 1.5.3 to 1.5.5. The 1.5.5 release is the same release that would have
    been 1.5.4 had we been able to re-release jruby-jars.)

    - Homepage: [http://www.jruby.org/](http://www.jruby.org/)
    - Download: [http://www.jruby.org/download](http://www.jruby.org/download)

    JRuby 1.5.5 is a minor follow-up release to address problems executing
    some commands on Windows, a couple of Marshalling discrepancies with MRI, a=
    nd
    a few other random production-affecting issues. We also improved the outpu=
    t
    and accuracy of --profile (try it out). All users of JRuby 1.5.3 are
    recommended to upgrade to 1.5.5.

    ### 1.5.5 Issues Resolved:
    - JRUBY-4766 Updated jaffl for YourKit compatibility
    - JRUBY-4865 Ant.load_from_ant is broken on Windows
    - JRUBY-4940 Cucumber Japanese example raises exception on JRuby
    - JRUBY-5064 Marshalled ruby hash gets loaded incorrectly
    - JRUBY-5110 kernel.system not working in 1.5.3 on Windows
    - JRUBY-5112 Cannot run 'jruby -S rake test' for Rails project on
    Windows in 1.5.3
    - JRUBY-5122 Webrick socket.readline causes 100% cpu usage
    - JRUBY-5123 Marshal dump format error and inconsistencies with MRI
    - JRUBY-5132 java.awt.Component.instance_of?() expects 2 args=09
    - JRUBY-5133 Backtick operator does not work on Windows in 1.5.3
    - JRUBY-5138 requiring 'ffi' defines class method :error on Module
    - JRUBY-5168 Can't include interfaces in a synchronized class


    --=20
    blog: http://blog.enebo.com=A0 =A0 =A0=A0 twitter: tom_enebo
    mail:
    Thomas E Enebo, Nov 10, 2010
    #1
    1. Advertising

  2. On 11/10/2010 08:06 AM, Thomas E Enebo wrote:
    > We also improved the output
    > and accuracy of --profile (try it out).


    What output are we supposed to see? I just installed 1.5.5 and --profile
    doesn't seem to generate anything.

    $ jruby -v
    jruby 1.5.5 (ruby 1.8.7 patchlevel 249) (2010-11-10 4bd4200) (Java
    HotSpot(TM) 64-Bit Server VM 1.6.0_22) [amd64-java]
    Joel VanderWerf, Nov 10, 2010
    #2
    1. Advertising

  3. On Wed, Nov 10, 2010 at 1:11 PM, Joel VanderWerf
    <> wrote:
    > What output are we supposed to see? I just installed 1.5.5 and --profile
    > doesn't seem to generate anything.
    >
    > $ jruby -v
    > jruby 1.5.5 (ruby 1.8.7 patchlevel 249) (2010-11-10 4bd4200) (Java
    > HotSpot(TM) 64-Bit Server VM 1.6.0_22) [amd64-java]


    Yeah, sorry about that. There's an update to the jruby-launcher gem
    (our native executable) that has not gotten released yet. If you like
    you can build it yourself from the repo at
    github.com/vvs/jruby-launcher (make ; cp jruby <jruby home>/bin) to
    get the new --profile flag.

    Catching up from the conference backlog these past couple months :)

    - Charlie
    Charles Oliver Nutter, Nov 19, 2010
    #3
  4. Thomas E Enebo

    Nick Sieger Guest

    On Fri, Nov 19, 2010 at 12:50 AM, Charles Oliver Nutter
    <> wrote:
    > On Wed, Nov 10, 2010 at 1:11 PM, Joel VanderWerf
    > <> wrote:
    >> What output are we supposed to see? I just installed 1.5.5 and --profile
    >> doesn't seem to generate anything.
    >>
    >> $ jruby -v
    >> jruby 1.5.5 (ruby 1.8.7 patchlevel 249) (2010-11-10 4bd4200) (Java
    >> HotSpot(TM) 64-Bit Server VM 1.6.0_22) [amd64-java]

    >
    > Yeah, sorry about that. There's an update to the jruby-launcher gem
    > (our native executable) that has not gotten released yet. If you like
    > you can build it yourself from the repo at
    > github.com/vvs/jruby-launcher (make ; cp jruby <jruby home>/bin) to
    > get the new --profile flag.
    >
    > Catching up from the conference backlog these past couple months :)


    Actually, all you need to do is "gem install jruby-launcher" to get
    the new version.

    /Nick
    Nick Sieger, Nov 19, 2010
    #4
  5. On 11/19/2010 09:55 AM, Nick Sieger wrote:
    > Actually, all you need to do is "gem install jruby-launcher" to get
    > the new version.


    Thanks! Should this be installed with MRI gem, or jruby gem ?
    Joel VanderWerf, Nov 19, 2010
    #5
  6. Thomas E Enebo

    Nick Sieger Guest

    On Fri, Nov 19, 2010 at 2:58 PM, Joel VanderWerf
    <> wrote:
    > On 11/19/2010 09:55 AM, Nick Sieger wrote:
    >>
    >> Actually, all you need to do is "gem install jruby-launcher" to get
    >> the new version.

    >
    > Thanks! Should this be installed with MRI gem, or jruby gem ?
    >


    JRuby! It will compile the native launcher for your system and install
    it on top of the existing shell script in $JRUBY_HOME/bin.

    /Nick
    Nick Sieger, Nov 19, 2010
    #6
  7. On 11/19/2010 03:23 PM, Nick Sieger wrote:
    > On Fri, Nov 19, 2010 at 2:58 PM, Joel VanderWerf
    > <> wrote:
    >> On 11/19/2010 09:55 AM, Nick Sieger wrote:
    >>>
    >>> Actually, all you need to do is "gem install jruby-launcher" to get
    >>> the new version.

    >>
    >> Thanks! Should this be installed with MRI gem, or jruby gem ?
    >>

    >
    > JRuby! It will compile the native launcher for your system and install
    > it on top of the existing shell script in $JRUBY_HOME/bin.


    Works now, thanks!

    I'm looking at the output from both --profile and --sample. It seems
    that --profile measures only jruby methods, and --sample measures only
    java functions. (Or maybe --sample would show some of the jruby methods
    if they were taking enough time to be observed at a tick. My program is
    much more heavily bottlenecked in the java side at the moment.)

    Is there any possibility of --profile instrumenting both jruby and java
    code?
    Joel VanderWerf, Nov 19, 2010
    #7
  8. On Fri, Nov 19, 2010 at 5:56 PM, Joel VanderWerf
    <> wrote:
    > I'm looking at the output from both --profile and --sample. It seems that
    > --profile measures only jruby methods, and --sample measures only java
    > functions. (Or maybe --sample would show some of the jruby methods if the=

    y
    > were taking enough time to be observed at a tick. My program is much more
    > heavily bottlenecked in the java side at the moment.)
    >
    > Is there any possibility of --profile instrumenting both jruby and java
    > code?


    Currently, no. Because Ruby dispatches differently than Java,
    including both in the same profile is at least difficult, and maybe
    impossible. Liken it to wanting to show profile results for both Ruby
    and C (or C++, C#, ObjC) in other implementations, when Ruby method
    dispatch is actually implemented *in* those native languages. The two
    worlds are largely separate.

    However...

    If you are able to force all Ruby code to compile before invocation
    (using -X+C to force all files to compile or -Xjit.threshold=3D1 to
    force all methods to compile on first invocation) normal Java
    profiling tools will show the compiled Ruby method bodies alongside
    regular Java method bodies. Be forewarned, however...as with any C or
    C++-based implementation that JITs Ruby code to native code, the
    resulting method are "mangled" a bit, and you'll have to do some
    manual chewing to interpret them. But at least you can use any of the
    dozens of Java profiling tools and show results for both Ruby and Java
    at the same time. If there's interest, I could try to do a screencast
    of how to do this with various JVM profilers (such as the built-in
    -J-Xrunhprof:cpu=3Dtimes):

    =E2=9E=94 jruby -J-Xrunhprof:cpu=3Dtimes -e "def foo; a =3D 0; while a < 10=
    00; a
    +=3D 1; end; end; 100.times { foo }"
    Dumping CPU usage by timing methods ... done.

    Result, buried in a java.hprof.txt file: https://gist.github.com/728666

    Here, the "ruby.__dash_e__.method__0$RUBY$foo" method is the jitted
    version of the "foo" method defined above.

    Now, on JRuby 1.6, it may be possible to take this mangled output and
    at least do a cleanup pass (because we have standardized the mangling
    a bit better), but the profiling output is very tool-specific...so
    de-mangling would have to happen on a per-tool basis

    Another option would be the JXInsight tool
    (http://www.jinspired.com/products/jxinsight/), which has builtin
    support for profiling Ruby (and may make it possible to combine Ruby
    and Java results in the same output. It is, however, a commercial
    tool.

    - Charlie
    Charles Oliver Nutter, Dec 5, 2010
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Slim Baltagi
    Replies:
    0
    Views:
    400
    Slim Baltagi
    Dec 15, 2007
  2. Ronald Fischer
    Replies:
    2
    Views:
    209
    Scott Miller
    May 16, 2007
  3. Charles Oliver Nutter

    [JRuby] JRuby perf questions answered

    Charles Oliver Nutter, Oct 31, 2007, in forum: Ruby
    Replies:
    7
    Views:
    177
    Kevin Williams
    Nov 1, 2007
  4. Martin Krauskopf

    [ANN] [JRuby] Fast Debugger for JRuby

    Martin Krauskopf, Nov 11, 2007, in forum: Ruby
    Replies:
    0
    Views:
    131
    Martin Krauskopf
    Nov 11, 2007
  5. Nick Sieger
    Replies:
    0
    Views:
    109
    Nick Sieger
    Apr 26, 2010
Loading...

Share This Page