< prev index next >

src/java.base/windows/native/libnet/DualStackPlainDatagramSocketImpl.c

Print this page
rev 53271 : 8216981: Per thread IO statistics in JFR

@@ -342,10 +342,13 @@
                 }
                 prevTime = newTime;
             }
             retry = TRUE;
         }
+        if (!peek && rv > 0) {
+            JVM_callNetworkReadBytes(env, rv);
+        }
     } while (retry);
 
     port = (int) ntohs ((u_short) GET_PORT((SOCKETADDRESS *)&sa));
 
     /* truncate the data if the packet's length is too small */

@@ -454,10 +457,14 @@
         if (rv == -1) {
             NET_ThrowNew(env, WSAGetLastError(), "Datagram send failed");
         }
     }
 
+    if (rv > 0) {
+      JVM_callFileWriteBytes(env, rv);
+    }
+
     if (length > MAX_BUFFER_LEN) {
         free(fullPacket);
     }
 }
 
< prev index next >