Java Code Examples for jdk.jfr.events.FileWriteEvent#begin()
The following examples show how to use
jdk.jfr.events.FileWriteEvent#begin() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FileChannelImplInstrumentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public int write(ByteBuffer src, long position) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { return write(src, position); } int bytesWritten = 0; try { event.begin(); bytesWritten = write(src, position); } finally { event.bytesWritten = bytesWritten > 0 ? bytesWritten : 0; event.path = path; event.commit(); event.reset(); } return bytesWritten; }
Example 2
Source File: FileChannelImplInstrumentor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public int write(ByteBuffer src, long position) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { return write(src, position); } int bytesWritten = 0; try { event.begin(); bytesWritten = write(src, position); } finally { event.bytesWritten = bytesWritten > 0 ? bytesWritten : 0; event.path = path; event.commit(); event.reset(); } return bytesWritten; }
Example 3
Source File: RandomAccessFileInstrumentor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(int b) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = 1; } finally { event.path = path; event.commit(); event.reset(); } }
Example 4
Source File: FileOutputStreamInstrumentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[], int off, int len) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b, off, len); return; } try { event.begin(); write(b, off, len); event.bytesWritten = len; } finally { event.path = path; event.commit(); event.reset(); } }
Example 5
Source File: FileOutputStreamInstrumentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[]) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = b.length; } finally { event.path = path; event.commit(); event.reset(); } }
Example 6
Source File: FileOutputStreamInstrumentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(int b) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = 1; } finally { event.path = path; event.commit(); event.reset(); } }
Example 7
Source File: RandomAccessFileInstrumentor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[], int off, int len) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b, off, len); return; } try { event.begin(); write(b, off, len); event.bytesWritten = len; } finally { event.path = path; event.commit(); event.reset(); } }
Example 8
Source File: RandomAccessFileInstrumentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[]) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = b.length; } finally { event.path = path; event.commit(); event.reset(); } }
Example 9
Source File: RandomAccessFileInstrumentor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[]) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = b.length; } finally { event.path = path; event.commit(); event.reset(); } }
Example 10
Source File: FileChannelImplInstrumentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public long write(ByteBuffer[] srcs, int offset, int length) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { return write(srcs, offset, length); } long bytesWritten = 0; try { event.begin(); bytesWritten = write(srcs, offset, length); } finally { event.bytesWritten = bytesWritten > 0 ? bytesWritten : 0; event.path = path; event.commit(); event.reset(); } return bytesWritten; }
Example 11
Source File: FileChannelImplInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public int write(ByteBuffer src) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { return write(src); } int bytesWritten = 0; try { event.begin(); bytesWritten = write(src); } finally { event.bytesWritten = bytesWritten > 0 ? bytesWritten : 0; event.path = path; event.commit(); event.reset(); } return bytesWritten; }
Example 12
Source File: FileChannelImplInstrumentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public int write(ByteBuffer src) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { return write(src); } int bytesWritten = 0; try { event.begin(); bytesWritten = write(src); } finally { event.bytesWritten = bytesWritten > 0 ? bytesWritten : 0; event.path = path; event.commit(); event.reset(); } return bytesWritten; }
Example 13
Source File: FileOutputStreamInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[], int off, int len) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b, off, len); return; } try { event.begin(); write(b, off, len); event.bytesWritten = len; } finally { event.path = path; event.commit(); event.reset(); } }
Example 14
Source File: FileOutputStreamInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[]) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = b.length; } finally { event.path = path; event.commit(); event.reset(); } }
Example 15
Source File: FileOutputStreamInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(int b) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = 1; } finally { event.path = path; event.commit(); event.reset(); } }
Example 16
Source File: RandomAccessFileInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(byte b[], int off, int len) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b, off, len); return; } try { event.begin(); write(b, off, len); event.bytesWritten = len; } finally { event.path = path; event.commit(); event.reset(); } }
Example 17
Source File: FileOutputStreamInstrumentor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(int b) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = 1; } finally { event.path = path; event.commit(); event.reset(); } }
Example 18
Source File: RandomAccessFileInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public void write(int b) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { write(b); return; } try { event.begin(); write(b); event.bytesWritten = 1; } finally { event.path = path; event.commit(); event.reset(); } }
Example 19
Source File: FileChannelImplInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public long write(ByteBuffer[] srcs, int offset, int length) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { return write(srcs, offset, length); } long bytesWritten = 0; try { event.begin(); bytesWritten = write(srcs, offset, length); } finally { event.bytesWritten = bytesWritten > 0 ? bytesWritten : 0; event.path = path; event.commit(); event.reset(); } return bytesWritten; }
Example 20
Source File: FileChannelImplInstrumentor.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("deprecation") @JIInstrumentationMethod public int write(ByteBuffer src, long position) throws IOException { FileWriteEvent event = FileWriteEvent.EVENT.get(); if (!event.isEnabled()) { return write(src, position); } int bytesWritten = 0; try { event.begin(); bytesWritten = write(src, position); } finally { event.bytesWritten = bytesWritten > 0 ? bytesWritten : 0; event.path = path; event.commit(); event.reset(); } return bytesWritten; }