Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.5
    • Fix Version/s: JRuby 1.7.0.pre1
    • Component/s: Embedding
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When starting jruby with a --profile.api switch, the profiling API is activated.

      We need a way to do the same when embedding JRuby.

      Give me a hint on how you would like it implemented, and I'll add it to RubyInstanceConfig or whatever and supply a patch.

        Activity

        Hide
        Yoko Harada added a comment -

        Hello.

        I fixed this in rev. 981224a of master and in rev. 50ade75 and 981224a of jruby-1_6 branch.

        If you want to learn howtos, look at src/org/jruby/RubyInstanceConfig.java . Command line options are interpreted here. ScriptingContainer simply uses methods of RubyInstanceConfig class.

        By the time next version will be released, you can change the mode like this:

        container.getProvider().getRubyInstanceConfig().setProfilingMode(mode);
        

        The argument type is org.jruby.RubyInstanceConfig.ProfilingMode and the values are ProfilingMode.OFF/ProfilingMode.API/ProfilingMode.FLAT/ProfilingMode.GRAPH.

        Show
        Yoko Harada added a comment - Hello. I fixed this in rev. 981224a of master and in rev. 50ade75 and 981224a of jruby-1_6 branch. If you want to learn howtos, look at src/org/jruby/RubyInstanceConfig.java . Command line options are interpreted here. ScriptingContainer simply uses methods of RubyInstanceConfig class. By the time next version will be released, you can change the mode like this: container.getProvider().getRubyInstanceConfig().setProfilingMode(mode); The argument type is org.jruby.RubyInstanceConfig.ProfilingMode and the values are ProfilingMode.OFF/ProfilingMode.API/ProfilingMode.FLAT/ProfilingMode.GRAPH.
        Hide
        Uwe Kubosch added a comment -

        Thank you! This will help profiling embedded applications.

        Show
        Uwe Kubosch added a comment - Thank you! This will help profiling embedded applications.

          People

          • Assignee:
            Unassigned
            Reporter:
            Uwe Kubosch
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: