annotate src/gpu/hsail/vm/gpu_hsail.hpp @ 18408:2c3666f44855

Truffle: initial commit of object API implementation
author Andreas Woess <andreas.woess@jku.at>
date Tue, 18 Nov 2014 23:19:43 +0100
parents a29e6e7b7a86
children 82e5b5ccdb0c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 *
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 */
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
25 #ifndef GPU_HSAIL_VM_GPU_HSAIL_HPP
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
26 #define GPU_HSAIL_VM_GPU_HSAIL_HPP
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
27
16119
310994c667a7 HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents: 16076
diff changeset
28 #include "runtime/gpu.hpp"
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
29 #include "utilities/exceptions.hpp"
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
30 #include "graal/graalEnv.hpp"
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
31 #include "gpu_hsail_OopMapHelper.hpp"
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
32 #include "gpu_hsail_Frame.hpp"
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
33 #include "gpu_hsail_Tlab.hpp"
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
34
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
35 struct HSAILKernelStats {
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
36 int _dispatches;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
37 int _deopts;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
38 int _overflows;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
39 bool _changeSeen;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
40
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
41 public:
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
42 HSAILKernelStats() {
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
43 _dispatches = _deopts = _overflows = 0;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
44 _changeSeen = false;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
45 }
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
46
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
47 void incDeopts() {
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
48 _deopts++;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
49 _changeSeen = true;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
50 }
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
51 void incOverflows() {
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
52 _overflows++;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
53 _changeSeen = true;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
54 }
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
55
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
56 void finishDispatch() {
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
57 _dispatches++;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
58 if (_changeSeen) {
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
59 // print();
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
60 _changeSeen = false;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
61 }
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
62 }
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
63
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
64 void print() {
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
65 tty->print_cr("Disp=%d, Deopts=%d, Ovflows=%d", _dispatches, _deopts, _overflows);
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
66 }
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
67 };
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
68
15177
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
69 class Hsail : public Gpu {
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
70
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
71 public:
15545
9d456ffc6120 HSAIL: fixed Windows build
Doug Simon <doug.simon@oracle.com>
parents: 15482
diff changeset
72 class HSAILKernelDeoptimization VALUE_OBJ_CLASS_SPEC {
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
73 friend class VMStructs;
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
74 private:
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
75 // TODO: separate workitemid and actionAndReason out
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
76 // since they are there only once even if there are multiple frames
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
77 // for now, though we only ever have one hsail frame
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
78 jint _workitemid;
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
79 jint _actionAndReason;
15545
9d456ffc6120 HSAIL: fixed Windows build
Doug Simon <doug.simon@oracle.com>
parents: 15482
diff changeset
80 // the first (innermost) "hsail frame" starts after the above fields
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
81
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
82 public:
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
83 inline jint workitem() { return _workitemid; }
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
84 inline jint reason() { return _actionAndReason; }
15545
9d456ffc6120 HSAIL: fixed Windows build
Doug Simon <doug.simon@oracle.com>
parents: 15482
diff changeset
85 inline jint pc_offset() { return first_frame()->pc_offset(); }
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
86 inline HSAILFrame* first_frame() {
15545
9d456ffc6120 HSAIL: fixed Windows build
Doug Simon <doug.simon@oracle.com>
parents: 15482
diff changeset
87 // starts after the "header" fields
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
88 return (HSAILFrame*) (((jbyte*) this) + sizeof(*this));
15545
9d456ffc6120 HSAIL: fixed Windows build
Doug Simon <doug.simon@oracle.com>
parents: 15482
diff changeset
89 }
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
90 };
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
91
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
92 // 8 compute units * 40 waves per cu * wavesize 64
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
93 // TODO: query the device to get this number
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
94 #define MAX_DEOPT_SLOTS (8 * 40 * 64)
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
95
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
96
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
97 class HSAILDeoptimizationInfo : public CHeapObj<mtInternal> {
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
98 friend class VMStructs;
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
99 private:
15177
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
100 jint* _notice_safepoints;
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
101 jint _deopt_occurred;
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
102 jint _deopt_next_index;
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
103 jint _num_slots;
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
104 jint _deopt_span;
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
105 jint _deopt_work_index; // how far we are in processing the deopts
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
106 HSAILTlabInfo** _cur_tlab_info; // copy of what was in the HSAILAllocationInfo, to avoid an extra indirection
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
107 HSAILAllocationInfo* _alloc_info;
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
108 char _ignore;
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
109 jobject _oop_map_array;
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
110 // keep a pointer last so save area following it is word aligned
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
111 jboolean* _never_ran_array;
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
112
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
113 public:
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
114 // static HSAILKernelStats kernelStats;
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
115 HSAILKernelDeoptimization _deopt_save_states[1]; // number and size of these can vary per kernel
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
116
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
117 static inline size_t hdr_size() {
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
118 return sizeof(HSAILDeoptimizationInfo);
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
119 }
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
120
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
121 inline jbyte* save_area_start() {
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
122 return (jbyte*) (this) + hdr_size();
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
123 }
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
124
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
125 inline HSAILDeoptimizationInfo(int numSlots, int bytesPerSaveArea, int dimX, HSAILAllocationInfo* allocInfo, jobject oop_map_array) {
15177
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
126 _notice_safepoints = &Hsail::_notice_safepoints;
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
127 _deopt_occurred = 0;
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
128 _deopt_next_index = 0;
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
129 _deopt_work_index = 0;
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
130 _num_slots = numSlots;
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
131 _never_ran_array = NEW_C_HEAP_ARRAY(jboolean, dimX, mtInternal);
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
132 memset(_never_ran_array, 0, dimX * sizeof(jboolean));
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
133 _alloc_info = allocInfo;
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
134 _oop_map_array = oop_map_array;
15545
9d456ffc6120 HSAIL: fixed Windows build
Doug Simon <doug.simon@oracle.com>
parents: 15482
diff changeset
135 _deopt_span = sizeof(HSAILKernelDeoptimization) + sizeof(HSAILFrame) + bytesPerSaveArea;
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
136 if (TraceGPUInteraction) {
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
137 tty->print_cr("HSAILDeoptimizationInfo allocated, %d slots of size %d, total size = 0x%lx bytes", _num_slots, _deopt_span, (_num_slots * _deopt_span + sizeof(HSAILDeoptimizationInfo)));
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
138 }
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
139 }
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
140
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
141 inline ~HSAILDeoptimizationInfo() {
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
142 FREE_C_HEAP_ARRAY(jboolean, _never_ran_array, mtInternal);
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
143 }
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
144
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
145 inline jint deopt_occurred() {
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
146 return _deopt_occurred;
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
147 }
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
148 inline jint num_deopts() { return _deopt_next_index; }
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
149 inline jboolean* never_ran_array() { return _never_ran_array; }
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
150 inline jint num_slots() {return _num_slots;}
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
151 inline void set_deopt_work_index(int val) { _deopt_work_index = val; }
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
152 inline jint deopt_work_index() { return _deopt_work_index; }
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
153
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
154 inline HSAILKernelDeoptimization* get_deopt_save_state(int slot) {
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
155 // use _deopt_span to index into _deopt_states
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
156 return (HSAILKernelDeoptimization*) (save_area_start() + _deopt_span * slot);
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
157 }
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
158
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
159 void set_cur_tlabInfos(HSAILTlabInfo** ptlabInfos) {
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
160 _cur_tlab_info = ptlabInfos;
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
161 }
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
162
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
163 void oops_do(OopClosure* f);
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
164
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
165 void* operator new (size_t hdrSize, int numSlots, int bytesPerSaveArea) {
15609
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
166 assert(hdrSize <= hdr_size(), "");
66d31e70bd79 HSAIL: fixed deopt bug; cleaned up C++ code
Doug Simon <doug.simon@oracle.com>
parents: 15545
diff changeset
167 size_t totalSizeBytes = hdr_size() + numSlots * (sizeof(HSAILKernelDeoptimization) + sizeof(HSAILFrame) + bytesPerSaveArea);
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
168 return NEW_C_HEAP_ARRAY(char, totalSizeBytes, mtInternal);
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
169 }
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
170
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
171 void operator delete (void* ptr) {
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
172 FREE_C_HEAP_ARRAY(char, ptr, mtInternal);
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
173 }
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
174 };
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
175
13819
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
176 private:
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
177
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
178 static JNINativeMethod HSAIL_methods[];
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
179
13819
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
180 // static native boolean initialize();
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
181 JNIEXPORT static jboolean initialize(JNIEnv* env, jclass);
13819
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
182
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
183 // static native long generateKernel(byte[] targetCode, String name);
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
184 JNIEXPORT static jlong generate_kernel(JNIEnv* env, jclass, jbyteArray code_handle, jstring name_handle);
13819
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
185
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
186 // static native boolean executeKernel0(HotSpotInstalledCode kernel, int jobSize, Object[] args);
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
187 JNIEXPORT static jboolean execute_kernel_void_1d(JNIEnv* env, jclass, jobject hotspotInstalledCode, jint dimX, jobject args,
16795
a29e6e7b7a86 Replace hsail donor threads with hsail tlabs
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 16533
diff changeset
188 jint num_tlabs, int allocBytesPerWorkitem, jobject oop_map_array);
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
189
16242
e9998e2be7f5 use oops_do to modify saved hsail state
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16119
diff changeset
190 static jboolean execute_kernel_void_1d_internal(address kernel, int dimX, jobject args, methodHandle& mh, nmethod* nm,
16795
a29e6e7b7a86 Replace hsail donor threads with hsail tlabs
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 16533
diff changeset
191 jint num_tlabs, int allocBytesPerWorkitem, jobject oop_map_array, TRAPS);
15482
a250a512434d HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents: 15177
diff changeset
192
14768
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
193 static GraalEnv::CodeInstallResult install_code(Handle& compiled_code, CodeBlob*& cb, Handle installed_code, Handle triggered_deoptimizations);
3e9a960f0da1 HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents: 13827
diff changeset
194
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
195 public:
13819
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
196
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
197 // Registers the implementations for the native methods in HSAILHotSpotBackend
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
198 static bool register_natives(JNIEnv* env);
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13740
diff changeset
199
15177
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
200 virtual const char* name() { return "HSAIL"; }
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
201
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
202 virtual void notice_safepoints();
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
203 virtual void ignore_safepoints();
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
204
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
205 #if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
206 typedef unsigned long long CUdeviceptr;
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
207 #else
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
208 typedef unsigned int CUdeviceptr;
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
209 #endif
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
210
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
211 private:
16533
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
212
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
213 /*
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
214 * Kernel launch options from okra.h
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
215 */
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
216 typedef struct graal_okra_range_s {
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
217 uint32_t dimension; //max value is 3
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
218 uint32_t global_size[3];
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
219 uint32_t group_size[3];
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
220 uint32_t reserved; //For future use
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
221 } graal_okra_range_t;
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
222
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
223 typedef jint (*okra_get_context_func_t)(void**);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
224 typedef jint (*okra_create_kernel_func_t)(void*, unsigned char*, const char*, void**);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
225 typedef jint (*okra_push_pointer_func_t)(void*, void*);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
226 typedef jint (*okra_push_boolean_func_t)(void*, jboolean);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
227 typedef jint (*okra_push_byte_func_t)(void*, jbyte);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
228 typedef jint (*okra_push_double_func_t)(void*, jdouble);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
229 typedef jint (*okra_push_float_func_t)(void*, jfloat);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
230 typedef jint (*okra_push_int_func_t)(void*, jint);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
231 typedef jint (*okra_push_long_func_t)(void*, jlong);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
232 typedef jint (*okra_execute_kernel_func_t)(void*, void*, graal_okra_range_t*);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
233 typedef jint (*okra_clear_args_func_t)(void*);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
234 typedef jint (*okra_dispose_kernel_func_t)(void*);
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
235 typedef jint (*okra_dispose_context_func_t)(void*);
13740
bfd61161d752 HSAIL: support for using Okra simulator without needing to configure PATH and LD_LIBRARY_PATH
Doug Simon <doug.simon@oracle.com>
parents: 13115
diff changeset
236
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
237 public:
16533
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
238 static okra_get_context_func_t _okra_get_context;
13115
166ed1584f30 HSAIL: null checks when loading Okra library functions
Doug Simon <doug.simon@oracle.com>
parents: 12743
diff changeset
239 static okra_create_kernel_func_t _okra_create_kernel;
16533
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
240 static okra_push_pointer_func_t _okra_push_pointer;
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
241 static okra_push_boolean_func_t _okra_push_boolean;
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
242 static okra_push_byte_func_t _okra_push_byte;
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
243 static okra_push_double_func_t _okra_push_double;
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
244 static okra_push_float_func_t _okra_push_float;
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
245 static okra_push_int_func_t _okra_push_int;
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
246 static okra_push_long_func_t _okra_push_long;
16533
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
247 static okra_execute_kernel_func_t _okra_execute_kernel;
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
248 static okra_clear_args_func_t _okra_clear_args;
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
249 static okra_dispose_kernel_func_t _okra_dispose_kernel;
d5c4bb0039d8 HSAIL: update simulator
Bernhard Urban <bernhard.urban@jku.at>
parents: 16242
diff changeset
250 static okra_dispose_context_func_t _okra_dispose_context;
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
251
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
252 protected:
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
253 static void* _device_context;
15177
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
254
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
255 // true if safepoints are activated
66e3af78ea96 HSAIL: added safepoint support
Doug Simon <doug.simon@oracle.com>
parents: 15066
diff changeset
256 static jint _notice_safepoints;
12743
f1a55428a8d7 more HSAIL support in the C++ layer for executing HSAIL code on the simulator
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
257 };
16076
06eedda53e14 HSAIL: add support to allocate new TLAB from GPU
Doug Simon <doug.simon@oracle.com>
parents: 15609
diff changeset
258 #endif // GPU_HSAIL_VM_GPU_HSAIL_HPP