jdk.jfr.events.FileWriteEvent Java Examples

The following examples show how to use jdk.jfr.events.FileWriteEvent. 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: RandomAccessFileInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #2
Source File: FileOutputStreamInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #3
Source File: FileOutputStreamInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #4
Source File: FileOutputStreamInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #5
Source File: RandomAccessFileInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #6
Source File: RandomAccessFileInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #7
Source File: RandomAccessFileInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #8
Source File: FileChannelImplInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #9
Source File: FileChannelImplInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #10
Source File: FileChannelImplInstrumentor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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 #11
Source File: FileOutputStreamInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #12
Source File: FileOutputStreamInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #13
Source File: FileOutputStreamInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #14
Source File: RandomAccessFileInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #15
Source File: FileChannelImplInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #16
Source File: RandomAccessFileInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #17
Source File: FileChannelImplInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #18
Source File: FileChannelImplInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #19
Source File: FileChannelImplInstrumentor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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 #20
Source File: FileOutputStreamInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #21
Source File: FileOutputStreamInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #22
Source File: FileOutputStreamInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #23
Source File: RandomAccessFileInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #24
Source File: RandomAccessFileInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #25
Source File: RandomAccessFileInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #26
Source File: FileChannelImplInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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 #27
Source File: FileChannelImplInstrumentor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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;
}