Mercurial > hg > truffle
annotate src/share/vm/shark/sharkType.hpp @ 17716:cdb71841f4bc
6498581: ThreadInterruptTest3 produces wrong output on Windows
Summary: There is race condition between os::interrupt and os::is_interrupted on Windows. In JVM_Sleep(Thread.sleep), check if thread gets interrupted, it may see interrupted but not really interrupted so cause spurious waking up (early return from sleep). Fix by checking if interrupt event really gets set thus prevent false return. For intrinsic of _isInterrupted, on Windows, go fastpath only on bit not set.
Reviewed-by: acorn, kvn
Contributed-by: david.holmes@oracle.com, yumin.qi@oracle.com
author | minqi |
---|---|
date | Wed, 26 Feb 2014 15:20:41 -0800 |
parents | 2cd5e15048e6 |
children |
rev | line source |
---|---|
1692 | 1 /* |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
1972
diff
changeset
|
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
1692 | 3 * Copyright 2008, 2009 Red Hat, Inc. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
5 * | |
6 * This code is free software; you can redistribute it and/or modify it | |
7 * under the terms of the GNU General Public License version 2 only, as | |
8 * published by the Free Software Foundation. | |
9 * | |
10 * This code is distributed in the hope that it will be useful, but WITHOUT | |
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 * version 2 for more details (a copy is included in the LICENSE file that | |
14 * accompanied this code). | |
15 * | |
16 * You should have received a copy of the GNU General Public License version | |
17 * 2 along with this work; if not, write to the Free Software Foundation, | |
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
19 * | |
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
21 * or visit www.oracle.com if you need additional information or have any | |
22 * questions. | |
23 * | |
24 */ | |
25 | |
1972 | 26 #ifndef SHARE_VM_SHARK_SHARKTYPE_HPP |
27 #define SHARE_VM_SHARK_SHARKTYPE_HPP | |
28 | |
29 #include "ci/ciType.hpp" | |
30 #include "memory/allocation.hpp" | |
31 #include "shark/llvmHeaders.hpp" | |
32 #include "shark/sharkContext.hpp" | |
33 #include "utilities/globalDefinitions.hpp" | |
34 | |
1692 | 35 class SharkType : public AllStatic { |
36 private: | |
37 static SharkContext& context() { | |
38 return SharkContext::current(); | |
39 } | |
40 | |
41 // Basic types | |
42 public: | |
7195 | 43 static llvm::Type* void_type() { |
1692 | 44 return context().void_type(); |
45 } | |
7195 | 46 static llvm::IntegerType* bit_type() { |
1692 | 47 return context().bit_type(); |
48 } | |
7195 | 49 static llvm::IntegerType* jbyte_type() { |
1692 | 50 return context().jbyte_type(); |
51 } | |
7195 | 52 static llvm::IntegerType* jshort_type() { |
1692 | 53 return context().jshort_type(); |
54 } | |
7195 | 55 static llvm::IntegerType* jint_type() { |
1692 | 56 return context().jint_type(); |
57 } | |
7195 | 58 static llvm::IntegerType* jlong_type() { |
1692 | 59 return context().jlong_type(); |
60 } | |
7195 | 61 static llvm::Type* jfloat_type() { |
1692 | 62 return context().jfloat_type(); |
63 } | |
7195 | 64 static llvm::Type* jdouble_type() { |
1692 | 65 return context().jdouble_type(); |
66 } | |
7195 | 67 static llvm::IntegerType* intptr_type() { |
1692 | 68 return context().intptr_type(); |
69 } | |
70 | |
71 // Compound types | |
72 public: | |
7195 | 73 static llvm::PointerType* itableOffsetEntry_type() { |
1692 | 74 return context().itableOffsetEntry_type(); |
75 } | |
7195 | 76 static llvm::PointerType* jniEnv_type() { |
1692 | 77 return context().jniEnv_type(); |
78 } | |
7195 | 79 static llvm::PointerType* jniHandleBlock_type() { |
1692 | 80 return context().jniHandleBlock_type(); |
81 } | |
7195 | 82 static llvm::PointerType* Metadata_type() { |
83 return context().Metadata_type(); | |
84 } | |
85 static llvm::PointerType* klass_type() { | |
1692 | 86 return context().klass_type(); |
87 } | |
7195 | 88 static llvm::PointerType* Method_type() { |
89 return context().Method_type(); | |
1692 | 90 } |
7195 | 91 static llvm::ArrayType* monitor_type() { |
1692 | 92 return context().monitor_type(); |
93 } | |
7195 | 94 static llvm::PointerType* oop_type() { |
1692 | 95 return context().oop_type(); |
96 } | |
7195 | 97 static llvm::PointerType* thread_type() { |
1692 | 98 return context().thread_type(); |
99 } | |
7195 | 100 static llvm::PointerType* zeroStack_type() { |
1692 | 101 return context().zeroStack_type(); |
102 } | |
7195 | 103 static llvm::FunctionType* entry_point_type() { |
1692 | 104 return context().entry_point_type(); |
105 } | |
7195 | 106 static llvm::FunctionType* osr_entry_point_type() { |
1692 | 107 return context().osr_entry_point_type(); |
108 } | |
109 | |
110 // Mappings | |
111 public: | |
7195 | 112 static llvm::Type* to_stackType(BasicType type) { |
1692 | 113 return context().to_stackType(type); |
114 } | |
7195 | 115 static llvm::Type* to_stackType(ciType* type) { |
1692 | 116 return to_stackType(type->basic_type()); |
117 } | |
7195 | 118 static llvm::Type* to_arrayType(BasicType type) { |
1692 | 119 return context().to_arrayType(type); |
120 } | |
7195 | 121 static llvm::Type* to_arrayType(ciType* type) { |
1692 | 122 return to_arrayType(type->basic_type()); |
123 } | |
124 }; | |
1972 | 125 |
126 #endif // SHARE_VM_SHARK_SHARKTYPE_HPP |