Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/os.cpp @ 14392:b5c8a61d7fa0
Merge
author | kvn |
---|---|
date | Fri, 21 Jun 2013 15:56:24 -0700 |
parents | f2110083203d |
children | 836a62f43af9 a837fa3d3f86 |
comparison
equal
deleted
inserted
replaced
14391:d2907f74462e | 14392:b5c8a61d7fa0 |
---|---|
263 VMThread::execute(&jni_op); | 263 VMThread::execute(&jni_op); |
264 VM_FindDeadlocks op1(tty); | 264 VM_FindDeadlocks op1(tty); |
265 VMThread::execute(&op1); | 265 VMThread::execute(&op1); |
266 Universe::print_heap_at_SIGBREAK(); | 266 Universe::print_heap_at_SIGBREAK(); |
267 if (PrintClassHistogram) { | 267 if (PrintClassHistogram) { |
268 VM_GC_HeapInspection op1(gclog_or_tty, true /* force full GC before heap inspection */, | 268 VM_GC_HeapInspection op1(gclog_or_tty, true /* force full GC before heap inspection */); |
269 true /* need_prologue */); | |
270 VMThread::execute(&op1); | 269 VMThread::execute(&op1); |
271 } | 270 } |
272 if (JvmtiExport::should_post_data_dump()) { | 271 if (JvmtiExport::should_post_data_dump()) { |
273 JvmtiExport::post_data_dump(); | 272 JvmtiExport::post_data_dump(); |
274 } | 273 } |
1442 // If we reached EOF, it will be returned on next call. | 1441 // If we reached EOF, it will be returned on next call. |
1443 | 1442 |
1444 return (int) i; | 1443 return (int) i; |
1445 } | 1444 } |
1446 | 1445 |
1446 void os::SuspendedThreadTask::run() { | |
1447 assert(Threads_lock->owned_by_self() || (_thread == VMThread::vm_thread()), "must have threads lock to call this"); | |
1448 internal_do_task(); | |
1449 _done = true; | |
1450 } | |
1451 | |
1447 bool os::create_stack_guard_pages(char* addr, size_t bytes) { | 1452 bool os::create_stack_guard_pages(char* addr, size_t bytes) { |
1448 return os::pd_create_stack_guard_pages(addr, bytes); | 1453 return os::pd_create_stack_guard_pages(addr, bytes); |
1449 } | 1454 } |
1450 | |
1451 | 1455 |
1452 char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint) { | 1456 char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint) { |
1453 char* result = pd_reserve_memory(bytes, addr, alignment_hint); | 1457 char* result = pd_reserve_memory(bytes, addr, alignment_hint); |
1454 if (result != NULL) { | 1458 if (result != NULL) { |
1455 MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC); | 1459 MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC); |
1549 | 1553 |
1550 void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { | 1554 void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { |
1551 pd_realign_memory(addr, bytes, alignment_hint); | 1555 pd_realign_memory(addr, bytes, alignment_hint); |
1552 } | 1556 } |
1553 | 1557 |
1558 #ifndef TARGET_OS_FAMILY_windows | |
1559 /* try to switch state from state "from" to state "to" | |
1560 * returns the state set after the method is complete | |
1561 */ | |
1562 os::SuspendResume::State os::SuspendResume::switch_state(os::SuspendResume::State from, | |
1563 os::SuspendResume::State to) | |
1564 { | |
1565 os::SuspendResume::State result = | |
1566 (os::SuspendResume::State) Atomic::cmpxchg((jint) to, (jint *) &_state, (jint) from); | |
1567 if (result == from) { | |
1568 // success | |
1569 return to; | |
1570 } | |
1571 return result; | |
1572 } | |
1573 #endif |