Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/vmThread.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | f460c6926af7 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
38 #include "trace/tracing.hpp" | 38 #include "trace/tracing.hpp" |
39 #include "utilities/dtrace.hpp" | 39 #include "utilities/dtrace.hpp" |
40 #include "utilities/events.hpp" | 40 #include "utilities/events.hpp" |
41 #include "utilities/xmlstream.hpp" | 41 #include "utilities/xmlstream.hpp" |
42 | 42 |
43 #ifndef USDT2 | |
44 HS_DTRACE_PROBE_DECL3(hotspot, vmops__request, char *, uintptr_t, int); | |
45 HS_DTRACE_PROBE_DECL3(hotspot, vmops__begin, char *, uintptr_t, int); | |
46 HS_DTRACE_PROBE_DECL3(hotspot, vmops__end, char *, uintptr_t, int); | |
47 #endif /* !USDT2 */ | |
48 | |
43 // Dummy VM operation to act as first element in our circular double-linked list | 49 // Dummy VM operation to act as first element in our circular double-linked list |
44 class VM_Dummy: public VM_Operation { | 50 class VM_Dummy: public VM_Operation { |
45 VMOp_Type type() const { return VMOp_Dummy; } | 51 VMOp_Type type() const { return VMOp_Dummy; } |
46 void doit() {}; | 52 void doit() {}; |
47 }; | 53 }; |
146 | 152 |
147 //----------------------------------------------------------------- | 153 //----------------------------------------------------------------- |
148 // High-level interface | 154 // High-level interface |
149 bool VMOperationQueue::add(VM_Operation *op) { | 155 bool VMOperationQueue::add(VM_Operation *op) { |
150 | 156 |
157 #ifndef USDT2 | |
158 HS_DTRACE_PROBE3(hotspot, vmops__request, op->name(), strlen(op->name()), | |
159 op->evaluation_mode()); | |
160 #else /* USDT2 */ | |
151 HOTSPOT_VMOPS_REQUEST( | 161 HOTSPOT_VMOPS_REQUEST( |
152 (char *) op->name(), strlen(op->name()), | 162 (char *) op->name(), strlen(op->name()), |
153 op->evaluation_mode()); | 163 op->evaluation_mode()); |
164 #endif /* USDT2 */ | |
154 | 165 |
155 // Encapsulates VM queue policy. Currently, that | 166 // Encapsulates VM queue policy. Currently, that |
156 // only involves putting them on the right list | 167 // only involves putting them on the right list |
157 if (op->evaluate_at_safepoint()) { | 168 if (op->evaluate_at_safepoint()) { |
158 queue_add_back(SafepointPriority, op); | 169 queue_add_back(SafepointPriority, op); |
345 void VMThread::evaluate_operation(VM_Operation* op) { | 356 void VMThread::evaluate_operation(VM_Operation* op) { |
346 ResourceMark rm; | 357 ResourceMark rm; |
347 | 358 |
348 { | 359 { |
349 PerfTraceTime vm_op_timer(perf_accumulated_vm_operation_time()); | 360 PerfTraceTime vm_op_timer(perf_accumulated_vm_operation_time()); |
361 #ifndef USDT2 | |
362 HS_DTRACE_PROBE3(hotspot, vmops__begin, op->name(), strlen(op->name()), | |
363 op->evaluation_mode()); | |
364 #else /* USDT2 */ | |
350 HOTSPOT_VMOPS_BEGIN( | 365 HOTSPOT_VMOPS_BEGIN( |
351 (char *) op->name(), strlen(op->name()), | 366 (char *) op->name(), strlen(op->name()), |
352 op->evaluation_mode()); | 367 op->evaluation_mode()); |
368 #endif /* USDT2 */ | |
353 | 369 |
354 EventExecuteVMOperation event; | 370 EventExecuteVMOperation event; |
355 | 371 |
356 op->evaluate(); | 372 op->evaluate(); |
357 | 373 |
365 // This is because the caller thread could have exited already. | 381 // This is because the caller thread could have exited already. |
366 event.set_caller(is_concurrent ? 0 : op->calling_thread()->osthread()->thread_id()); | 382 event.set_caller(is_concurrent ? 0 : op->calling_thread()->osthread()->thread_id()); |
367 event.commit(); | 383 event.commit(); |
368 } | 384 } |
369 | 385 |
386 #ifndef USDT2 | |
387 HS_DTRACE_PROBE3(hotspot, vmops__end, op->name(), strlen(op->name()), | |
388 op->evaluation_mode()); | |
389 #else /* USDT2 */ | |
370 HOTSPOT_VMOPS_END( | 390 HOTSPOT_VMOPS_END( |
371 (char *) op->name(), strlen(op->name()), | 391 (char *) op->name(), strlen(op->name()), |
372 op->evaluation_mode()); | 392 op->evaluation_mode()); |
393 #endif /* USDT2 */ | |
373 } | 394 } |
374 | 395 |
375 // Last access of info in _cur_vm_operation! | 396 // Last access of info in _cur_vm_operation! |
376 bool c_heap_allocated = op->is_cheap_allocated(); | 397 bool c_heap_allocated = op->is_cheap_allocated(); |
377 | 398 |
654 _cur_vm_operation = prev_vm_operation; | 675 _cur_vm_operation = prev_vm_operation; |
655 } | 676 } |
656 } | 677 } |
657 | 678 |
658 | 679 |
659 void VMThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) { | 680 void VMThread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { |
660 Thread::oops_do(f, cld_f, cf); | 681 Thread::oops_do(f, cld_f, cf); |
661 _vm_queue->oops_do(f); | 682 _vm_queue->oops_do(f); |
662 } | 683 } |
663 | 684 |
664 //------------------------------------------------------------------------------------------------------------------ | 685 //------------------------------------------------------------------------------------------------------------------ |