Well, you can use the JVMTI interface of the JVM in order to build your own
analysis agent. Unfortunately this means writing native C/C++ code, but if
you feel the need - it might be worth the effort.

Mirko

On Tue, Jun 15, 2010 at 4:23 PM, Jeff McAffer <[email protected]>wrote:

> At one point in the past we (Equinox team) had connections to the IBM J9
> JVM that could tell you about the space taken for each bundle wrt *classes*
> and literals. The Eclipse Core Tools [0] still have that support in but I
> doubt that the VM side still works.  Also in the past (and perhaps still)
> the J9 guys worked on Resource Managed (RM) support that allowed for
> tracking and control of heap memory usage on a per classloader (e.g.,
> bundle) basis.  I don't know the status of this work.
>
> Jeff
>
> [0] http://wiki.eclipse.org/Core_Tools
>
>
> On 2010-06-15, at 7:57 AM, BJ Hargrave wrote:
>
> I don't know of such a command and I am not sure one can be properly
> written. There is no way to properly "assign" a memory object to a specific
> bundle. For example, which bundle should be the owner of a HashMap object?
> No matter what rules you construct to decide this, there is a reasonable
> case in which your rule is wrong.
> --
>
>  *BJ Hargrave*
> Senior Technical Staff Member, IBM
> OSGi Fellow and CTO of the *OSGi Alliance* <http://www.osgi.org/>*
> **[email protected]* <[email protected]>
>
> office: +1 386 848 1781
> mobile: +1 386 848 3788
>
>
>
>
>
>
> From:        Ashish Billore1 <[email protected]>
> To:        [email protected]
> Date:        2010/06/15 07:36
> Subject:        [osgi-dev] How to get runtime Memory Usage for an OSGi
> bundle..?
> Sent by:        [email protected]
>
> ------------------------------
>
>
>
>
> Hello Everyone,
>
>                 I am working on optimization and performance tuning of an
> OSGi based
> server application (uses customized Equinox as runtime and has OSGi bundles
> and headless Eclipse Plugins as building block). For this, I need to get
> the profiling data about OSGi bundles and plugins running in the
> application. So, is there any command or utility which can give me memory
> footprint of a given bundle/plugin?
>
> Some command like:
>
> osgi>memusage <bundle_id>
>
> I tried using some of the profilers out there (Eclipse TPTP) etc, however,
> they have problems like:
> - Too heavy, they introduce their own overheads and most of the time the
> app jvm crashes (due to out-of-memory errors or problem with the remote
> agent).
> - Give very low level profiling info (i.e. gives info about java classes
> and application class level info) however, I am more interested in knowing
> these details at the bundle level.
>
> Thanks for the help.
>
> Best Regards,
> Ashish Billore
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to