< prev index next >

src/java.base/share/classes/sun/misc/Perf.java

Print this page

        

*** 65,81 **** * <p> * An instance of this class can be used as the argument to * <code>AccessController.doPrivileged(PrivilegedAction)</code>. * <p> Here is a suggested idiom for use of this class: * ! * <blockquote><pre> * class MyTrustedClass { * private static final Perf perf = * AccessController.doPrivileged(new Perf.GetPerfAction<Perf>()); * ... * } ! * </pre></blockquote> * <p> * In the presence of a security manager, the <code>MyTrustedClass</code> * class in the above example will need to be granted the * <em>"sun.misc.Perf.getPerf"</em> <code>RuntimePermission</code> * permission in order to successfully acquire the singleton Perf instance. --- 65,81 ---- * <p> * An instance of this class can be used as the argument to * <code>AccessController.doPrivileged(PrivilegedAction)</code>. * <p> Here is a suggested idiom for use of this class: * ! * <blockquote><pre>{@code * class MyTrustedClass { * private static final Perf perf = * AccessController.doPrivileged(new Perf.GetPerfAction<Perf>()); * ... * } ! * }</pre></blockquote> * <p> * In the presence of a security manager, the <code>MyTrustedClass</code> * class in the above example will need to be granted the * <em>"sun.misc.Perf.getPerf"</em> <code>RuntimePermission</code> * permission in order to successfully acquire the singleton Perf instance.
*** 169,188 **** * changing. * <p> * The attach mode specifies the access permissions requested for the * instrumentation buffer of the target virtual machine. The permitted * access permissions are: ! * <p> ! * <bl> * <li>"r" - Read only access. This Java virtual machine has only * read access to the instrumentation buffer for the target Java * virtual machine. * <li>"rw" - Read/Write access. This Java virtual machine has read and * write access to the instrumentation buffer for the target Java virtual * machine. This mode is currently not supported and is reserved for * future enhancements. ! * </bl> * * @param lvmid an integer that uniquely identifies the * target local Java virtual machine. * @param mode a string indicating the attach mode. * @return ByteBuffer a direct allocated byte buffer --- 169,187 ---- * changing. * <p> * The attach mode specifies the access permissions requested for the * instrumentation buffer of the target virtual machine. The permitted * access permissions are: ! * <ul> * <li>"r" - Read only access. This Java virtual machine has only * read access to the instrumentation buffer for the target Java * virtual machine. * <li>"rw" - Read/Write access. This Java virtual machine has read and * write access to the instrumentation buffer for the target Java virtual * machine. This mode is currently not supported and is reserved for * future enhancements. ! * </ul> * * @param lvmid an integer that uniquely identifies the * target local Java virtual machine. * @param mode a string indicating the attach mode. * @return ByteBuffer a direct allocated byte buffer
< prev index next >