[sip-comm-dev] Profiling SC


#1

Hi,

Did anyone tried to use any profilers with felix?

I've tried to use JProbe and JProfiler - but felix's classloader tells that
profilers' classes are not found.
I've added com.jprofiler to felix.client.run.properties in section
org.osgi.framework.system.packages.extra, but it hadn't help.

Caused by: java.lang.ClassNotFoundException:
com.jprofiler.agent.InstrumentationCallee
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
    at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:118)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 13 more

Also, I've tried VirtualVM (available in JDK 6 from update 7), but it was
also not successfull. Application in running, but UDP packets can not be
sent :frowning:

Please, share you experience.


#2

Hi Alexander,

A lot of work has been done on running a profiler with SIP
Communicator. Most of it is the result of a last year GSoC.

The best choice is probably to use our profiler which is a modified
version of Profiler4J. You can find it here:
https://sc-p4j.dev.java.net/

If you need any help on how to run it, don't hesitate to request help here.

Hope that helps,

Ben

···

On Tue, Mar 24, 2009 at 22:24, Alexander Kazeko <alexandr.temp@gmail.com> wrote:

Hi,

Did anyone tried to use any profilers with felix?

I've tried to use JProbe and JProfiler - but felix's classloader tells that
profilers' classes are not found.
I've added com.jprofiler to felix.client.run.properties in section
org.osgi.framework.system.packages.extra, but it hadn't help.

Caused by: java.lang.ClassNotFoundException:
com.jprofiler.agent.InstrumentationCallee
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:118)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 13 more

Also, I've tried VirtualVM (available in JDK 6 from update 7), but it was
also not successfull. Application in running, but UDP packets can not be
sent :frowning:

Please, share you experience.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi,

Try to add line org.osgi.framework.bootdelegation=com.jprofiler.agent.*\ into felix.client.run.properties.
More info about profiling SC @ http://developerscabin.blogspot.com/

Hope this helps,
Vladimir

Alexander Kazeko wrote:

···

Hi,

Did anyone tried to use any profilers with felix?

I've tried to use JProbe and JProfiler - but felix's classloader tells that profilers' classes are not found.
I've added com.jprofiler to felix.client.run.properties in section org.osgi.framework.system.packages.extra, but it hadn't help.

Caused by: java.lang.ClassNotFoundException: com.jprofiler.agent.InstrumentationCallee
    at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
    at org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
    at org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:118)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 13 more

Also, I've tried VirtualVM (available in JDK 6 from update 7), but it was also not successfull. Application in running, but UDP packets can not be sent :frowning:

Please, share you experience.


#4

Benoit, Vladimir,

Thanks a lot!

But there is still one problem - i can't profile encoding/decoding process.
I was able to profile SC after adding line
org.osgi.framework.bootdelegationfor JProbe ant JProfiler, but methods
process() in JNIDecoder and JNIEncoder
were not profiled. Is it because they call native methods?

Also, i 've tried to profile SC using VisualVM. I've added
org.osgi.framework.bootdelegation=org.netbeans.lib.profiler.server.* and run
SC.

[java] 08:49:23.996 SEVERE: util.UtilActivator.uncaughtException().81 An
uncaught exception occurred in thread=Thread[Timer-3,5,main] and message
was: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
[java] java.lang.NoClassDefFoundError:
org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
[java] at
net.java.sip.communicator.impl.protocol.sip.OperationSetPresenceSipImpl$PollOfflineContactsTask.run(OperationSetPresenceSipImpl.java:4873)
[java] at java.util.TimerThread.mainLoop(Timer.java:512)
[java] at java.util.TimerThread.run(Timer.java:462)

I've added jar containing this class to classpath, but it hadn't helped.

Also, i've checked out sc-p4j and compiled it. But next exception is thrown
(SC is running)
SEVERE: Caugh task error
net.sf.profiler4j.console.client.ClientException: I/O Error
    at
net.sf.profiler4j.console.client.Client.handleException(Client.java:259)
    at net.sf.profiler4j.console.client.Client.connect(Client.java:67)
    at
net.sf.profiler4j.console.Console$3.executeInBackground(Console.java:144)
    at
net.sf.profiler4j.console.util.task.LongTaskExecutorDialog$1.run(LongTaskExecutorDialog.java:151)
Caused by: java.net.ConnectException: Connection refused: connect

Is it possible to profile native calls using these profilers? Is it possible
to profile native calls at all?

Thanks for advices!

···

2009/3/24 Vladimir Škarupelov <voviss@gmail.com>

Hi,

Try to add line org.osgi.framework.bootdelegation=com.jprofiler.agent.*\
into felix.client.run.properties.
More info about profiling SC @ http://developerscabin.blogspot.com/

Hope this helps,
Vladimir

Alexander Kazeko wrote:

Hi,

Did anyone tried to use any profilers with felix?

I've tried to use JProbe and JProfiler - but felix's classloader tells that
profilers' classes are not found.
I've added com.jprofiler to felix.client.run.properties in section
org.osgi.framework.system.packages.extra, but it hadn't help.

Caused by: java.lang.ClassNotFoundException:
com.jprofiler.agent.InstrumentationCallee
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
    at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:118)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 13 more

Also, I've tried VirtualVM (available in JDK 6 from update 7), but it was
also not successfull. Application in running, but UDP packets can not be
sent :frowning:

Please, share you experience.


#5

Hi Alexander,

I don't think one is able to profile native code using NetBeans
Profiler/VisualVM, YourKit Java Profiler and other Java profilers of
similar capabilities. As to at all profiling native code, it's of
course possible and in most cases it includes rebuilding the native
libraries with profiling support.

Otherwise, I've been profiling different portions of SC with both
NetBeans Profiler/VisualVM and YourKit Java Profiler and the
bootdelegation property has always been enough for me to get them
running and fully operational.

Regards,
Lubo

···

On Wed, Mar 25, 2009 at 10:16 AM, Alexander Kazeko <alexandr.temp@gmail.com> wrote:

Benoit, Vladimir,

Thanks a lot!

But there is still one problem - i can't profile encoding/decoding process.
I was able to profile SC after adding line org.osgi.framework.bootdelegation
for JProbe ant JProfiler, but methods process() in JNIDecoder and JNIEncoder
were not profiled. Is it because they call native methods?

Also, i 've tried to profile SC using VisualVM. I've added
org.osgi.framework.bootdelegation=org.netbeans.lib.profiler.server.* and run
SC.

[java] 08:49:23.996 SEVERE: util.UtilActivator.uncaughtException().81 An
uncaught exception occurred in thread=Thread[Timer-3,5,main] and message
was: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
[java] java.lang.NoClassDefFoundError:
org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
[java] at
net.java.sip.communicator.impl.protocol.sip.OperationSetPresenceSipImpl$PollOfflineContactsTask.run(OperationSetPresenceSipImpl.java:4873)
[java] at java.util.TimerThread.mainLoop(Timer.java:512)
[java] at java.util.TimerThread.run(Timer.java:462)

I've added jar containing this class to classpath, but it hadn't helped.

Also, i've checked out sc-p4j and compiled it. But next exception is thrown
(SC is running)
SEVERE: Caugh task error
net.sf.profiler4j.console.client.ClientException: I/O Error
at
net.sf.profiler4j.console.client.Client.handleException(Client.java:259)
at net.sf.profiler4j.console.client.Client.connect(Client.java:67)
at
net.sf.profiler4j.console.Console$3.executeInBackground(Console.java:144)
at
net.sf.profiler4j.console.util.task.LongTaskExecutorDialog$1.run(LongTaskExecutorDialog.java:151)
Caused by: java.net.ConnectException: Connection refused: connect

Is it possible to profile native calls using these profilers? Is it possible
to profile native calls at all?

Thanks for advices!

2009/3/24 Vladimir Škarupelov <voviss@gmail.com>

Hi,

Try to add line org.osgi.framework.bootdelegation=com.jprofiler.agent.*\
into felix.client.run.properties.
More info about profiling SC @ http://developerscabin.blogspot.com/

Hope this helps,
Vladimir

Alexander Kazeko wrote:

Hi,

Did anyone tried to use any profilers with felix?

I've tried to use JProbe and JProfiler - but felix's classloader tells
that profilers' classes are not found.
I've added com.jprofiler to felix.client.run.properties in section
org.osgi.framework.system.packages.extra, but it hadn't help.

Caused by: java.lang.ClassNotFoundException:
com.jprofiler.agent.InstrumentationCallee
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:118)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 13 more

Also, I've tried VirtualVM (available in JDK 6 from update 7), but it was
also not successfull. Application in running, but UDP packets can not be
sent :frowning:

Please, share you experience.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

Thanks a lot, guys. YourKit Java Profiler solved all problems.

···

2009/3/25 Lubomir Marinov <lubomir.marinov@gmail.com>

Hi Alexander,

I don't think one is able to profile native code using NetBeans
Profiler/VisualVM, YourKit Java Profiler and other Java profilers of
similar capabilities. As to at all profiling native code, it's of
course possible and in most cases it includes rebuilding the native
libraries with profiling support.

Otherwise, I've been profiling different portions of SC with both
NetBeans Profiler/VisualVM and YourKit Java Profiler and the
bootdelegation property has always been enough for me to get them
running and fully operational.

Regards,
Lubo

On Wed, Mar 25, 2009 at 10:16 AM, Alexander Kazeko > <alexandr.temp@gmail.com> wrote:
> Benoit, Vladimir,
>
> Thanks a lot!
>
> But there is still one problem - i can't profile encoding/decoding
process.
> I was able to profile SC after adding line
org.osgi.framework.bootdelegation
> for JProbe ant JProfiler, but methods process() in JNIDecoder and
JNIEncoder
> were not profiled. Is it because they call native methods?
>
> Also, i 've tried to profile SC using VisualVM. I've added
> org.osgi.framework.bootdelegation=org.netbeans.lib.profiler.server.* and
run
> SC.
>
> [java] 08:49:23.996 SEVERE: util.UtilActivator.uncaughtException().81 An
> uncaught exception occurred in thread=Thread[Timer-3,5,main] and message
> was: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> [java] java.lang.NoClassDefFoundError:
> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> [java] at
>
net.java.sip.communicator.impl.protocol.sip.OperationSetPresenceSipImpl$PollOfflineContactsTask.run(OperationSetPresenceSipImpl.java:4873)
> [java] at java.util.TimerThread.mainLoop(Timer.java:512)
> [java] at java.util.TimerThread.run(Timer.java:462)
>
> I've added jar containing this class to classpath, but it hadn't helped.
>
>
>
> Also, i've checked out sc-p4j and compiled it. But next exception is
thrown
> (SC is running)
> SEVERE: Caugh task error
> net.sf.profiler4j.console.client.ClientException: I/O Error
> at
> net.sf.profiler4j.console.client.Client.handleException(Client.java:259)
> at net.sf.profiler4j.console.client.Client.connect(Client.java:67)
> at
> net.sf.profiler4j.console.Console$3.executeInBackground(Console.java:144)
> at
>
net.sf.profiler4j.console.util.task.LongTaskExecutorDialog$1.run(LongTaskExecutorDialog.java:151)
> Caused by: java.net.ConnectException: Connection refused: connect
>
>
> Is it possible to profile native calls using these profilers? Is it
possible
> to profile native calls at all?
>
> Thanks for advices!
>
> 2009/3/24 Vladimir Škarupelov <voviss@gmail.com>
>>
>> Hi,
>>
>> Try to add line org.osgi.framework.bootdelegation=com.jprofiler.agent.*\
>> into felix.client.run.properties.
>> More info about profiling SC @ http://developerscabin.blogspot.com/
>>
>> Hope this helps,
>> Vladimir
>>
>> Alexander Kazeko wrote:
>>
>> Hi,
>>
>> Did anyone tried to use any profilers with felix?
>>
>> I've tried to use JProbe and JProfiler - but felix's classloader tells
>> that profilers' classes are not found.
>> I've added com.jprofiler to felix.client.run.properties in section
>> org.osgi.framework.system.packages.extra, but it hadn't help.
>>
>> Caused by: java.lang.ClassNotFoundException:
>> com.jprofiler.agent.InstrumentationCallee
>> at
>>
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
>> at
>>
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
>> at
>>
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:118)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>> ... 13 more
>>
>>
>> Also, I've tried VirtualVM (available in JDK 6 from update 7), but it
was
>> also not successfull. Application in running, but UDP packets can not be
>> sent :frowning:
>>
>> Please, share you experience.
>>
>
>


#7

Hi,

YourKit Java Profiler perfectly works with SC (after adding one line to
felix's config :slight_smile: ) and can profile even JNI classes.
The only problem is that it is not free. My evaluation license has expired,
but i've found that there is an open source version of license available for
developers of open source applications (http://www.yourkit.com/purchase/ tab
open source). But they ask to add a reference to their web site to get this
license :frowning:

Is it possible to add a link anywhere on SC's web site?

Thanks!

Regards,
Alexandr Kazeko

···

2009/3/25 Alexander Kazeko <alexandr.temp@gmail.com>

Thanks a lot, guys. YourKit Java Profiler solved all problems.

2009/3/25 Lubomir Marinov <lubomir.marinov@gmail.com>

Hi Alexander,

I don't think one is able to profile native code using NetBeans
Profiler/VisualVM, YourKit Java Profiler and other Java profilers of
similar capabilities. As to at all profiling native code, it's of
course possible and in most cases it includes rebuilding the native
libraries with profiling support.

Otherwise, I've been profiling different portions of SC with both
NetBeans Profiler/VisualVM and YourKit Java Profiler and the
bootdelegation property has always been enough for me to get them
running and fully operational.

Regards,
Lubo

On Wed, Mar 25, 2009 at 10:16 AM, Alexander Kazeko >> <alexandr.temp@gmail.com> wrote:
> Benoit, Vladimir,
>
> Thanks a lot!
>
> But there is still one problem - i can't profile encoding/decoding
process.
> I was able to profile SC after adding line
org.osgi.framework.bootdelegation
> for JProbe ant JProfiler, but methods process() in JNIDecoder and
JNIEncoder
> were not profiled. Is it because they call native methods?
>
> Also, i 've tried to profile SC using VisualVM. I've added
> org.osgi.framework.bootdelegation=org.netbeans.lib.profiler.server.* and
run
> SC.
>
> [java] 08:49:23.996 SEVERE: util.UtilActivator.uncaughtException().81 An
> uncaught exception occurred in thread=Thread[Timer-3,5,main] and message
> was: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> [java] java.lang.NoClassDefFoundError:
> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> [java] at
>
net.java.sip.communicator.impl.protocol.sip.OperationSetPresenceSipImpl$PollOfflineContactsTask.run(OperationSetPresenceSipImpl.java:4873)
> [java] at java.util.TimerThread.mainLoop(Timer.java:512)
> [java] at java.util.TimerThread.run(Timer.java:462)
>
> I've added jar containing this class to classpath, but it hadn't helped.
>
>
>
> Also, i've checked out sc-p4j and compiled it. But next exception is
thrown
> (SC is running)
> SEVERE: Caugh task error
> net.sf.profiler4j.console.client.ClientException: I/O Error
> at
> net.sf.profiler4j.console.client.Client.handleException(Client.java:259)
> at net.sf.profiler4j.console.client.Client.connect(Client.java:67)
> at
>
net.sf.profiler4j.console.Console$3.executeInBackground(Console.java:144)
> at
>
net.sf.profiler4j.console.util.task.LongTaskExecutorDialog$1.run(LongTaskExecutorDialog.java:151)
> Caused by: java.net.ConnectException: Connection refused: connect
>
>
> Is it possible to profile native calls using these profilers? Is it
possible
> to profile native calls at all?
>
> Thanks for advices!
>
> 2009/3/24 Vladimir Škarupelov <voviss@gmail.com>
>>
>> Hi,
>>
>> Try to add line
org.osgi.framework.bootdelegation=com.jprofiler.agent.*\
>> into felix.client.run.properties.
>> More info about profiling SC @ http://developerscabin.blogspot.com/
>>
>> Hope this helps,
>> Vladimir
>>
>> Alexander Kazeko wrote:
>>
>> Hi,
>>
>> Did anyone tried to use any profilers with felix?
>>
>> I've tried to use JProbe and JProfiler - but felix's classloader tells
>> that profilers' classes are not found.
>> I've added com.jprofiler to felix.client.run.properties in section
>> org.osgi.framework.system.packages.extra, but it hadn't help.
>>
>> Caused by: java.lang.ClassNotFoundException:
>> com.jprofiler.agent.InstrumentationCallee
>> at
>>
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
>> at
>>
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
>> at
>>
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:118)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>> ... 13 more
>>
>>
>> Also, I've tried VirtualVM (available in JDK 6 from update 7), but it
was
>> also not successfull. Application in running, but UDP packets can not
be
>> sent :frowning:
>>
>> Please, share you experience.
>>
>
>