JMX VM Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

As some of you may know, I'm currently implementing the VM layer of 
java.lang.management for Jikes RVM.  While working on this, I've spotted a 
point in the VM interface where I think we could remove two methods and 
suffice with a generic implementation.

Looking at VMMemoryMXBeanImpl, we have two methods:

static MemoryUsage getHeapMemoryUsage()
static native MemoryUsage getNonHeapMemoryUsage();

The first is implemented to call the methods of Runtime, while the second is 
left purely native.  From what I can see, these can actually be computed by 
probing the pools and summing the result (the pools have a type, heap or 
non-heap, and a usage level), and this is how I plan to do it in JikesRVM.

Does anyone have any objections to removing these methods from the VM 
interface and implementing them directly in the Classpath implementation?  Or 
alternatively, should I just provide this implementation as a default 
implementation within the VM bean (so it can be replaced)?

Thanks,
-- 
Andrew :-)

Help end the Java Trap!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

Attachment: pgpiZT0Wr44sz.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux