annotate graal/com.oracle.truffle.sl.test/tests_instrumentation/Instrumentation_assnCount.sl @ 21617:ed013f4d38e5

don't destroy and clear JNI global for HotSpotJVMCIRuntime singleton object during shutdown as racing compiler threads may still access it
author Doug Simon <doug.simon@oracle.com>
date Mon, 01 Jun 2015 12:29:48 +0200
parents 7661cc464239
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16702
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
1 function loop(count) {
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
2 i = 0;
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
3 while (i < count) {
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
4 i = i + 1;
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
5 }
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
6 return i;
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
7 }
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
8
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
9 function main() {
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
10 count = loop(100);
2a5ec181dad4 SL: Added instrumentation testing
David Piorkowski <david.piorkowski@oracle.com>
parents:
diff changeset
11 }