equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1998-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
423 os::hint_no_preempt(); |
423 os::hint_no_preempt(); |
424 |
424 |
425 // If we are at a safepoint we will evaluate all the operations that |
425 // If we are at a safepoint we will evaluate all the operations that |
426 // follow that also require a safepoint |
426 // follow that also require a safepoint |
427 if (_cur_vm_operation->evaluate_at_safepoint()) { |
427 if (_cur_vm_operation->evaluate_at_safepoint()) { |
428 |
|
429 if (PrintGCApplicationConcurrentTime) { |
|
430 gclog_or_tty->print_cr("Application time: %3.7f seconds", |
|
431 RuntimeService::last_application_time_sec()); |
|
432 } |
|
433 |
428 |
434 _vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned |
429 _vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned |
435 |
430 |
436 SafepointSynchronize::begin(); |
431 SafepointSynchronize::begin(); |
437 evaluate_operation(_cur_vm_operation); |
432 evaluate_operation(_cur_vm_operation); |
475 _vm_queue->set_drain_list(NULL); |
470 _vm_queue->set_drain_list(NULL); |
476 |
471 |
477 // Complete safepoint synchronization |
472 // Complete safepoint synchronization |
478 SafepointSynchronize::end(); |
473 SafepointSynchronize::end(); |
479 |
474 |
480 if (PrintGCApplicationStoppedTime) { |
|
481 gclog_or_tty->print_cr("Total time for which application threads " |
|
482 "were stopped: %3.7f seconds", |
|
483 RuntimeService::last_safepoint_time_sec()); |
|
484 } |
|
485 |
|
486 } else { // not a safepoint operation |
475 } else { // not a safepoint operation |
487 if (TraceLongCompiles) { |
476 if (TraceLongCompiles) { |
488 elapsedTimer t; |
477 elapsedTimer t; |
489 t.start(); |
478 t.start(); |
490 evaluate_operation(_cur_vm_operation); |
479 evaluate_operation(_cur_vm_operation); |