On Thu, Jul 31, 2008 at 4:22 PM, Craig Walls <[EMAIL PROTECTED]> wrote:
>
> Where may I find that O/S license for JProfiler?

svn co https://scm.ops4j.org/repos/ops4j/projects/community/licenses

>
> And (if you happen to know), can JProfiler profile Pax Runner no matter
> how it is run? I don't know much about JProfiler, but it's kinda
> important that I profile it while it is running as a service...I don't
> run into the CPU consumption problem if I run it in a normal way.

You should look for remote profiling, meaning that JProfiler will
attach to Pax Runner not that JProfiler will start pax runner. Like fr
remote debugging. But I never profiled a java app started as a
service. I guess that you have to do something liek explained into Pax
Runner FAQ: http://wiki.ops4j.org/confluence/x/UwBH (bottom of the
page) only that the vm args should be now set for pax rnner not for
the started process. Anyhow ehen you will start up JProfiler and
create a remote session he will give you instructions about what are
you supposed to to (when starting JProfiler create a new session and
look for "new remote integration").

>
>
>
> Alin Dreghiciu wrote:
>> Looks like the only thing is not there now is the shutdown hook. which
>> is a simple thread that stops the pipes and destroys the started
>> process.
>> But, can't we figure out what is the tread that is consuming the CPU
>> using a java profiler? We have an open source license for JProfiler.
>>
>> On Thu, Jul 31, 2008 at 3:27 PM, Craig Walls <[EMAIL PROTECTED]> wrote:
>>
>>> So far, no good. Here's what BrowserStarter.java looks like now:
>>>
>>> import org.ops4j.pax.runner.platform.internal.Pipe;
>>>
>>> public class BrowserStarter {
>>>  static Pipe err;
>>>  static Pipe out;
>>>  static Pipe in;
>>>
>>>
>>>  public static final void main(String[] args) throws Exception {
>>>    try {
>>>      Process p = Runtime.getRuntime().exec(args[0]);
>>>      p.waitFor();
>>>
>>>      err = new Pipe( p.getErrorStream(), System.err ).start( "error" );
>>>      out = new Pipe( p.getInputStream(), System.out ).start( "out" );
>>>      in = new Pipe( p.getOutputStream(), System.in ).start( "in" );
>>>    } finally {
>>>      if(err != null) err.stop();
>>>      if(out != null) out.stop();
>>>      if(in != null) in.stop();
>>>    }
>>>  }
>>> }
>>>
>>> And my jsl.ini's cmdline looks like this:
>>>
>>> cmdline = -cp c:/semantra/bin;c:/semantra/bin/pax/pax-runner-0.12.0.jar
>>> BrowserStarter "java -jar
>>> c:/semantra/bin/org.eclipse.osgi_3.4.0.v20080605-1900.jar -console 8888"
>>>
>>> As before, when I start the service, there's a small spike (about 40% or
>>> so), then it settles back down to 0%. Of course, that's a good thing,
>>> except that it does nothing to explain why Pax Runner starts up as a
>>> service consuming 100% of the CPU.
>>>
>>> I'm still tinkering and looking around at Pax Runner source on my end to
>>> see if I can figure it out. But I wanted to report the status of this
>>> experiment to see if you guys have any ideas.
>>>
>>>
>>>
>>> Niclas Hedhman wrote:
>>>
>>>> On Thursday 31 July 2008 05:44, Craig Walls wrote:
>>>>
>>>>
>>>>> public class BrowserStarter {
>>>>>   public static final void main(String[] args) throws Exception {
>>>>>     Runtime.getRuntime().exec(args[0]);
>>>>>   }
>>>>> }
>>>>>
>>>>>
>>>> I am also not on Windows (who uses that anyway? ;-) )
>>>>
>>>> Perhaps change to;
>>>>
>>>> public class BrowserStarter {
>>>>   public static final void main(String[] args) throws Exception {
>>>>     Process p = Runtime.getRuntime().exec(args[0]);
>>>>     p.waitFor();
>>>>   }
>>>> }
>>>>
>>>> And if that doesn't do it, look up the Pipe class in Pax Runner and add 
>>>> that
>>>> by;
>>>>
>>>> static Pipe err;
>>>> static Pipe out;
>>>> static Pipe in;
>>>>
>>>> err = new Pipe( process.getErrorStream(), System.err ).start( "error" );
>>>> out = new Pipe( process.getInputStream(), System.out ).start( "out" );
>>>> in = new Pipe( process.getOutputStream(), System.in ).start( "in" );
>>>>
>>>> and the Shutdown hook to cleanup properly.
>>>>
>>>>
>>>> Cheers
>>>>
>>>>
>>> _______________________________________________
>>> general mailing list
>>> general@lists.ops4j.org
>>> http://lists.ops4j.org/mailman/listinfo/general
>>>
>>>
>>
>>
>>
>>
>
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>



-- 
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://malaysia.jayway.net - New Energy for Projects - Great People
working on Great Projects at Great Places

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to