Mercurial > hg > truffle
comparison src/share/vm/runtime/vm_operations.cpp @ 10408:836a62f43af9
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 10:45:56 +0200 |
parents | 89e4d67fdd2a f2110083203d |
children | cefad50507d8 |
comparison
equal
deleted
inserted
replaced
10086:e0fb8a213650 | 10408:836a62f43af9 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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. |
35 #include "runtime/interfaceSupport.hpp" | 35 #include "runtime/interfaceSupport.hpp" |
36 #include "runtime/sweeper.hpp" | 36 #include "runtime/sweeper.hpp" |
37 #include "runtime/thread.inline.hpp" | 37 #include "runtime/thread.inline.hpp" |
38 #include "runtime/vm_operations.hpp" | 38 #include "runtime/vm_operations.hpp" |
39 #include "services/threadService.hpp" | 39 #include "services/threadService.hpp" |
40 #include "trace/tracing.hpp" | |
40 | 41 |
41 #define VM_OP_NAME_INITIALIZE(name) #name, | 42 #define VM_OP_NAME_INITIALIZE(name) #name, |
42 | 43 |
43 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \ | 44 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \ |
44 { VM_OPS_DO(VM_OP_NAME_INITIALIZE) }; | 45 { VM_OPS_DO(VM_OP_NAME_INITIALIZE) }; |
60 if (TraceVMOperation) { | 61 if (TraceVMOperation) { |
61 tty->print_cr("]"); | 62 tty->print_cr("]"); |
62 } | 63 } |
63 } | 64 } |
64 | 65 |
66 const char* VM_Operation::mode_to_string(Mode mode) { | |
67 switch(mode) { | |
68 case _safepoint : return "safepoint"; | |
69 case _no_safepoint : return "no safepoint"; | |
70 case _concurrent : return "concurrent"; | |
71 case _async_safepoint: return "async safepoint"; | |
72 default : return "unknown"; | |
73 } | |
74 } | |
65 // Called by fatal error handler. | 75 // Called by fatal error handler. |
66 void VM_Operation::print_on_error(outputStream* st) const { | 76 void VM_Operation::print_on_error(outputStream* st) const { |
67 st->print("VM_Operation (" PTR_FORMAT "): ", this); | 77 st->print("VM_Operation (" PTR_FORMAT "): ", this); |
68 st->print("%s", name()); | 78 st->print("%s", name()); |
69 | 79 |
70 const char* mode; | 80 const char* mode = mode_to_string(evaluation_mode()); |
71 switch(evaluation_mode()) { | |
72 case _safepoint : mode = "safepoint"; break; | |
73 case _no_safepoint : mode = "no safepoint"; break; | |
74 case _concurrent : mode = "concurrent"; break; | |
75 case _async_safepoint: mode = "async safepoint"; break; | |
76 default : mode = "unknown"; break; | |
77 } | |
78 st->print(", mode: %s", mode); | 81 st->print(", mode: %s", mode); |
79 | 82 |
80 if (calling_thread()) { | 83 if (calling_thread()) { |
81 st->print(", requested by thread " PTR_FORMAT, calling_thread()); | 84 st->print(", requested by thread " PTR_FORMAT, calling_thread()); |
82 } | 85 } |