Skip to content

Commit 1142e55

Browse files
committed
comment out timing in capi_native.c
1 parent ea0df85 commit 1142e55

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

graalpython/com.oracle.graal.python.jni/src/capi_native.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -346,23 +346,23 @@ CAPI_BUILTINS
346346
// send the locations of these values to Sulong - the values need to be shared
347347
initialize_native_locations(&PyTruffle_AllocatedMemory, &PyTruffle_MaxNativeMemory, &PyTruffle_NativeMemoryGCBarrier);
348348

349-
if (PyTruffle_Log_Fine()) {
350-
// provide some timing info for native/Java boundary
351-
352-
clock_t start;
353-
for (int run = 0; run < 1000; run++) {
354-
start = clock();
355-
int COUNT = 10000;
356-
for (int i = 0; i < COUNT; i++) {
357-
GraalPyTruffleLong_Zero();
358-
}
359-
double delta = ((double) (clock() - start)) / CLOCKS_PER_SEC;
360-
if ((run % 100) == 0) {
361-
PyTruffle_Log(PY_TRUFFLE_LOG_FINE, "C API Timing probe: %.0fns", delta * 1000000000 / COUNT);
362-
}
363-
}
364-
PyTruffle_Log(PY_TRUFFLE_LOG_FINE, "initNativeForward: %fs", ((double) (clock() - t)) / CLOCKS_PER_SEC);
365-
}
349+
// if (PyTruffle_Log_Fine()) {
350+
// // provide some timing info for native/Java boundary
351+
//
352+
// clock_t start;
353+
// for (int run = 0; run < 1000; run++) {
354+
// start = clock();
355+
// int COUNT = 10000;
356+
// for (int i = 0; i < COUNT; i++) {
357+
// GraalPyTruffleLong_Zero();
358+
// }
359+
// double delta = ((double) (clock() - start)) / CLOCKS_PER_SEC;
360+
// if ((run % 100) == 0) {
361+
// PyTruffle_Log(PY_TRUFFLE_LOG_FINE, "C API Timing probe: %.0fns", delta * 1000000000 / COUNT);
362+
// }
363+
// }
364+
// PyTruffle_Log(PY_TRUFFLE_LOG_FINE, "initNativeForward: %fs", ((double) (clock() - t)) / CLOCKS_PER_SEC);
365+
// }
366366

367367
return 1;
368368
}

0 commit comments

Comments
 (0)