This method will attach to the instrumentation buffer for the specified virtual machine. It returns a ByteBuffer object that is initialized to access the instrumentation buffer for the indicated Java virtual machine. The lvmid parameter is a integer value that uniquely identifies the target local Java virtual machine. It is typically, but not necessarily, the process id of the target Java virtual machine.
If the lvmid identifies a Java virtual machine different from the one running this method, then the coherency characteristics of the buffer are implementation dependent. Implementations that do not support named, coherent, shared memory may return a ByteBuffer object that contains only a snap shot of the data in the instrumentation buffer. Implementations that support named, coherent, shared memory, may return a ByteBuffer object that will be changing dynamically over time as the target Java virtual machine updates its mapping of this buffer.
If the lvmid is 0 or equal to the actual lvmid for the Java virtual machine running this method, then the returned ByteBuffer object will always be coherent and dynamically changing.
The attach mode specifies the access permissions requested for the instrumentation buffer of the target virtual machine. The permitted access permissions are:
| |
| |