< prev index next >
src/java.base/windows/native/libnio/ch/SocketDispatcher.c
Print this page
rev 53271 : 8216981: Per thread IO statistics in JFR
*** 74,83 ****
--- 74,87 ----
}
JNU_ThrowIOExceptionWithLastError(env, "Read failed");
return IOS_THROWN;
}
+ if (read > 0) {
+ JVM_callNetworkReadBytes(env, (jint) read);
+ }
+
return convertReturnVal(env, (jint)read, JNI_TRUE);
}
JNIEXPORT jlong JNICALL
Java_sun_nio_ch_SocketDispatcher_readv0(JNIEnv *env, jclass clazz, jobject fdo,
*** 130,139 ****
--- 134,147 ----
}
JNU_ThrowIOExceptionWithLastError(env, "Vector read failed");
return IOS_THROWN;
}
+ if (read > 0) {
+ JVM_callNetworkReadBytes(env, (jint) read);
+ }
+
return convertLongReturnVal(env, (jlong)read, JNI_TRUE);
}
JNIEXPORT jint JNICALL
Java_sun_nio_ch_SocketDispatcher_write0(JNIEnv *env, jclass clazz, jobject fdo,
*** 177,186 ****
--- 185,198 ----
JNU_ThrowIOExceptionWithLastError(env, "Write failed");
return IOS_THROWN;
}
}
+ if (written > 0) {
+ JVM_callFileWriteBytes(env, written);
+ }
+
count += (jint)written;
address += written;
} while ((count < total) && (written == MAX_BUFFER_SIZE));
*** 258,267 ****
--- 270,283 ----
}
JNU_ThrowIOExceptionWithLastError(env, "Vector write failed");
return IOS_THROWN;
}
+ if (count > 0) {
+ JVM_callFileWriteBytes(env, (jint) count);
+ }
+
return convertLongReturnVal(env, count, JNI_FALSE);
}
JNIEXPORT void JNICALL
Java_sun_nio_ch_SocketDispatcher_preClose0(JNIEnv *env, jclass clazz,
< prev index next >