Mercurial > hg > truffle
comparison src/share/vm/runtime/vmThread.cpp @ 14380:e6195383bcaf
8034080: Remove the USDT1 dtrace code from Hotspot
Reviewed-by: dholmes, coleenp
author | sla |
---|---|
date | Tue, 18 Feb 2014 09:15:40 +0100 |
parents | f2110083203d |
children | f460c6926af7 |
comparison
equal
deleted
inserted
replaced
14379:c66479743828 | 14380:e6195383bcaf |
---|---|
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 | |
49 // Dummy VM operation to act as first element in our circular double-linked list | 43 // Dummy VM operation to act as first element in our circular double-linked list |
50 class VM_Dummy: public VM_Operation { | 44 class VM_Dummy: public VM_Operation { |
51 VMOp_Type type() const { return VMOp_Dummy; } | 45 VMOp_Type type() const { return VMOp_Dummy; } |
52 void doit() {}; | 46 void doit() {}; |
53 }; | 47 }; |
152 | 146 |
153 //----------------------------------------------------------------- | 147 //----------------------------------------------------------------- |
154 // High-level interface | 148 // High-level interface |
155 bool VMOperationQueue::add(VM_Operation *op) { | 149 bool VMOperationQueue::add(VM_Operation *op) { |
156 | 150 |
157 #ifndef USDT2 | |
158 HS_DTRACE_PROBE3(hotspot, vmops__request, op->name(), strlen(op->name()), | |
159 op->evaluation_mode()); | |
160 #else /* USDT2 */ | |
161 HOTSPOT_VMOPS_REQUEST( | 151 HOTSPOT_VMOPS_REQUEST( |
162 (char *) op->name(), strlen(op->name()), | 152 (char *) op->name(), strlen(op->name()), |
163 op->evaluation_mode()); | 153 op->evaluation_mode()); |
164 #endif /* USDT2 */ | |
165 | 154 |
166 // Encapsulates VM queue policy. Currently, that | 155 // Encapsulates VM queue policy. Currently, that |
167 // only involves putting them on the right list | 156 // only involves putting them on the right list |
168 if (op->evaluate_at_safepoint()) { | 157 if (op->evaluate_at_safepoint()) { |
169 queue_add_back(SafepointPriority, op); | 158 queue_add_back(SafepointPriority, op); |
356 void VMThread::evaluate_operation(VM_Operation* op) { | 345 void VMThread::evaluate_operation(VM_Operation* op) { |
357 ResourceMark rm; | 346 ResourceMark rm; |
358 | 347 |
359 { | 348 { |
360 PerfTraceTime vm_op_timer(perf_accumulated_vm_operation_time()); | 349 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 */ | |
365 HOTSPOT_VMOPS_BEGIN( | 350 HOTSPOT_VMOPS_BEGIN( |
366 (char *) op->name(), strlen(op->name()), | 351 (char *) op->name(), strlen(op->name()), |
367 op->evaluation_mode()); | 352 op->evaluation_mode()); |
368 #endif /* USDT2 */ | |
369 | 353 |
370 EventExecuteVMOperation event; | 354 EventExecuteVMOperation event; |
371 | 355 |
372 op->evaluate(); | 356 op->evaluate(); |
373 | 357 |
381 // This is because the caller thread could have exited already. | 365 // This is because the caller thread could have exited already. |
382 event.set_caller(is_concurrent ? 0 : op->calling_thread()->osthread()->thread_id()); | 366 event.set_caller(is_concurrent ? 0 : op->calling_thread()->osthread()->thread_id()); |
383 event.commit(); | 367 event.commit(); |
384 } | 368 } |
385 | 369 |
386 #ifndef USDT2 | |
387 HS_DTRACE_PROBE3(hotspot, vmops__end, op->name(), strlen(op->name()), | |
388 op->evaluation_mode()); | |
389 #else /* USDT2 */ | |
390 HOTSPOT_VMOPS_END( | 370 HOTSPOT_VMOPS_END( |
391 (char *) op->name(), strlen(op->name()), | 371 (char *) op->name(), strlen(op->name()), |
392 op->evaluation_mode()); | 372 op->evaluation_mode()); |
393 #endif /* USDT2 */ | |
394 } | 373 } |
395 | 374 |
396 // Last access of info in _cur_vm_operation! | 375 // Last access of info in _cur_vm_operation! |
397 bool c_heap_allocated = op->is_cheap_allocated(); | 376 bool c_heap_allocated = op->is_cheap_allocated(); |
398 | 377 |